In case you want to construct the URL used to download a file from a repo, you can use hf_hub_url() which returns a URL. Note: When using the commit hash, it must be the full-length hash instead of a 7-character commit hash. # Download from a specific commit hash > hf_hub_download(repo_id= 'lysandre/arxiv-nlp', filename= 'config.json', revision= '877b84a8f93f2d619faa2a6e514a32beef88ab0a')
# Download from Pull Request #3 > hf_hub_download(repo_id= 'lysandre/arxiv-nlp', filename= 'config.json', revision= 'refs/pr/3') # Download from the `test-branch` branch > hf_hub_download(repo_id= 'lysandre/arxiv-nlp', filename= 'config.json', revision= 'test-branch') Copied # Download from the `v1.0` tag > hf_hub_download(repo_id= 'lysandre/arxiv-nlp', filename= 'config.json', revision= 'v1.0')