+
    råûjñ¬  ã            	       ó  a € R: tU0 t R t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHtHtHtHtHtHtHtHtHtHtHtHt ^ RIHt ^ RIH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t* ^R	I+H,t,H-t- ^R
I.H/t/H0t0H1t1H2t2 Rt3Rt4Rt5]-Pl                  ! ]74      t8Rs9] ^ k R R lt: ! R R]RR7      t;]Px                  ! R]Pz                  P}                  ]P~                  R4      4      t@RtA]! 4       P„                  tCRtDRtER;R R lltFRRRRRR/R R lltGR  tHR<R! R" lltIR# R$ ltJR<R%RRRR&RRR/R' R( llltKR) R* ltLR+ R, ltMR=R- R. lltNR;R&RRRR%R/R/ R0 llltO ! R1 R24      tPR3 R4 ltQR>R5 ltRR?R6 R7 lltS ! R8 R94      tTR# )@z?
Hub utilities: utilities related to download and cache models
N)Úfutures)ÚPath)Ú	TypedDict)Úuuid4)Ú_CACHED_NO_EXISTÚCommitOperationAddÚHfApiÚ	ModelCardÚModelCardDataÚResolvedRevisionÚ	constantsÚhf_hub_downloadÚ
hf_hub_urlÚis_offline_modeÚsnapshot_downloadÚtry_to_load_from_cache)ÚREGEX_COMMIT_HASH)ÚEntryNotFoundErrorÚGatedRepoErrorÚHfHubHTTPErrorÚLocalEntryNotFoundErrorÚOfflineModeIsEnabledÚRepositoryNotFoundErrorÚRevisionNotFoundErrorÚbuild_hf_headersÚget_sessionÚhf_raise_for_statusÚhttpx)Ú__version__Úlogging)ÚENV_VARS_TRUE_VALUESÚget_torch_versionÚis_torch_availableÚis_training_run_on_sagemakerzchat_template.jsonzchat_template.jinjaÚadditional_chat_templatesc                ó$   € V ^8„  d   QhR\         /# )é   Úreturn)r   )Úformats   "ÚRC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\transformers\utils\hub.pyÚ__annotate__r*   N   s   € ÷ ñ ”ñ ó    c                 ó@   € \         f   \        R\        R7      s \         # )zõReturn a shared HfApi instance tagged with transformers's library info.

