+
    QV-j)  ã                   óª   € R t ^ RIt^ RIHt ^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHtHt ^ RIHtHt ^RIHtHtHtHtHt ^R	IHt . ROtRR
 R lltR# )an  Contains command to download files from the Hub with the CLI.

Usage:
    hf download --help

    # Download file
    hf download gpt2 config.json

    # Download entire repo
    hf download fffiloni/zeroscope --repo-type=space --revision=refs/pr/78

    # Download repo with filters
    hf download gpt2 --include="*.safetensors"

    # Download with token
    hf download Wauplin/private-model --token=hf_***

    # Download quietly (no progress bar, no warnings, only the returned path)
    hf download gpt2 config.json --quiet

    # Download to local dir
    hf download gpt2 --local-dir=./models/gpt2

    # Download a subfolder
    hf download HuggingFaceM4/FineVision art/ --repo-type=dataset

    # Download using an hf:// URI (repo type, revision and file path are read from the URI)
    hf download hf://datasets/HuggingFaceM4/FineVision@refs/pr/1/data/train.parquet
N)Ú	Annotated)Ú	constants)Úsnapshot_download)ÚCLIError)ÚDryRunFileInfoÚhf_hub_download)Ú_format_sizeÚparse_hf_uri)Ú	RepoIdArgÚRepoTypeÚRepoTypeOptionalOptÚRevisionOptÚTokenOpt)Úoutc                óT  € V ^8„  d   QhR\         R\        \        \        ,          R,          \        P
                  ! RR7      3,          R\        R\        R\        \        \        ,          R,          \        P                  ! R	R7      3,          R
\        \        \        ,          R,          \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R\        R\        \        \        P                  ! RR7      3,          RR/# )é   Úrepo_idÚ	filenamesNz>Files to download (e.g. `config.json`, `data/metadata.jsonl`).)ÚhelpÚ	repo_typeÚrevisionÚincludez;Glob patterns to include from files to download. eg: *.jsonÚexcludez0Glob patterns to exclude from files to download.Ú	cache_dirzDirectory where to save files.Ú	local_dirz¹If set, the downloaded file will be placed under this directory. Check out https://huggingface.co/docs/huggingface_hub/guides/download#download-files-to-a-local-folder for more details.Úforce_downloadzFIf True, the files will be downloaded even if they are already cached.Údry_runzAIf True, perform a dry run without actually downloading the file.ÚtokenÚmax_workerszEMaximum number of workers to use for downloading files. Default is 8.Úreturn)r
   r   ÚlistÚstrÚtyperÚArgumentr   r   ÚOptionÚboolr   Úint)Úformats   "Úm/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/huggingface_hub/cli/download.pyÚ__annotate__r)   E   s©  € ÷ y"ñ y"Üðy"äÜŒS�	�DÕÜ�ŠØQô	
ð	õðy"ô #ðy"ô ðy"ô ÜŒS�	�DÕÜ�ŠØNô	
ð	õðy"ô  ÜŒS�	�DÕÜ�ŠØCô	
ð	õð!y"ô, Üˆd�
Ü�ŠØ1ô	
ð	õð-y"ô8 Üˆd�
Ü�Šð Mô	
ð	õð9y"ôD ÜÜ�ŠØYô	
ð	õðEy"ôP ÜÜ�ŠØTô	
ð	õðQy"ô\ ð]y"ô^ ÜÜ�ŠØXô	
ð	õð_y"ðj 
ñky"ó    c                ó¾  a aaaaaaaa	a
aa€ Se   Se   \        R4      hS P                  \        P                  4      '       dÎ   Ve   \        RS  R24      hSe   \        RS  R24      h\	        S 4      pVP
                  '       d   \        R4      hVP                  pV'       d!   S P                  R4      '       d
   VR,          pVP                  VP                  VP                  uo ooV'       d   S'       d   \        RV R	S R
