This topic describes how to resolve Hugging Face models from within Artifactory.
To resolve a model from Artifactory, run the following command:
Note
Resolving models from Artifactory might take a while due to the size of the models.
Note
Make sure to replace the placeholder in bold with your own model name and revision number.
from huggingface_hub import snapshot_download snapshot_download( repo_id="<MODEL_NAME>", revision="<MODEL_UUID>", etag_timeout=1500000000 )
For example:
from huggingface_hub import snapshot_download snapshot_download( repo_id="nsi319/legalpegasus", revision="54ef2872d33bbff28eb09544bdecbf6699f5b0b8", etag_timeout=1500000000 )
Warning
Note: Use the from huggingface_hub import snapshot_download snapshot_download( repo_id="<model_name>", revision="<model_revision>", etag_timeout=1500000000 )
command to resolve a model for the first time. Artifactory supports using other Transformer library functions for resolving models, but only after the models have been cached on Artifactory.
To find the revision ID for a model on Hugging Face Hub:
In the model page, go to the Files and versions tab.
Click the History button on the top right-hand side. This page contains the commit history of the model, each with its own Git commit revision ID.
Click the copy icon to copy the full commit hash to your clipboard.