Routing Hub calls (create_repo, create_commit, snapshot_download, ...) through this
instance ensures the library_name/library_version are reported consistently to the Hub.
Útransformers)Úlibrary_nameÚlibrary_version)Ú_hf_apir   r   © r+   r)   Úhf_apir2   N   s    € ô ‚ÜØ'Ü'ô
ˆô €Nr+   c                   ó,   a € ] tR t^]t o V 3R ltRtV tR# )ÚDownloadKwargsc                ó
  <€ V ^8„  d   Qh/ S[ S[P                  ,          R,          ;R&   S[;R&   S[S[ S[ 3,          R,          ;R&   S[;R&   S[ S[,          R,          ;R&   S[ R,          ;R&   S[ ;R&   S[R,          ;R	&   # )
r&   NÚ	cache_dirÚforce_downloadÚproxiesÚlocal_files_onlyÚtokenÚrevisionÚ	subfolderÚ
tqdm_class)ÚstrÚosÚPathLikeÚboolÚdictÚtype)r(   Ú__classdict__s   "€r)   r*   ÚDownloadKwargs.__annotate__]   s”   ø‡ ‚ Ù‘R—[‘[Õ  4Õ'Ñ'ñ áÑñ ñ ‘#‘s�(�^˜dÕ"Ñ"ñ ñ Ññ	 ñ
 ‘�:˜ÕÑñ ñ �D�jÑñ ñ �Nñ ñ �t•Ñò r+   r1   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©rD   s   @r)   r4   r4   ]   s   ø‡ ‡ „ r+   r4   F)ÚtotalÚHF_MODULES_CACHEÚmodulesÚtransformers_modulesz3https://s3.amazonaws.com/models.huggingface.co/bertzhttps://cdn.huggingface.coc                ó”   € V ^8„  d   QhR\         R\         R\         \        ,          R,          R\         R,          R\         R,          /# )r&   Úpath_or_repo_idÚfull_filenamer6   Nr;   Ú	repo_type)r>   r   )r(   s   "r)   r*   r*   t   sK   € ÷ ñ Üðäðô ”T�z˜DÕ ðô �D�jð	ô
 �T�zñr+   c                 óD   € \        WW#VR 7      pVe   V\        8w  d   V# R# )©r6   r;   rU   N)r   r   )rS   rT   r6   r;   rU   Úresolved_files   &&&&& r)   Ú_get_cache_file_to_returnrY   t   s/   € ô +Ø°)ÐZcô€Mð Ò  ]Ô6FÔ%FØÐÙr+   r;   r6   r:   c                ó¶   € V ^8„  d   QhR\         R\        R\         R,          R\         R,          R\         \        ,          R,          R\        \         ,          /# )r&   Úrepo_idr9   r;   Nr6   r:   r'   )r>   rA   Úlist)r(   s   "r)   r*   r*   „   sc   € ÷ *rñ *rÜð*rô ð*rô �D�jð	*rô
 �T�zð*rô ”�:˜Õð*rô 
Œ#…Yñ*rr+   c               ó  € V'       gw    \        4       P                  V V\        RVR7       Uu. uFH  pVP                  P	                  R4      '       g   K&  VP                  P                  \         R24      NKJ  	  up#  \        4       P                  WVRR7      p\        T\        4      pTP!                  4       '       g   . # TP#                  4        Uu. uFI  qUP%                  4       '       g   K  TP&                  P	                  R4      '       g   K=  TP(                  NKK  	  up# u upi   \        \        \        3 d    h \        \        \        P                  3 d     Læi ; i  \         d    . u # i ; iu upi )zêList template files from a repo.

A template is a jinja file located under the `additional_chat_templates/` folder.
If working in offline mode or if internet is down, the method will list jinja template from the local cache - if any.
F)r[   r;   Úpath_in_repoÚ	recursiver:   z.jinjaÚ/T)r[   r;   r6   r9   )r2   Úlist_repo_treeÚCHAT_TEMPLATE_DIRÚpathÚendswithÚremoveprefixr   r   r   r   r   r   ÚNetworkErrorr   r   r   Úis_dirÚiterdirÚis_fileÚnameÚstem)r[   r9   r;   r6   r:   ÚentryÚsnapshot_dirÚtemplates_dirs   &$$$$   r)   Úlist_repo_templatesro   „   sa  € ÷ ð	ô $›X×4Ñ4Ø#Ø%Ü!2Ø#Øð 5ô ó
ñ�Eð —:‘:×&Ñ& x×0ô A�—
‘
×'Ñ'Ô+<Ð*=¸QÐ(?Ö@ññ
ð 
ð"Ü“x×1Ñ1Ø¸)ÐVZð 2ó 
ˆô
 ˜Ô'8Ó9€MØ×Ñ×!Ò!Øˆ	Ø$1×$9Ñ$9Ô$;ÓqÑ$;˜5¿}¹}¿ŒJÐSX×S]ÑS]×SfÑSfÐgo×SpŒJˆE�JŒJÑ$;ÑqÐqùò5
øô Ô 7Ô9NÐOô 	ØÜÔ 4´e×6HÑ6HÐIô 	Ùð	ûô #ô ØŠ	ðüò
 rsR   Š$D- ®#D(Á&D(Á<D- Â E) ÃE<Ã2E<ÄE<Ä(D- Ä-4E&Å"E&Å%E&Å)E9Å8E9c                  óˆ  €  \         P                  ! \        P                  R ,          4      P	                  4       p V R,          pV R,          P                  R4      ^,          p\        P                  ! \        P                  ! RR4      4      pRV9   p\        P                  ! R4      pVe   VP                  R4      ^,          MRpR\        P                  ! R	R4      R
\        P                  ! RR4      R\        P                  ! RR4      R\        P                  ! RR4      RVRVRVRV/pV#   \         d    RpRp LÝi ; i)ÚECS_CONTAINER_METADATA_URIÚImageÚ:NÚSM_FRAMEWORK_PARAMSz{}Ú*sagemaker_distributed_dataparallel_enabledÚTRAINING_JOB_ARNÚsm_frameworkÚSM_FRAMEWORK_MODULEÚ	sm_regionÚ
AWS_REGIONÚsm_number_gpuÚSM_NUM_GPUSÚ0Úsm_number_cpuÚSM_NUM_CPUSÚsm_distributed_trainingÚsm_deep_learning_containerÚsm_deep_learning_container_tagÚsm_account_id)	r   Úgetr?   ÚenvironÚjsonÚsplitÚ	ExceptionÚloadsÚgetenv)Úinstance_dataÚdlc_container_usedÚdlc_tagÚsagemaker_paramsÚruns_distributed_trainingÚtraining_job_arnÚ
account_idÚsagemaker_objects           r)   Údefine_sagemaker_informationr“   ±   s)  € ðÜŸ	š	¤"§*¡*Ð-IÕ"JÓK×PÑPÓRˆØ*¨7Õ3ÐØ Õ(×.Ñ.¨sÓ3°AÕ6ˆô
 —z’z¤"§)¢)Ð,AÀ4Ó"HÓIÐØ LÐP`Ñ `ÐÜ—y’yÐ!3Ó4ÐØ3CÒ3OÐ!×'Ñ'¨Ó,¨QÖ/ÐUY€Jð 	œŸ	š	Ð"7¸Ó>Ø”R—Y’Y˜|¨TÓ2ØœŸš =°#Ó6ØœŸš =°#Ó6Ø!Ð#<Ø$Ð&8Ø(¨'Ø˜ð	Ðð Ðøô' ô Ø!ÐØŠðús   ‚A!D/ Ä/EÅ Ec                óT   € V ^8„  d   QhR\         \        ,          R,          R\        /# )r&   Ú
user_agentNr'   )rB   r>   )r(   s   "r)   r*   r*   Ì   s#   € ÷ ñ ¤¤s¥
¨TÕ 1ð ¼Sñ r+   c                óô  € R\          R\        P                  P                  4       ^ ,           R\         2p\        4       '       d   VR\        4        2,          p\        P                  '       d
   VR,           # \        4       '       d=   VRRP                  R \        4       P                  4        4       4      ,           ,          p\        P                  P                  RR	4      P!                  4       \"        9   d
   VR
,          p\%        V \&        4      '       d7   VRRP                  R V P                  4        4       4      ,           ,          pV# \%        V \(        4      '       d   VRV ,           ,          pV# )z>
Formats a user-agent string with basic info about a request.
ztransformers/z	; python/z; session_id/z; torch/z; telemetry/offz; c              3   ó4   "  € T F  w  rV R V 2x € K  	  R# 5i©r`   Nr1   ©Ú.0ÚkÚvs   &  r)   Ú	<genexpr>Ú"http_user_agent.<locals>.<genexpr>Ö   s   é € Ð]Ñ6\©d¨a !  A a S�zÓ6\ùó   ‚ÚTRANSFORMERS_IS_CIÚ z; is_ci/truec              3   ó4   "  € T F  w  rV R V 2x € K  	  R# 5ir˜   r1   r™   s   &  r)   r�   rž   Û   s   é € ÐIÑ6H©d¨a !  A a S�zÓ6HùrŸ   )r   ÚsysÚversionr‡   Ú
SESSION_IDr"   r!   r   ÚHF_HUB_DISABLE_TELEMETRYr#   Újoinr“   Úitemsr?   r…   r„   Úupperr    Ú
isinstancerB   r>   )r•   Úuas   & r)   Úhttp_user_agentr¬   Ì   s&  € ð œ˜ Y¬s¯{©{×/@Ñ/@Ó/BÀ1Õ/EÐ.FÀmÔT^ÐS_Ð	`€BÜ×ÒØ
�Ô*Ó,Ð-Ð.Õ.ˆÜ×)×)Ð)ØÐ%Õ%Ð%Ü#×%Ò%Ø
ˆd�T—Y‘YÑ]Ô6RÓ6T×6ZÑ6ZÔ6\Ó]Ó]Õ]Õ]ˆä	‡z�z‡~�~Ð*¨BÓ/×5Ñ5Ó7Ô;OÔOØ
ˆnÕˆÜ�*œd×#Ò#Ø
ˆd�T—Y‘YÑI°j×6FÑ6FÔ6HÓIÓIÕIÕIˆð €Iô 
�J¤×	$Ò	$Ø
ˆd�ZÕÕˆØ€Ir+   c                óf   € V ^8„  d   QhR\         R,          R\         R,          R\         R,          /# )r&   rX   NÚcommit_hashr'   ©r>   )r(   s   "r)   r*   r*   á   s3   € ÷ Iñ I¤s¨T¥zð IÄÀdÅ
ð IÌsÐUYÍzñ Ir+   c                ó  € V e   Ve   V# \        \        V 4      P                  4       4      p \        P                  ! RV 4      pVf   R# VP                  4       ^ ,          p\        P                  ! V4      '       d   V# R# )zH
Extracts the commit hash from a resolved filename toward a cache file.
Nzsnapshots/([^/]+)/)r>   r   Úas_posixÚreÚsearchÚgroupsr   Úmatch)rX   r®   r³   s   && r)   Úextract_commit_hashr¶   á   sq   € ð Ò Ò 7ØÐÜœ˜]Ó+×4Ñ4Ó6Ó7€MÜ�YŠYÐ,¨mÓ<€FØ‚~ÙØ—-‘-“/ !Õ$€KÜ+×1Ò1°+×>Ò>ˆ;ÐHÀDÐHr+   rU   r9   c                ó*  € V ^8„  d   QhR\         \        P                  ,          R,          R\         R,          R\         R,          R\        \         ,          R,          R\        R\         \        P                  ,          R,          R\         R,          /# )	r&   rS   Nr;   rU   r:   r9   r6   r'   )r>   r?   r@   rA   )r(   s   "r)   r*   r*   ï   s   € ÷ =ñ =Üœ2Ÿ;™;Õ&¨Õ-ð=ä�D�jð=ô �T�zð	=ô
 ”#�:˜Õð=ô ð=ô ”R—[‘[Õ  4Õ'ð=ô 	ˆ4…Zñ=r+   c          	     ó0  € V e&   \         P                  P                  V 4      '       d   V#  \        4       P	                  \        V 4      TTTT;'       g    \        4       VR7      #   \         d$    \        P                  RT RT  R2RR7       Tu # i ; i)aµ  
Best-effort resolution of a (possibly mutable) `revision` into the immutable commit it currently points to.

Every public loading entry point (`from_pretrained`, `pipeline`, ...) calls this once, then passes the returned
value as `revision` for the rest of that call. Two benefits:

- all the files of a single load come from the same repository state, even if the repo is updated in the meantime;
- all subsequent lookups are done against an immutable commit, so they can be served from the local cache
  (including the "this file does not exist" cache) without any call to the Hub.

The returned [`~huggingface_hub.ResolvedRevision`] is a `str` equal to `revision`, so URLs and error messages keep
mentioning what the user asked for.

This is best effort: local folders are returned as-is, and any failure to resolve the revision (unknown or gated
repo, unreachable Hub, ...) returns `revision` unchanged so that the regular loading path applies, with its own
error messages and its own fallbacks to the cache.

Args:
    path_or_repo_id (`str` or `os.PathLike`, *optional*):
        A repo id on the Hub, or a path to a local directory or `None` (both returned as-is).
    revision (`str`, *optional*):
        The revision to resolve. `None` means the default branch of the repo.
    repo_type (`str`, *optional*):
        The type of the repo (`"model"` if not provided).
    token (`str` or `bool`, *optional*):
        The token to use as HTTP bearer authorization for remote files.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, resolve the revision from the local cache only, without contacting the Hub.
    cache_dir (`str` or `os.PathLike`, *optional*):
        The cache the caller downloads to, where the `revision` -> commit hash mapping is recorded so that a later
        offline load can still resolve `revision` locally.

Returns:
    `Optional[str]`: The resolved revision, or `revision` if it could not be resolved.
)rU   r;   r6   r9   r:   zCould not resolve revision z of Ú.T)Úexc_info)
r?   rc   Úexistsr2   Úresolve_revisionr>   r   rˆ   ÚloggerÚdebug)rS   r;   rU   r:   r9   r6   s   &&$$$$r)   r¼   r¼   ï   sž   € ðX Ò¤"§'¡'§.¡.°×"AÒ"AØˆðÜ‹x×(Ñ(Ü�Ó ØØØØ-×BÐB´Ó1BØð )ó 
ð 	
øô ô ô 	�‰Ð2°8°*¸DÀÐ@QÐQRÐSÐ^bˆÔcØŠðús   ­(A' ÁA' Á'+BÂBc                óL   € V ^8„  d   QhR\         R,          R\         R,          /# )r&   r;   Nr'   r¯   )r(   s   "r)   r*   r*   /  s"   € ÷ 	ñ 	¤#¨¥*ð 	´°tµñ 	r+   c                óŽ   € \        V \        4      '       d   V P                  # V e   \        P                  ! V 4      '       d   V # R# )z¹
The immutable commit hash `revision` points to, if we know it without asking the Hub: either `revision` is a commit
hash already, or it is a revision that `resolve_revision` resolved.
N)rª   r   Úresolvedr   rµ   )r;   s   &r)   Ú_pinned_commit_hashrÂ   /  s=   € ô
 �(Ô,×-Ò-Ø× Ñ Ð ØÒÔ 1× 7Ò 7¸× AÒ AØˆÙr+   c                ót   € V ^8„  d   QhR\         \        P                  ,          R\         R\         R,          /# )r&   rS   Úfilenamer'   N©r>   r?   r@   )r(   s   "r)   r*   r*   ;  s3   € ÷ 9ñ 9Üœ2Ÿ;™;Õ&ð9äð9ô 	ˆ4…Zñ	9r+   c                óH   € \        RRV RV./VB pVe   V^ ,          pV# TpV# )a?	  
Tries to locate a file in a local folder and repo, downloads and cache it if necessary.

Args:
    path_or_repo_id (`str` or `os.PathLike`):
        This can be either:
        - a string, the *model id* of a model repo on huggingface.co.
        - a path to a *directory* potentially containing the file.
    filename (`str`):
        The name of the file to locate in `path_or_repo`.
    cache_dir (`str` or `os.PathLike`, *optional*):
        Path to a directory in which a downloaded pretrained model configuration should be cached if the standard
        cache should not be used.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether or not to force to (re-)download the configuration files and override the cached versions if they
        exist.
    proxies (`dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
        'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
    token (`str` or *bool*, *optional*):
        The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
        when running `hf auth login` (stored in `~/.huggingface`).
    revision (`str`, *optional*, defaults to `"main"`):
        The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
        git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
        identifier allowed by git.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, will only try to load the tokenizer configuration from local files.
    subfolder (`str`, *optional*, defaults to `""`):
        In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
        specify the folder name here.
    repo_type (`str`, *optional*):
        Specify the repo type (useful when downloading from a space for instance).

<Tip>

Passing `token=True` is required when you want to use a private model.

</Tip>

Returns:
    `Optional[str]`: Returns the resolved file (to the cache folder if downloaded from a repo).

Examples:

```python
# Download a model weight from the Hub and cache it.
model_weights_file = cached_file("google-bert/bert-base-uncased", "pytorch_model.bin")
```
rS   Ú	filenamesr1   )Úcached_files)rS   rÄ   ÚkwargsÚfiles   &&, r)   Úcached_filerË   ;  s>   € ôn ÑX¨ÐXÀHÀ:ÐXÐQWÑX€DØÒ&ˆ4��7€DØ€Kð -1€DØ€Kr+   c          !      ó8  € V ^8„  d   QhR\         \        P                  ,          R\        \         ,          R\         \        P                  ,          R,          R\        R\
        \         \         3,          R,          R\        \         ,          R,          R\         R,          R	\        R
