Resolve Hugging Face Models

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

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
)

To find the revision ID for a model on Hugging Face Hub:

  1. In the model page, go to the Files and versions tab.

  2. 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.

  3. Click the copy icon to copy the full commit hash to your clipboard.