24      hV.oM$T;'       g    \        P                  P                  oR VV	VVVVVVV VVV
3R llpR R lpV! V! 4       4       R# )zDownload files from the Hub.NzÒCannot use both `--local-dir` and `--cache-dir` at the same time. Use `--cache-dir` (or set the HF_HOME environment variable) for shared caching, or `--local-dir` for a one-off download to a specific directory.z3'--repo-type' cannot be used with an 'hf://' URI ('z').z2'--revision' cannot be used with an 'hf://' URI ('zBBuckets are not supported by `hf download`. Use `hf sync` instead.Ú/z.Cannot combine a file path in the hf:// URI ('z') with positional filenames Ú.c                óf   € V ^8„  d   QhR\         \        ,          \        \        ,          ,          /# )r   r   ©r!   r   r    )r'   s   "r(   r)   Údownload.<locals>.__annotate__¡   s%   € ÷ D
ñ D
œ#¤Õ.´´nÕ1EÕEñ D
r*   c                  óÖ  <€ S
e   S
M. p V  Uu. uF  qP                  R4      '       g   K  VNK  	  ppV Uu. uF  qP                  R4       R2NK  	  ppV  Uu. uF  qP                  R4      '       d   K  VNK  	  pp\        V4      ^ 8”  di   Se1   \        S4      ^ 8”  d!   \        RV^ ,           RV^ ,           R24      hS	e1   \        S	4      ^ 8”  d!   \        RV^ ,           RV^ ,           R24      h\        V4      ^ 8”  dU   Se'   \        S4      ^ 8”  d   \        P
                  ! R4       S	e'   \        S	4      ^ 8”  d   \        P
                  ! R	4       \        V4      ^8X  d-   \        V4      ^ 8X  d   \        SSSV^ ,          SSSSR
SR7
      # \        V4      ^ 8X  d   \        V4      ^ 8X  d   SpS	pM