\         R\         R,          R\         \
        \         \         3,          ,          R,          R\        R\        R\        R\        R,          R\        \         ,          R,          /# )r&   rS   rÇ   r6   Nr7   r8   r:   r;   r9   r<   rU   r•   Ú _raise_exceptions_for_gated_repoÚ%_raise_exceptions_for_missing_entriesÚ'_raise_exceptions_for_connection_errorsr=   r'   )r>   r?   r@   r\   rA   rB   rC   )r(   s   "r)   r*   r*   w  s  € ÷ I$ñ I$Üœ2Ÿ;™;Õ&ðI$ä”C�yðI$ô ”R—[‘[Õ  4Õ'ðI$ô ð	I$ô
 ”#”s�(�^˜dÕ"ðI$ô ”#�:˜ÕðI$ô �D�jðI$ô ðI$ô ðI$ô �T�zðI$ô ”dœ3¤˜8•nÕ$ tÕ+ðI$ô '+ðI$ô ,0ðI$ô .2ðI$ô �t•ðI$ô" 
Œ#…Y�Õñ#I$r+   c                ó~
  a aaaa€ \        4       '       d    V'       g   \        P                  R4       RpSf   RoV Uu. uF#  p\        P                  P                  SV4      NK%  	  upo\        S 4      o . pS FÎ  p\        P                  P                  S 4      '       g   K*  \        P                  P                  S V4      p\        P                  P                  V4      '       gO   S'       dE   V\        P                  P                  SR4      8w  d    Sf   RMSp\        S  RV RS  R	V R
24      hK½  VP                  V4       KÐ  	  \        P                  P                  S 4      '       d   V'       d   V# R# Vf   \        P                  p\        V\        4      '       d   \        V4      pR VVV VV3R llp\        S4      p. p^ pVeN   V'       gF   S F?  p\!        S VVVV	R7      pVf   K  V^,          pTP                  V\"        J d   RMT4       KA  	  V\%        S4      8X  d	   V! V4      # \'        V
4      p
 \%        S4      ^8X  d2   \)        S V^ ,          \%        S4      ^ 8X  d   RMSV	SVV
