+
    QV-j¿›  ã                   óä  a € R6 tQ0 t R 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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 ^ RI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-H.t.H/t/H0t0 Rt1Rt2Rt3]+Ph                  ! ]54      t6Rs7] ^ k R R lt8 ! R R]RR7      t9]Pt                  ! R]Pv                  Py                  ]Pz                  R4      4      t>Rt?]! 4       P€                  tARtBRtCR7R R lltDRRRRRR/R R lltER  tFR8R! R" lltGR# R$ ltHR% R& ltIR9R' R( lltJR7R)RRRR*R/R+ R, llltK ! R- R.4      tLR/ R0 ltMR:R1 ltNR;R2 R3 lltO ! R4 R54      tPR# )<z?
Hub utilities: utilities related to download and cache models
N)Úfutures)ÚPath)Ú	TypedDict)Úuuid4)Ú_CACHED_NO_EXISTÚCommitOperationAddÚHfApiÚ	ModelCardÚModelCardDataÚ	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)Ú__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   "Úg/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/transformers/utils/hub.pyÚ__annotate__r(   L   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_apir0   L   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	&   S[R,          ;R
&   # )r$   NÚ	cache_dirÚforce_downloadÚproxiesÚlocal_files_onlyÚtokenÚrevisionÚ	subfolderÚcommit_hashÚ
tqdm_class)ÚstrÚosÚPathLikeÚboolÚdictÚtype)r&   Ú__classdict__s   "€r'   r(   ÚDownloadKwargs.__annotate__[   s¥   ø‡ ‚ Ù‘R—[‘[Õ  4Õ'Ñ'ñ áÑñ ñ ‘#‘s�(�^˜dÕ"Ñ"ñ ñ Ññ	 ñ
 ‘�:˜ÕÑñ ñ �D�jÑñ ñ �Nñ ñ �t•Ññ ñ �t•Ñò r)   r/   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©rC   s   @r'   r2   r2   [   s   ø‡ ‡ „ r)   r2   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_filenamer4   Nr9   Ú	repo_type)r=   r   )r&   s   "r'   r(   r(   s   sK   € ÷ ñ Üðäðô ”T�z˜DÕ ðô �D�jð	ô
 �T�zñr)   c                 óD   € \        WW#VR 7      pVe   V\        8w  d   V# R# )©r4   r9   rT   N)r   r   )rR   rS   r4   r9   rT   Úresolved_files   &&&&& r'   Ú_get_cache_file_to_returnrX   s   s/   € ô +Ø°)ÐZcô€Mð Ò  ]Ô6FÔ%FØÐÙr)   r9   r4   r8   c                ó¶   € V ^8„  d   QhR\         R\        R\         R,          R\         R,          R\         \        ,          R,          R\        \         ,          /# )r$   Úrepo_idr7   r9   Nr4   r8   r%   )r=   r@   Ú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)rZ   r9   Úpath_in_repoÚ	recursiver8   z.jinjaÚ/T)rZ   r9   r4   r7   )r0   Úlist_repo_treeÚCHAT_TEMPLATE_DIRÚpathÚendswithÚremoveprefixr   r   r   r   r   ÚhttpxÚNetworkErrorr   r   r   Úis_dirÚiterdirÚis_fileÚnameÚstem)rZ   r7   r9   r4   r8   Ú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)	re   Ú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%   )rA   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_   Nr/   ©Ú.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˜   r/   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   Ú
isinstancerA   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$   rW   Nr;   r%   )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)rW   r;   r±   s   && r'   Úextract_commit_hashr´   à   sq   € ð Ò Ò 7ØÐÜœ˜]Ó+×4Ñ4Ó6Ó7€MÜ�YŠYÐ,¨mÓ<€FØ‚~ÙØ—-‘-“/ !Õ$€KÜ+×1Ò1°+×>Ò>ˆ;ÐHÀDÐHr)   c                ót   € V ^8„  d   QhR\         \        P                  ,          R\         R\         R,          /# )r$   rR   Ú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")
```
rR   Ú	filenamesr/   )Úcached_files)rR   r¶   ÚkwargsÚfiles   &&, r'   Úcached_filer½   î   s>   € ôn ÑX¨ÐXÀHÀ:ÐXÐQWÑX€DØÒ&ˆ4��7€DØ€Kð -1€DØ€Kr)   c          #      óR  € 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\        \         ,          R,          /# )r$   rR   r¹   r4   Nr5   r6   r8   r9   r7   r:   rT   r•   Ú _raise_exceptions_for_gated_repoÚ%_raise_exceptions_for_missing_entriesÚ'_raise_exceptions_for_connection_errorsÚ_commit_hashr<   r%   )r=   r>   r?   r[   r@   rA   rB   )r&   s   "r'   r(   r(   *  s!  € ÷ ñ Üœ2Ÿ;™;Õ&ðä”C�yðô ”R—[‘[Õ  4Õ'ðô ð	ô
 ”#”s�(�^˜dÕ"ðô ”#�:˜Õðô �D�jðô ðô ðô �T�zðô ”dœ3¤˜8•nÕ$ tÕ+ðô '+ðô ,0ðô .2ðô ˜•*ðô  �t•ð!ô$ 
Œ#…Y�Õñ%r)   c                ó<  € \        4       '       d    V'       g   \        P                  R4       RpVf   RpV Uu. uF#  p\        P                  P                  VV4      NK%  	  pp\        V 4      p . pV FÎ  p\        P                  P                  V 4      '       g   K*  \        P                  P                  V V4      p\        P                  P                  V4      '       gO   V'       dE   V\        P                  P                  VR4      8w  d    Vf   RMTp\        V  RV RV  R	V R
24      hK½  VP                  V4       KÐ  	  \        P                  P                  V 4      '       d   V'       d   V# R# Vf   \        P                  p\        V\        4      '       d   \        V4      p. p^ pVep   V'       gh   V Fa  p\        V VW.V	R7      pVf   K  V\         Jd   V^,          pVP                  V4       K>  V'       g   V^,          pKQ  \        RV RV  R24      h	  V\#        V4      8X  d   \#        V4      ^ 8”  d   V# R# \%        V
4      p
 \#        V4      ^8X  d2   \'        T V^ ,          \#        V4      ^ 8X  d   RMTV	VVV
VVVVVR7       M\)        V VV	VVV
VVVVVR7        V Uu. uF  p\9        V VW&4      NK  	  pp\D        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d°   V'       d¨   \G        VV4       UUu. uF  w  ppVe   K  VNK  	  ppp\#        V4      ^8X  d/   V^ ,          \        P                  P                  VR4      8X  d   R# Vf   RMTp\#        V4      ^8X  d   R V^ ,           2MR!. VO5 2p\        V  R"V RV  R	V R
24      hV Uu. uF  pVf   K	  VNK  	  pp\#        V4      ^ 8X  d   RpV# TpV# u upi   \*         Ed   p\        T\,        4      '       d&   \        T\.        4      '       g   \        T  R24      Th\        T\0        4      '       d   \        T RT  R24      Th\        T\2        4      '       d   \        RTP4                   RT  R24      Th\        T\6        4      '       d   \        T 4      ThT Uu. uF  p\9        T TY&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\.        4      '       d*   T'       g    Rp?R# \        RT  R\        T4       24      Th\        T\<        4      '       d;   T'       g    Rp?R# T'       d   \        R\        P>                   R24      Th Rp?ELñ\        T\@        4      '       d7   \        T\B        4      '       g!   T'       g    Rp?R# \        RT  RT 24      Th\        T\B        4      '       g   Th Rp?EL[Rp?ii ; iu upi u upp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.
    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.
    _commit_hash (`str`, *optional*):
        passed when we are chaining several calls to various files (e.g. when loading a tokenizer or
        a pipeline). If files are cached for this commit hash, avoid calls to head and get from the cache.

<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¡   zconfig.jsonÚmainz& does not appear to have a file named z#. Checkout 'https://huggingface.co/z/tree/z' for available files.rV   zCould not locate z inside Ú.)
r:   rT   r9   r4   r•   r5   r6   r8   r7   r<   )
Úallow_patternsrT   r9   r4   r•   r5   r6   r8   r7   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©Nr/   ©rš   r¼   s   & r'   r�   Úcached_files.<locals>.<genexpr>ï  s   é € Ð;©N D˜4Õ«Nùó   ‚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:
c              3   ó(   "  € T F  qR J x € K
  	  R # 5irÊ   r/   rË   s   & r'   r�   rÌ     s   é € Ð
3¡N˜D�4�<£NùrÍ   za file named zfiles named z does not appear to have )$r   ÚloggerÚinfor>   rb   r§   r=   ÚisdirÚisfileÚOSErrorÚappendr   ÚHF_HUB_CACHErª   r   r   r   Úlenr¬   r   r   rˆ   r   r   r   ÚPermissionErrorr¶   Ú
ValueErrorrX   Úallr   ÚENDPOINTr   r   ÚanyÚzip)rR   r¹   r4   r5   r6   r8   r9   r7   r:   rT   r•   r¿   rÀ   rÁ   rÂ   r<   Údeprecated_kwargsr¼   Úfull_filenamesÚexisting_filesr¶   rW   Ú	revision_Úfile_counterÚeÚresolved_filesÚoriginalÚresolvedÚmissing_entriesÚmsgs   &&&&&&&&&&&&&&&&,             r'   rº   rº   *  s=  € ô` ×Ò×!1Ü�‰ÐAÔBØÐØÒØˆ	ñ AJÓJÁ	¸”b—g‘g—l‘l 9¨dÖ3Á	€NÐJä˜/Ó*€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ˆ	à€NØ€LØÒ¯Û&ˆHä2Ø °YÐajôˆMð Ô(Ø Ô(8Ó8Ø  AÕ%�LØ"×)Ñ)¨-Ö8ß>Ø  AÕ%’Lä!Ð$5°h°Z¸xÈÐGXÐXYÐ"ZÓ[Ð[ñ 'ð ”s˜>Ó*Ô*Ü!$ ^Ó!4°qÔ!8ˆ~ÐB¸dÐBä  Ó,€Jð]Üˆ~Ó !Ô#äØØ˜!•Ü"% i£.°AÔ"5™$¸9Ø#Ø!Ø#Ø%Ø-ØØØ!1Ø%öô ØØ-Ø#Ø!Ø#Ø%Ø-ØØØ!1Ø%öñ\ cqóÙbpÐV^Ô! /°8¸YÖQÑbpð ð ÷ ƒsÑ
3¡NÓ
3‡s‡s‚sÑ
3¡NÓ
3×3Ò3×8]Ü>AÀ.ÐR`Ô>aÔvÑ>aÑ(:¨°(ÐemŸ8˜8Ñ>aˆÑväˆ~Ó !Ô#¨¸Õ(:¼b¿g¹g¿l¹lÈ9ÐVcÓ>dÔ(dÙà&Ò.‘F°Hˆ	ä47¸Ó4HÈAÔ4Mˆm˜O¨AÕ.Ð/Ñ0ÐUaÐbuÐdsÑbuÐavÐSwð 	ô ØÐÐ8¸¸Ð=`ÐapÐ`qÐqwð  yBð  xCð C$ð $ó
ð 	
ñ (6ÓJ¡~˜t¸—d�d¡~€NÐJä  Ó0°AÔ5�T€NàÐð <J€NàÐùòQ Køôb õ =ä�aÔ0×1Ò1¼*ÀQÌ×:WÒ:WÜØ"Ð#ð $'ð 'óð
 ðô ˜Ô0×1Ò1ÜØ�*ð +à+:Ð*;Ð;UðWóð ð	ô
 ˜œ?×+Ò+ÜØ% a§j¡j \Ð1CÀOÐCTð U^ð ^óð ð	ô
 ˜œ:×&Ò&Ü˜Q˜C“/ qÐ(ñ
 +ó
á*�ô & o°xÀÐV_Ö`Ú*ùò
ˆð 
÷ ‹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ûðy=üò~ùó
 wùò Ks…   º)OÉA O$ ÊO$ Ê/XÌ	XÌ&XÎ4XÎ?XÏ$XÏ0B=XÒ-SÓ$XÓ+XÔXÔXÔXÔ18XÕ0XÕ8XÖ3X×*XØXr7   rT   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¶   r9   Nr6   r8   r7   r4   rT   )r=   r>   r?   rA   r@   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>
)rZ   r¶   r9   rT   r4   )r¶   r9   rT   )r8   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>   rb   rÑ   rÒ   r§   r   rª   r=   r   Úheadr   r   r¬   re   Ú
ProxyErrorÚConnectErrorÚTimeoutExceptionr   r   r   rÏ   ÚerrorrÓ   r   r   r   r   )ré   r¶   r9   r6   r8   r7   r4   rT   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&   rC   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>   Úlistdirrb   Ú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ú   rZ   Úfiles_timestampsÚcommit_messageNr8   Ú	create_prr9   Úcommit_description)r=   r>   r?   rA   Úfloatr@   )r&   rC   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)rZ   Úbranchr8   Úexist_oki“  z!Uploading the following files to z: Ú,)rZ   Ú
operationsr  r  r8   r  r9   )Ú	__class__rE   r>   rý   rb   rþ   r§   rÒ   rÑ   rÔ   r   Ú
startswithr0   Úcreate_branchr   rõ   Ústatus_coderÏ   rÐ   Úcreate_commit)rÿ   rú   rZ   r  r  r8   r  r9   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  rE   )rÿ   Úargsr»   s   &*,r'   Úsave_pretrainedÚPushToHubMixin.save_pretrainedÛ  s    € ä! T§^¡^×%<Ñ%<Ð$=Ð=tÐ"uÓvÐvr)   r  r  Úprivater8   r9   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$   rZ   r  Nr  r!  r8   r9   r  r"  r$  r%   )r=   r@   Úintr[   )r&   rC   s   "€r'   r(   rû   ß  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)r!  r8   r  ©r8   )r"  z	README.md)r  r  r8   r  r9   r  N)r0   Úcreate_reporZ   Úcreate_and_tag_model_cardÚtempfileÚTemporaryDirectoryr  Úsaver>   rb   r§   r  )rÿ   rZ   r  r  r!  r8   r9   r  r"  r$  Ú
model_cardÚtmp_dirs   &&$$$$$$$$  r'   Úpush_to_hubÚPushToHubMixin.push_to_hubß  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	r/   )NNFNN)rE   rF   rG   rH   Ú__doc__r  r  r  r0  rJ   rK   rL   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(   2  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©   rc   rØ   )r4  Úint_sizes   & r'   Úconvert_file_size_to_intr@  2  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4      ;_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      '       d4   V Uu. uF#  p\         P                  P                  W	V4      NK%  	  ppVV3# \!        V 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Å   NÚ
weight_mapÚmetadataÚall_checkpoint_keys)
r4   r5   r6   r7   r8   r•   r9   r:   rÂ   r<   )r>   rb   rÒ   rØ   Úopenr†   r‰   ÚreadÚsortedÚsetÚvaluesr[   ÚkeysÚcopyrÑ   r§   rº   )Úpretrained_model_name_or_pathÚindex_filenamer4   r5   r6   r7   r8   r•   r9   r:   rÂ   r<   rÝ   r   ÚindexÚshard_filenamesÚsharded_metadataÚcached_filenamess   &&&&&&&&&&&&,     r'   Úget_checkpoint_shard_filesrR  S  sU  € ô2 �7‰7�>‰>˜.×)Ò)ÜÐ:¸>Ð:JÈ%ÐPmÐOnÐnoÐpÓqÐqä	ˆn×	Ô	 Ü—
’
˜1Ÿ6™6›8Ó$ˆ÷ 
ô œ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$   rZ   r$  Nr8   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Ô   )rZ   r$  r8   r.  rU  Ú	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&   rC   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Ê   ©r^  )rÿ   r^  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Ù   r^  ©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   Úwaitr^  rj  s   &r'   Úwait_until_doneÚPushInProgress.wait_until_done»  s   € Ü�Š�T—Y‘YÖr)   c                ó   <€ V ^8„  d   QhRR/# )r$   r%   Nr/   )r&   rC   s   "€r'   r(   r`  ¾  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Ê   )r^  Úcancelrg  )rÿ   rh  s   & r'   rs  ÚPushInProgress.cancel¾  sG   € ð —y’yó
á �à—J‘J—Lô ð %(§H¡H§J÷ ˆCÙ ñ
ˆŽ	ùò 
s   �A¬AÁArb  rÊ   )rE   rF   rG   rH   r2  rc  rk  ro  rs  rJ   rK   rL   s   @r'   r\  r\  °  s(   ø‡ € ñ÷1ò 1ò4ò ÷
ö 
r)   r\  c                óN   € V ^8„  d   Qh/ ^ \         9   d   \        R,          ;R&   # )r$   Nr.   )Ú__conditional_annotations__r   )r&   s   "r'   r(   r(      s$   € ÷ ñ ÷v Ò Œ��Ñ òwr)   )NNNrÊ   )NFNNNFr¡   NNTTTNN)
NFNFNNNr¡   NN)NN)Rrv  r2  r†   r>   r°   r£   r+  Ú
concurrentr   Úpathlibr   Útypingr   Úuuidr   re   Úhuggingface_hubr   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   Úimport_utilsr   r   r    r!   Ú#LEGACY_PROCESSOR_CHAT_TEMPLATE_FILEÚCHAT_TEMPLATE_FILEra   Ú
get_loggerrE   rÏ   r.   r0   r2   rŠ   rb   r§   ÚHF_HOMErN   Ú TRANSFORMERS_DYNAMIC_MODULE_NAMEÚhexr¥   ÚS3_BUCKET_PREFIXÚCLOUDFRONT_DISTRIB_PREFIXrX   ro   r“   r¬   r´   r½   rº   rö   rø   r@  rR  r*  r\  r(   )rv  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ñDR!ð #ðR!ð $(ðR!ð !÷R!ð R!÷jnñ nõbkôB:.÷z÷@
ó 
r)   