WC,           pR p\        SSSVVSSSSR
SSR7      # u upi u upi u upi )Nr,   z/**z$Cannot combine subfolder argument ('z,') with `--include`. Please use `--include "z*"` instead.z,') with `--exclude`. Please use `--include "z*"` with `--exclude` instead.z>Ignoring `--include` since filenames have been explicitly set.z>Ignoring `--exclude` since filenames have been explicitly set.zhuggingface-cli)
r   r   r   Úfilenamer   r   r   r   Úlibrary_namer   )r   r   r   Úallow_patternsÚignore_patternsr   r   r   r   r3   r   r   )ÚendswithÚrstripÚlenr   ÚwarningsÚwarnr   r   )Úfilenames_listÚfÚ
subfoldersÚsubfolder_patternsÚregular_filenamesr4   r5   r   r   r   r   r   r   r   r   r   Úrepo_type_strr   r   s          €€€€€€€€€€€€r(   Úrun_downloadÚdownload.<locals>.run_download¡   s  ø€ Ø&/Ò&;™Àˆñ "0ÓC¡˜A·:±:¸c·?—a�a¡ˆ
ÐCÙ=GÓH¹Z¸§¡¨#£ ¨sÓ3¹ZÐÐHÙ(6ÓN© 1¿j¹jÈ¿oŸQ˜Q©ÐÐNô Ð!Ó" QÔ&ØÒ"¤s¨7£|°aÔ'7ÜØ:¸:Àa½=¸/ð J.Ø.8¸­m¨_¸LðJóð ð Ò"¤s¨7£|°aÔ'7ÜØ:¸:Àa½=¸/ð J.Ø.8¸­m¨_Ð<Yð[óð ô Ð Ó! AÔ%ØÒ"¤s¨7£|°aÔ'7Ü—’Ð^Ô_ØÒ"¤s¨7£|°aÔ'7Ü—’Ð^Ô_ô Ð Ó! QÔ&¬3Ð/AÓ+BÀaÔ+GÜ"ØØ'Ø!Ø*¨1Õ-Ø#Ø-ØØ#Ø.Øôð ô Ð Ó! QÔ&¬3Ð/AÓ+BÀaÔ+Gà$ˆNØ%‰Oð /ÕCˆNØ"ˆOä ØØ#ØØ)Ø+Ø)ØØØØ*Ø#Øô
ð 	
ùòe DùÚHùÚNs   ŽG«G·G!ÁG&Á6G&c                ój   € V ^8„  d   QhR\         \        ,          \        \        ,          ,          RR/# )r   Úresultr   Nr/   )r'   s   "r(   r)   r0   ç   s)   € ÷ ñ œc¤NÕ2´T¼.Õ5IÕIð Èdñ r*   c                 óZ  € \        V \        4      '       d   \        P                  ! R V R7       R# \        V \        4      '       d   V .p V  Uu. uF  qP
                  '       g   K  VNK  	  pp\        P                  ! R\        V4       R\        V 4       R\        \        R V 4       4      4       R24       \        V R R	7       Uu. uF:  pR
VP                  RVP
                  '       d   \        VP                  4      MR/NK<  	  pp\        P                  ! V4       R# u upi u upi )Ú
Downloaded)ÚpathNz[dry-run] Will download z files (out of z) totalling c              3   ó8   "  € T F  qP                   x € K  	  R # 5i©N)Ú	file_size)Ú.0Úrs   & r(   Ú	<genexpr>Ú2download.<locals>._print_result.<locals>.<genexpr>ó   s   é € Ð*NÁ¸1¯;®;Ãùs   ‚r-   c                 ó   € V P                   # rI   )r2   )Úxs   &r(   Ú<lambda>Ú1download.<locals>._print_result.<locals>.<lambda>ú   s   € °Q·Z²Zr*   )ÚkeyÚfileÚsizeÚ-)Ú
isinstancer!   r   rD   r   Úwill_downloadÚtextr8   r   ÚsumÚsortedr2   rJ   Útable)rD   rL   rX   ÚinfoÚitemss   &    r(   Ú_print_resultÚdownload.<locals>._print_resultç   s
  € Ü�fœc×"Ò"Ü�JŠJ�|¨&Õ1Ùô �fœn×-Ò-Ø�XˆFÙ$*Ó>¡F˜q¯o­oŸ˜¡FˆÐ>Ü�ŠØ&¤s¨=Ó'9Ð&:ð ;Ü˜F›�}ð %Ü&¤sÑ*NÁÓ*NÓ'NÓOÐPÐPQðSô	
ô ˜vÑ+?Õ@ó
ñ
 A�ð ˜Ÿ™Ø¸×8J×8JÐ8Jœ T§^¡^Ô4ÐPSóñ Að 	ð 
ô 	�	Š	�%Öùò ?ùò
s   ÁD#Á&D#Ã	#D(Ã-D()r   Ú
startswithr   ÚHF_PROTOCOLr	   Ú	is_bucketÚpath_in_repor6   ÚidÚtyper   r   ÚmodelÚvalue)r   r   r   r   r   r   r   r   r   r   r   r   Úurird   rA   r_   r@   s   ff&fffffffff    @r(   Údownloadrj   E   sL  ÿû€ ðn Ò Ò!6ÜðOó
ð 	
ð ×Ñœ)×/Ñ/×0Ò0ØÒ ÜÐPÐQXÐPYÐY\Ð]Ó^Ð^ØÒÜÐOÐPWÈyÐX[Ð\Ó]Ð]Ü˜7Ó#ˆØ�=�=ˆ=ÜÐ_Ó`Ð`ð ×'Ñ'ˆß˜G×,Ñ,¨S×1Ò1Ø˜CÕˆLØ+.¯6©6°3·8±8¸S¿\¹\Ð(ˆ� ßßÜØDÀ\ÀNÐRoÐpyÐozÐz{Ð|óð ð &˜ˆIøà"×4Ð4¤h§n¡n×;Ñ;ˆ÷D
÷ D
ó D
õLñ. ‘,“.Ö!r*   )z,hf download meta-llama/Llama-3.2-1B-InstructzGhf download meta-llama/Llama-3.2-1B-Instruct config.json tokenizer.jsonzXhf download meta-llama/Llama-3.2-1B-Instruct --include "*.safetensors" --exclude "*.bin"zGhf download meta-llama/Llama-3.2-1B-Instruct --local-dir ./models/llamaz=hf download HuggingFaceM4/FineVision art/ --repo-type datasetz6hf download hf://datasets/HuggingFaceH4/ultrachat_200k)NNNNNNNFFNé   )Ú__doc__r9   Útypingr   r"   Úhuggingface_hubr   Ú"huggingface_hub._snapshot_downloadr   Úhuggingface_hub.errorsr   Úhuggingface_hub.file_downloadr   r   Úhuggingface_hub.utilsr   r	   Ú
_cli_utilsr
   r   r   r   r   Ú_outputr   ÚDOWNLOAD_EXAMPLESrj   © r*   r(   Ú<module>rw      sA   ðñó< Ý ã å %Ý @Ý +ß Iß <ç WÕ WÝ òÐ ÷y"ñ y"r*   