VVVVVR7       M\+        S SV	SVV
VVVVVR7        S Uu. uF  p\?        S TTT;'       g    S4      NK  	  ppV! V4      # u upi   \,         Ed]   p\        T\.        4      '       d&   \        T\0        4      '       g   \        S  R24      Th\        T\2        4      '       d   \        S RS  R24      Th\        T\4        4      '       d   \        RTP6                   RS  R24      Th\        T\        4      '       d!   TP8                  \8        P:                  8X  d   h \        T\<        4      '       d   \        T 4      ThS Uu. uF  p\?        S TTT;'       g    ST	4      NK  	  Mu upi pp\@        ;QJ d    R T 4       F  '       d   K   RM	  RM! R T 4       4      '       d   Tu Rp?# \        T\0        4      '       d*   T'       g    Rp?R# \        RS  R\        T4       24      Th\        T\B        4      '       d;   T'       g    Rp?R# S'       d   \        R\        PD                   R24      Th Rp?EL-\        T\F        4      '       d7   \        T\H        4      '       g!   T'       g    Rp?R# \        RS  RT 24      Th\        T\H        4      '       g   Th Rp?EL—Rp?ii ; iu upi )aý  
Tries to locate several files in a local folder and repo, downloads and cache them if necessary.

Args:
    path_or_repo_id (`str` or `os.PathLike`):
        This can be either:
        - a string, the *model id* of a model repo on huggingface.co.
        - a path to a *directory* potentially containing the file.
    filenames (`list[str]`):
        The name of all the files to locate in `path_or_repo`.
    cache_dir (`str` or `os.PathLike`, *optional*):
        Path to a directory in which a downloaded pretrained model configuration should be cached if the standard
        cache should not be used.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether or not to force to (re-)download the configuration files and override the cached versions if they
        exist.
    proxies (`dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
        'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
    token (`str` or *bool*, *optional*):
        The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
        when running `hf auth login` (stored in `~/.huggingface`).
    revision (`str`, *optional*, defaults to `"main"`):
        The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
        git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
        identifier allowed by git. When it pins an immutable commit - a commit hash, or a revision resolved by
        [`~utils.hub.resolve_revision`] - the local cache is trusted (including the "this file does not exist"
        cache) and no call is made to the Hub for files that are already known.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, will only try to load the tokenizer configuration from local files.
    subfolder (`str`, *optional*, defaults to `""`):
        In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
        specify the folder name here.
    repo_type (`str`, *optional*):
        Specify the repo type (useful when downloading from a space for instance).

Private args:
    _raise_exceptions_for_gated_repo (`bool`):
        if False, do not raise an exception for gated repo error but return None.
    _raise_exceptions_for_missing_entries (`bool`):
        if False, do not raise an exception for missing entries but return None.
    _raise_exceptions_for_connection_errors (`bool`):
        if False, do not raise an exception for connection errors but return None.

<Tip>

Passing `token=True` is required when you want to use a private model.

</Tip>

Returns:
    `Optional[str]`: Returns the resolved file (to the cache folder if downloaded from a repo).

Examples:

```python
# Download a model weight from the Hub and cache it.
model_weights_file = cached_file("google-bert/bert-base-uncased", "pytorch_model.bin")
```
z+Offline mode: forcing local_files_only=TrueTNr¡   úconfig.jsonÚmainz& does not appear to have a file named ú#. Checkout 'https://huggingface.co/ú/tree/ú' for available files.c                óx   € V ^8„  d   QhR\         \        R,          ,          R\         \        ,          R,          /# )r&   Úresolved_filesNr'   )r\   r>   )r(   s   "r)   r*   Ú"cached_files.<locals>.__annotate__æ  s,   € ÷ ñ ¤¤c¨D¥jÕ!1ð ´d¼3µiÀ$Õ6Fñ r+   c           
      óF  <€ \         ;QJ d    R  V  4       F  '       g   K   RM	  RM! R  V  4       4      '       d¯   S'       d§   \        SV 4       UUu. uF  w  rVe   K  VNK  	  ppp\        V 4      ^8X  d/   V^ ,          \        P                  P                  SR4      8X  d   R# S
f   RMS
p\        V4      ^8X  d   RV^ ,           2MR. VO5 2p\        S	 RV R	S	 R
V R24      hV  Uu. uF
  qff   K  VNK  	  p p\        V 4      ^ 8X  d   Rp V # T p V # u uppi u upi )c              3   ó(   "  € T F  qR J x € K
  	  R # 5i©Nr1   ©rš   rÊ   s   & r)   r�   Ú1cached_files.<locals>.finalize.<locals>.<genexpr>è  s   é € Ð7© �t�|«ùó   ‚TFNrÑ   rÒ   za file named zfiles named z does not appear to have rÓ   rÔ   rÕ   )ÚanyÚzipÚlenr?   rc   r§   ÚOSError)r×   ÚoriginalrÁ   Úmissing_entriesÚ	revision_ÚmsgrÊ   rÎ   Úfull_filenamesrS   r;   r<   s   &      €€€€€r)   ÚfinalizeÚcached_files.<locals>.finalizeæ  sN  ø€ ç‹3Ñ7©Ó7�3�3Š3Ñ7©Ó7×7Ò7×<aä36°~À~Ô3VôÙ3VÑ/˜XÐZb—�Ñ3Vð ñ ô �>Ó" aÔ'¨O¸AÕ,>Ä"Ç'Á'Ç,Á,ÈyÐZgÓBhÔ,hÙà"*Ò"2™¸ˆIô �Ó'¨1Ô,ð   °Õ 2Ð3Ñ4à#Ð$7 oÑ$7Ð#8Ð9ð ô
 Ø"Ð#Ð#<¸S¸EÐAdÐetÐduÐu{ð  }Fð  |Gð G(ð (óð ñ ,:ÓN©> 4Ÿ$˜$©>ˆÐNä!$ ^Ó!4¸Ô!9˜ˆàÐð @NˆàÐùó/ùò& Os   ÁDÁ DÃ.DÃ8DrW   )
r<   rU   r;   r6   r•   r7   r8   r:   r9   r=   )
Úallow_patternsrU   r;   r6   r•   r7   r8   r:   r9   r=   a   is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with `hf auth login` or by passing `token=<your_token>`ú• is not a valid git identifier (branch name, tag name or commit id) that exists for this model name. Check the model page at 'https://huggingface.co/ú' for available revisions.zPermissionError at z when downloading z¼. Check cache directory permissions. Common causes: 1) another user is downloading the same model (please wait); 2) a previous download was canceled and the lock file needs manual removal.c              3   ó(   "  € T F  qR Jx € K
  	  R # 5irÛ   r1   rÜ   s   & r)   r�   Úcached_files.<locals>.<genexpr>Z  s   é € Ð;©N D˜4Õ«NùrÞ   Fz`You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/z.
zWe couldn't connect to 'zÖ' to load the files, and couldn't find them in the cached files.
Check your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.z:There was a specific connection error when trying to load z:
)%r   r½   Úinfor?   rc   r§   r>   ÚisdirÚisfilerâ   Úappendr   ÚHF_HUB_CACHErª   r   rÂ   r   r   rá   r¬   r   r   rˆ   r   r   r   ÚPermissionErrorrÄ   ÚerrnoÚEROFSÚ
ValueErrorrY   Úallr   ÚENDPOINTr   r   )rS   rÇ   r6   r7   r8   r:   r;   r9   r<   rU   r•   rÍ   rÎ   rÏ   r=   Údeprecated_kwargsrÊ   Úexisting_filesrÄ   rX   rå   rè   r®   Úfile_counterÚer×   rç   s   f&&&&&f&f&&&f&&,          @r)   rÈ   rÈ   w  s"  ü€ ô\ ×Ò×!1Ü�‰ÐAÔBØÐØÒØˆ	ñ AJÓJÁ	¸”b—g‘g—l‘l 9¨dÖ3Á	ÑJ€Nä˜/Ó*€OØ€NÛ"ˆÜ�7‰7�=‰=˜×)Ô)ÜŸG™GŸL™L¨¸(ÓCˆMÜ—7‘7—>‘> -×0Ò0ß8¸XÌÏÉÏÉÐV_ÐanÓIoÔ=oØ*2Ò*:¡À�IÜ!Ø*Ð+Ð+QÐRZÐQ[ð \3Ø3BÐ2CÀ6È)ÈÐTjðlóð ñ
 Ø×!Ñ! -Ö0ñ #ô 
‡w�w‡}�}�_×%Ò%ß!/ˆ~Ð9°TÐ9àÒÜ×*Ñ*ˆ	Ü�)œT×"Ò"Ü˜	“Nˆ	÷ô ô< & hÓ/€KØ€NØ€LØÒ§~Û&ˆHÜ2Ø °YÈÐ`iôˆMð Ô(Ø Õ!�Ø×%Ñ%¨mÔ?OÓ.O¡dÐUbÖcñ 'ð ”s˜>Ó*Ô*Ù˜Ó'Ð'ä  Ó,€JðdÜˆ~Ó !Ô#äØØ˜!•Ü"% i£.°AÔ"5™$¸9Ø#Ø!Ø#Ø%Ø-ØØØ!1Ø%öô ØØ-Ø#Ø!Ø#Ø%Ø-ØØØ!1Ø%öñl 'óá&ˆHô 	" /°8¸YÈ×H_ÐH_ÐW_Ö`Ù&ð ð ñ �NÓ#Ð#ùòi KøôT õ Dä�aÔ0×1Ò1¼*ÀQÌ×:WÒ:WÜØ"Ð#ð $'ð 'óð
 ðô ˜Ô0×1Ò1ÜØ�*ð +à+:Ð*;Ð;UðWóð ð	ô
 ˜œ?×+Ò+ÜØ% a§j¡j \Ð1CÀOÐCTð U^ð ^óð ð	ô
 ˜œ7×#Ò#¨¯©´5·;±;Ô(>ð Ü˜œ:×&Ò&Ü˜Q˜C“/ qÐ(ñ
 +ó
á*�ô & o°xÀÈK×LcÐLcÐ[cÐenÖoÚ*ùò
ˆð 
÷ ‹3Ñ;©NÓ;�3�3Š3Ñ;©NÓ;×;Ò;Ø!Õ!ô �aœ×(Ò(ß3ÝÜð*Ø*9Ð):¸#¼cÀ!»f¸XðGóð ðô ˜Ô2×3Ò3ß:Ý÷ 7ÜØ.¬y×/AÑ/AÐ.Bð C]ð ]óð ð	õ 7ô ˜œ>×*Ò*´:¸aÔAS×3TÒ3Tß:ÝÜÐVÐWfÐVgÐgjÐklÐjmÐnÓoÐuvÐvô ˜AÔ1×2Ò2ØˆGõ 3ûðGDüòLsy   ¿)K
ÉA K ÊK ÊT:Ê5T:ËT7ËC3T2ÏO1Ï$O1Ï0$T2ÐT2Ð2T2Ð3T7Ð9T2Ñ8T2ÒT2Ò$T2Ó3T2Ô*T2Ô2T7c                ó6  € V ^8„  d   QhR\         \        P                  ,          R\         R\         R,          R\        \         \         3,          R,          R\        \         ,          R,          R\        R\         \
        ,          R,          R	\         R,          /# )
r&   Úpath_or_reporÄ   r;   Nr8   r:   r9   r6   rU   )r>   r?   r@   rB   rA   r   )r(   s   "r)   r*   r*   ƒ  s’   € ÷ R!ñ R!ÜœŸ™Õ#ðR!äðR!ô �D�jðR!ô ”#”s�(�^˜dÕ"ð	R!ô
 ”#�:˜ÕðR!ô ðR!ô ”T�z˜DÕ ðR!ô �T�zñR!r+   c          	     ó²  € \         P                  P                  V 4      '       d=   \         P                  P                  \         P                  P	                  W4      4      # \        V VVVVR7      p	\        V	\        4      p
V'       d   V
#  \        4       P                  \        WW'R7      \        V\        4       R7      R^
R7      p \%        T4       R#   \        P                   d    h \        P                  \        P                   \"        3 d    T
u # i ; i  \&         d-   p\(        P+                  T4       \-        T  RT  R24      ThR	p?i\.         d*   p\(        P+                  T4       \-        T  R
24      ThR	p?i\0         d-   p\(        P+                  T4       \-        T RT  R24      ThR	p?i\2         d     R# \4         d    T
u # i ; i)aƒ  
Checks if a repo contains a given file without downloading it. Works for remote repos and local folders.

If offline mode is enabled, checks if the file exists in the cache.

<Tip warning={false}>

This function will raise an error if the repository `path_or_repo` is not valid or if `revision` does not exist for
this repo, but will return False for regular connection errors.

</Tip>
)r[   rÄ   r;   rU   r6   )rÄ   r;   rU   )r:   r•   F)ÚheadersÚfollow_redirectsÚtimeoutTzN is a gated repository. Make sure to request access at https://huggingface.co/z~ and pass a token having permission to this repo either by logging in with `hf auth login` or by passing `token=<your_token>`.NzE is not a local folder or a valid repository name on 'https://hf.co'.rë   rì   )r?   rc   rð   rñ   r§   r   rª   r>   r   Úheadr   r   r¬   r   Ú
ProxyErrorÚConnectErrorÚTimeoutExceptionr   r   r   r½   Úerrorrâ   r   r   r   r   )rÿ   rÄ   r;   r8   r:   r9   r6   rU   rú   Úcached_pathÚhas_file_in_cacheÚresponserý   s   &&&&&$$$,    r)   Úhas_filer  ƒ  sÁ  € ô2 
‡w�w‡}�}�\×"Ò"Ü�w‰w�~‰~œbŸg™gŸl™l¨<ÓBÓCÐCô )ØØØØØô€Kô # ;´Ó4Ð÷ Ø Ð ð!Ü“=×%Ñ%Ü�|ÀÔ_Ü$¨5¼_Ó=NÔOØ"Øð	 &ó 
ˆð!Ü˜HÔ%Ùøô ×Ñô àÜ×Ñ¤× 6Ñ 6Ô8LÐMô !Ø Ò ð!ûô ô Ü�‰�QŒÜØˆnð &Ø&2 ^ð 4RðRó
ð ð		ûô
 #ô uÜ�‰�QŒÜ˜˜Ð&kÐlÓmÐstÐtûÜ ô Ü�‰�QŒÜØˆjð KØKWÈ.ÐXrðtó
ð ð	ûô ô ÚÜô !à Ò ð!úsl   Â;C Ã	D Ã=DÄDÄDÄGÄ('EÅGÅGÅ$FÆGÆGÆ'F6Æ6GÇGÇGÇGÇGc                   óˆ   a € ] tR tRt o RtV 3R lR ltRV 3R lR lltR	 tR
RRRRRRRRRRRRRRR/V 3R lR lltRt	V t
R# )ÚPushToHubMixiniØ  zO
A Mixin containing the functionality to push a model or tokenizer to the hub.
c                óD   <€ V ^8„  d   QhRS[ S[P                  ,          /# )r&   Úworking_dirrÅ   )r(   rD   s   "€r)   r*   ÚPushToHubMixin.__annotate__Ý  s    ø€ ÷ dñ d±±r·{±{Õ1Bñ dr+   c           
     óÌ   € \         P                  ! V4       Uu/ uF?  q"\         P                  P                  \         P                  P	                  W4      4      bKA  	  up# u upi )zC
Returns the list of files with their last modification timestamp.
)r?   Úlistdirrc   Úgetmtimer§   )Úselfr  Úfs   && r)   Ú_get_files_timestampsÚ$PushToHubMixin._get_files_timestampsÝ  sI   € ô LNÏ:Ê:ÐVaÔKbÓcÑKbÀa”2—7‘7×#Ñ#¤B§G¡G§L¡L°Ó$@ÓAÒAÑKbÑcÐcùÒcs   ™AA!NFc                óÌ   <€ V ^8„  d   QhRS[ S[P                  ,          RS[ RS[S[ S[3,          RS[ R,          RS[S[ ,          R,          RS[RS[ R,          R	S[ R,          /# )
r&   r  r[   Úfiles_timestampsÚcommit_messageNr:   Ú	create_prr;   Úcommit_description)r>   r?   r@   rB   ÚfloatrA   )r(   rD   s   "€r)   r*   r  ã  sŒ   ø€ ÷ M
ñ M
á™2Ÿ;™;Õ&ðM
ñ ðM
ñ ™s¡E˜zÕ*ð	M
ñ
 ˜d�
ðM
ñ ‘c�z˜DÕ ðM
ñ ðM
ñ ˜•*ðM
ñ   $�JñM
r+   c	                óD  € Vf°   RV P                   P                  9   d   RpM‘RV P                   P                  9   d   RpMsRV P                   P                  9   d   RpMURV P                   P                  9   d   R	pM7R
V P                   P                  9   d   RpMRV P                   P                   2p\        P                  ! V4       U	u. uFT  p	W“9  gJ   \        P                  P                  \        P                  P                  W4      4      W9,          8”  g   KR  V	NKV  	  p
p	V
 U	u. uF‹  p	\        P                  P                  \        P                  P                  W4      4      '       gE   \        P                  P                  \        P                  P                  W4      4      '       g   K‰  V	NK�  	  p
p	. pV
 EF  p\        P                  P                  \        P                  P                  W4      4      '       d”   \        P                  ! \        P                  P                  W4      4       FZ  p	VP                  \        \        P                  P                  WV	4      \        P                  P                  WÉ4      R7      4       K\  	  KÙ  VP                  \        \        P                  P                  W4      VR7      4       EK  	  Ve5   VP                  R4      '       g    \        4       P                  W'VRR7       \"        P%                  RV RRP                  V
4       24       \        4       P'                  VVVVVVVR7      # u up	i u up	i   \         d/   pTP                  P                   R8X  d   T'       d    Rp?L‡h Rp?ii ; i)zX
Uploads all modified files in `working_dir` to `repo_id`, based on `files_timestamps`.
NÚModelzUpload modelÚConfigzUpload configÚ	TokenizerzUpload tokenizerÚFeatureExtractorzUpload feature extractorÚ	ProcessorzUpload processorzUpload )Úpath_or_fileobjr^   zrefs/prT)r[   Úbranchr:   Úexist_oki“  z!Uploading the following files to z: Ú,)r[   Ú
operationsr  r  r:   r  r;   )Ú	__class__rF   r?   r  rc   r  r§   rñ   rð   rò   r   Ú
startswithr2   Úcreate_branchr   r  Ústatus_coder½   rï   Úcreate_commit)r  r  r[   r  r  r:   r  r;   r  r  Úmodified_filesr)  rÊ   rý   s   &&&&&&&&&     r)   Ú_upload_modified_filesÚ%PushToHubMixin._upload_modified_filesã  sÉ  € ð Ò!Ø˜$Ÿ.™.×1Ñ1Ô1Ø!/‘Ø˜TŸ^™^×4Ñ4Ô4Ø!0‘Ø §¡× 7Ñ 7Ô7Ø!3‘Ø# t§~¡~×'>Ñ'>Ô>Ø!;‘Ø §¡× 7Ñ 7Ô7Ø!3‘à#*¨4¯>©>×+BÑ+BÐ*CÐ!D�ô —Z’Z Ô,ó
á,�ØÔ(¬B¯G©G×,<Ñ,<¼R¿W¹W¿\¹\È+Ó=YÓ,ZÐ]mÕ]pÑ,p÷ ˆAÙ,ð 	ð 
ñ $ó
á#�Ü�w‰w�~‰~œbŸg™gŸl™l¨;Ó:×;Ò;¼r¿w¹w¿}¹}ÌRÏWÉWÏ\É\ÐZeÓMi×?j÷ ˆAÙ#ð 	ð 
ð ˆ
ä"ˆDÜ�w‰w�}‰}œRŸW™WŸ\™\¨+Ó<×=Ò=äŸš¤B§G¡G§L¡L°Ó$CÖD�AØ×%Ñ%Ü*Ü,.¯G©G¯L©L¸ÈAÓ,NÔ]_×]dÑ]d×]iÑ]iÐjnÓ]rôöó Eð ×!Ñ!Ü&´r·w±w·|±|ÀKÓ7VÐeiÔj÷ñ #ð Ò¨×(;Ñ(;¸I×(FÒ(Fð	Ü“×&Ñ&¨wÈuÐ_cÐ&Ôdô 	�‰Ð7¸°yÀÀ3Ç8Á8ÈNÓC[ÐB\Ð]Ô^Ü‹x×%Ñ%ØØ!Ø)Ø1ØØØð &ó 
ð 	
ùòU
ùò
øô2 "ô Ø—:‘:×)Ñ)¨SÔ0·Yô àûðús8   ÃAMÄ MÄ,BM!Æ7M!Ë6M& Í&NÍ1"NÎNÎNc                óF   € \        V P                  P                   R 24      h)z7 must implement `save_pretrained` to use `push_to_hub`.)ÚNotImplementedErrorr*  rF   )r  ÚargsrÉ   s   &*,r)   Úsave_pretrainedÚPushToHubMixin.save_pretrained2  s    € ä! T§^¡^×%<Ñ%<Ð$=Ð=tÐ"uÓvÐvr+   r  r  Úprivater:   r;   r  Úmax_shard_sizeÚ50GBÚtagsc                óè   <€ V ^8„  d   QhRS[ RS[ R,          RS[ R,          RS[R,          RS[S[ ,          R,          RS[ R,          RS[R	S[S[ ,          R,          R
S[S[ ,          R,          RS[ /
# )r&   r[   r  Nr  r7  r:   r;   r  r8  r:  r'   )r>   rA   Úintr\   )r(   rD   s   "€r)   r*   r  6  s¦   ø€ ÷ Pñ PáðPñ
 ˜d�
ðPñ   $�JðPñ ˜•ðPñ ‘c�z˜DÕ ðPñ ˜•*ðPñ ðPñ ™c�	 DÕ(ðPñ ‘3�i˜$ÕðPñ 
ñPr+   c               ó”  € \        4       P                  WVRR7      P                  p\        WVR7      p
\        P
                  ! 4       ;_uu_ 4       pV P                  W¸R7       V
P                  \        P                  P                  VR4      4       V P                  VV/ VVVVVR7      uuRRR4       #   + '       g   i     R# ; i)u{  
Upload the {object_files} to the ðŸ¤— Model Hub.

Parameters:
    repo_id (`str`):
        The name of the repository you want to push your {object} to. It should contain your organization name
        when pushing to a given organization.
    commit_message (`str`, *optional*):
        Message to commit while pushing. Will default to `"Upload {object}"`.
    commit_description (`str`, *optional*):
        The description of the commit that will be created
    private (`bool`, *optional*):
        Whether to make the repo private. If `None` (default), the repo will be public unless the organization's default is private. This value is ignored if the repo already exists.
    token (`bool` or `str`, *optional*):
        The token to use as HTTP bearer authorization for remote files. If `True` (default), will use the token generated
        when running `hf auth login` (stored in `~/.huggingface`).
    revision (`str`, *optional*):
        Branch to push the uploaded files to.
    create_pr (`bool`, *optional*, defaults to `False`):
        Whether or not to create a PR with the uploaded files or directly commit.
    max_shard_size (`int` or `str`, *optional*, defaults to `"50GB"`):
        Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
        will then be each of size lower than this size. If expressed as a string, needs to be digits followed
        by a unit (like `"5MB"`).
    tags (`list[str]`, *optional*):
        List of tags to push on the Hub.

Examples:

```python
from transformers import {object_class}

{object} = {object_class}.from_pretrained("google-bert/bert-base-cased")

# Push the {object} to your namespace with the name "my-finetuned-bert".
{object}.push_to_hub("my-finetuned-bert")

# Push the {object} to an organization with the name "my-finetuned-bert".
{object}.push_to_hub("huggingface/my-finetuned-bert")
```
T)r7  r:   r'  ©r:   )r8  z	README.md)r  r  r:   r  r;   r  N)r2   Úcreate_repor[   Úcreate_and_tag_model_cardÚtempfileÚTemporaryDirectoryr5  Úsaver?   rc   r§   r0  )r  r[   r  r  r7  r:   r;   r  r8  r:  Ú
model_cardÚtmp_dirs   &&$$$$$$$$  r)   Úpush_to_hubÚPushToHubMixin.push_to_hub6  s®   € ôt “(×&Ñ& wÀuÐW[Ð&Ó\×dÑdˆô /¨wÀEÔJˆ
ä×(Ò(×*Ô*¨gà× Ñ  Ð ÔHð �O‰OœBŸG™GŸL™L¨°+Ó>Ô?ð ×.Ñ.ØØØ!#Ø-ØØ#Ø!Ø#5ð /ó 	÷ +×*×*Ó*ús   ÁAB6Â6C	r1   )NNFNN)rF   rG   rH   rI   Ú__doc__r  r0  r5  rF  rK   rL   rM   s   @r)   r  r  Ø  s“   ø‡ € ñ÷dð d÷M
ò M
ò^wðPð
 &*ðPð *.ðPð  $ðPð $(ðPð  $ðPð  ðPð ,2ðPð "&÷P÷ Pð Pr+   r  c                ó:   € V ^8„  d   QhR\         \        ,          /# )r&   Úsize)r<  r>   )r(   s   "r)   r*   r*   ‰  s   € ÷ kñ k¤3¬¥9ñ kr+   c                óÌ  € \        V \        4      '       d   V # V P                  4       P                  R4      '       d   \        V RR
 4      R,          # V P                  4       P                  R4      '       d   \        V RR
 4      R,          # V P                  4       P                  R4      '       d   \        V RR
 4      R,          # V P                  4       P                  R4      '       d8   \        V RR 4      R,          pV P                  R4      '       d
   V^,          # T# V P                  4       P                  R4      '       d8   \        V RR 4      R,          pV P                  R4      '       d
   V^,          # T# V P                  4       P                  R4      '       d8   \        V RR 4      R,          pV P                  R4      '       d
   V^,          # T# \	        R	4      h)a  
Converts a size expressed as a string with digits an unit (like `"5MB"`) to an integer (in bytes).

Args:
    size (`int` or `str`): The size to convert. Will be directly returned if an `int`.

Example:
```py
>>> convert_file_size_to_int("1MiB")
1048576
```
ÚGIBNÚMIBÚKIBÚGBÚbÚMBÚKBzR`size` is not in a valid format. Use an integer followed by the unit, e.g., '5GB'.éýÿÿÿi   @i   i   éþÿÿÿi Êš;i@B iè  )rª   r<  r©   rd   r÷   )rJ  Úint_sizes   & r)   Úconvert_file_size_to_intrV  ‰  s~  € ô �$œ×ÒØˆØ‡z�zƒ|×Ñ˜U×#Ò#Ü�4˜˜�9‹~ Õ'Ð'Ø‡z�zƒ|×Ñ˜U×#Ò#Ü�4˜˜�9‹~ Õ'Ð'Ø‡z�zƒ|×Ñ˜U×#Ò#Ü�4˜˜�9‹~ Õ'Ð'Ø‡z�zƒ|×Ñ˜T×"Ò"Ü�t˜C˜R�y“> UÕ+ˆØ $§¡¨c× 2Ò 2ˆx˜1�}Ð@¸Ð@Ø‡z�zƒ|×Ñ˜T×"Ò"Ü�t˜C˜R�y“> UÕ+ˆØ $§¡¨c× 2Ò 2ˆx˜1�}Ð@¸Ð@Ø‡z�zƒ|×Ñ˜T×"Ò"Ü�t˜C˜R�y“> UÕ+ˆØ $§¡¨c× 2Ò 2ˆx˜1�}Ð@¸Ð@Ü
ÐiÓ
jÐjr+   c                óä  € \         P                  P                  V4      '       g   \        RV RV  R24      h\	        VRR7      ;_uu_ 4       p\
        P                  ! VP                  4       4      pRRR4       \        \        XR,          P                  4       4      4      pVR,          p\        VR,          P                  4       4      VR	&   VR,          P                  4       VR&   \         P                  P                  V 4      '       d3   V Uu. uF#  p\         P                  P                  W	V4      NK%  	  ppWï3# \!        V VVVVVVVVV	V
R
7      pVV3#   + '       g   i     Lð; iu upi )a§  
For a given model:

- download and cache all the shards of a sharded checkpoint if `pretrained_model_name_or_path` is a model ID on the
  Hub
- returns the list of paths to all the shards, as well as some metadata.

For the description of each arg, see [`PreTrainedModel.from_pretrained`]. `index_filename` is the full path to the
index (downloaded and cached if `pretrained_model_name_or_path` is a model ID on the Hub).
zCan't find a checkpoint index (z) in r¹   zutf-8)ÚencodingNÚ
weight_mapÚmetadataÚall_checkpoint_keys)	r6   r7   r8   r9   r:   r•   r;   r<   r=   )r?   rc   rñ   r÷   Úopenr†   r‰   ÚreadÚsortedÚsetÚvaluesr\   ÚkeysÚcopyrð   r§   rÈ   )Úpretrained_model_name_or_pathÚindex_filenamer6   r7   r8   r9   r:   r•   r;   r<   r=   rú   r  ÚindexÚshard_filenamesÚsharded_metadataÚcached_filenamess   &&&&&&&&&&&,     r)   Úget_checkpoint_shard_filesri  ª  sQ  € ô0 �7‰7�>‰>˜.×)Ò)ÜÐ:¸>Ð:JÈ%ÐPmÐOnÐnoÐpÓqÐqä	ˆn w×	/Õ	/°1Ü—
’
˜1Ÿ6™6›8Ó$ˆ÷ 
0ô œS  |Õ!4×!;Ñ!;Ó!=Ó>Ó?€OØ˜ZÕ(ÐÜ.2°5¸Õ3F×3KÑ3KÓ3MÓ.NÐÐ*Ñ+Ø%*¨<Õ%8×%=Ñ%=Ó%?Ð�\Ñ"ô 
‡w�w‡}�}Ð2×3Ò3Ù^mÓnÑ^mÐYZœ2Ÿ7™7Ÿ<™<Ð(EÐRSÖTÑ^mˆÐnØÐ0Ð0ô $Ø%ØØØ%ØØ)ØØØØØôÐð Ð-Ð-Ð-÷; 
0×	/üò os   Á%EÄ)E-ÅE*	c                óz   € V ^8„  d   QhR\         R\        \         ,          R,          R\         R,          R\        /# )r&   r[   r:  Nr:   r'   )r>   r\   r	   )r(   s   "r)   r*   r*   å  s9   € ÷ ñ ¤sð ´$´sµ)¸dÕ2Bð ÔRUÐX\ÕR\ð Ôhqñ r+   c                óž  €  \         P                  ! WR7      pVet   VP
                  P                  f   . VP
                  n        V FD  pWcP
                  P                  9  g   K  VP
                  P                  P                  V4       KF  	  V#   \         d0    Rp\        Tf   . MTRR7      p\         P                  ! YTR7      p L²i ; i)aq  
Creates or loads an existing model card and tags it.

Args:
    repo_id (`str`):
        The repo_id where to look for the model card.
    tags (`list[str]`, *optional*):
        The list of tags to add in the model card
    token (`str`, *optional*):
        Authentication token, obtained with `huggingface_hub.HfApi.login` method. Will default to the stored token.
r>  u†   This is the model card of a ðŸ¤— transformers model that has been pushed on the Hub. This model card has been automatically generated.r-   )r:  r.   )Úmodel_description)r	   Úloadr   r
   Úfrom_templateÚdatar:  rò   )r[   r:  r:   rD  rl  Ú	card_dataÚ	model_tags   &&&    r)   r@  r@  å  s³   € ð]ä—^’^ GÔ9ˆ
ð Òà�?‰?×ÑÒ'Ø#%ˆJ�O‰OÔ ÛˆIØ§¡× 4Ñ 4Ö4Ø—‘×$Ñ$×+Ñ+¨IÖ6ñ ð Ðøô ô ]ð eÐÜ!¨Tª\¡r¸tÐR`Ôaˆ	Ü×,Ò,¨YÔ\Š
ð	]ús   ‚B Â7CÃCc                   óX   a € ] tR tRt o RtRV 3R lR lltR tR tV 3R lR	 ltR
t	V t
R# )ÚPushInProgressi  zb
Internal class to keep track of a push in progress (which might contain multiple `Future` jobs).
Nc                óF   <€ V ^8„  d   QhRS[ P                  R,          RR/# )r&   ÚjobsNr'   )r   ÚFuture)r(   rD   s   "€r)   r*   ÚPushInProgress.__annotate__
  s$   ø€ ÷ 1ñ 1™WŸ^™^¨dÕ2ð 1¸dñ 1r+   c                ó.   € Vf
   . V n         R # TV n         R # rÛ   ©ru  )r  ru  s   &&r)   Ú__init__ÚPushInProgress.__init__
  s   € Øš,�BˆŽ	¨DˆŽ	r+   c                ó’   € \         ;QJ d&    R  V P                   4       F  '       d   K   R# 	  R# ! R  V P                   4       4      # )c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5irÛ   )Údone)rš   Újobs   & r)   r�   Ú)PushInProgress.is_done.<locals>.<genexpr>  s   é € Ð3© #—8‘8—:�:«ùs   ‚FT)rø   ru  ©r  s   &r)   Úis_doneÚPushInProgress.is_done  s3   € ß‹sÑ3¨¯ªÓ3�sŒsÐ3ŠsÐ3ˆsÑ3¨¯ªÓ3Ó3Ð3r+   c                óF   € \         P                  ! V P                  4       R # rÛ   )r   Úwaitru  r�  s   &r)   Úwait_until_doneÚPushInProgress.wait_until_done  s   € Ü�Š�T—Y‘YÖr+   c                ó   <€ V ^8„  d   QhRR/# )r&   r'   Nr1   )r(   rD   s   "€r)   r*   rw    s   ø€ ÷ 
ñ 
˜ñ 
r+   c                ó²   € V P                    Uu. uF5  pVP                  4       '       d   K  VP                  4       '       d   K3  VNK7  	  upV n         R # u upi rÛ   )ru  Úcancelr~  )r  r  s   & r)   rŠ  ÚPushInProgress.cancel  sG   € ð —y’yó
á �à—J‘J—Lô ð %(§H¡H§J÷ ˆCÙ ñ
ˆŽ	ùò 
s   �A¬AÁAry  rÛ   )rF   rG   rH   rI   rH  rz  r‚  r†  rŠ  rK   rL   rM   s   @r)   rs  rs    s(   ø‡ € ñ÷1ò 1ò4ò ÷
ö 
r+   rs  c                óN   € V ^8„  d   Qh/ ^ \         9   d   \        R,          ;R&   # )r&   Nr0   )Ú__conditional_annotations__r   )r(   s   "r)   r*   r*      s$   € ÷ ñ ÷z Ò Œ��Ñ ò{r+   )NNNrÛ   )NFNNNFr¡   NNTTTN)	NFNFNNNr¡   N)NN)Vr�  rH  rõ   r†   r?   r²   r£   rA  Ú
concurrentr   Úpathlibr   Útypingr   Úuuidr   Úhuggingface_hubr   r   r   r	   r
   r   r   r   r   r   r   r   Úhuggingface_hub.file_downloadr   Úhuggingface_hub.utilsr   r   r   r   r   r   r   r   r   r   r   r¡   r   r   Úimport_utilsr    r!   r"   r#   Ú#LEGACY_PROCESSOR_CHAT_TEMPLATE_FILEÚCHAT_TEMPLATE_FILErb   Ú
get_loggerrF   r½   r0   r2   r4   rŠ   rc   r§   ÚHF_HOMErO   Ú TRANSFORMERS_DYNAMIC_MODULE_NAMEÚhexr¥   ÚS3_BUCKET_PREFIXÚCLOUDFRONT_DISTRIB_PREFIXrY   ro   r“   r¬   r¶   r¼   rÂ   rË   rÈ   r  r  rV  ri  r@  rs  r*   )r�  s   @r)   Ú<module>rž     sË  øðöó Û Û 	Û 	Û 
Û Ý Ý Ý Ý ÷÷ ÷ ó õ <÷÷ ÷ ñ ÷ #÷ó ð ';Ð #Ø*Ð Ø/Ð ð 
×	Ò	˜HÓ	%€ð €Ó õô�Y eõ ð —9’9Ð/°·±·±¸i×>OÑ>OÐQZÓ1[Ó\Ð Ø#9Ð  Ù‹W�[‰[€
àHÐ Ø8Ð ÷ð *rð  ð	*rð
 !ð*rð  $÷*ròZ÷6õ*Iñ=ð !ð	=ð
  $ð=ð #ð=ð +/÷=ð =õ@	õ9÷xI$ñXR!ð #ðR!ð $(ðR!ð !÷R!ð R!÷jnñ nõbkôB8.÷v÷@
ó 
r+   