Ë
    T^(hT ã            
       óð  — d Z ddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZ ddlmZ ddlmZ ddlmZ ddlmZmZmZmZmZmZmZ ddlmZ d	d
lmZ  ej>                  e «      Z!�dqde"de#deee#e"f   e#f   fd„Z$h d£Z%e%jM                  dh«      Z'ejP                  jS                  dd«      jU                  «       Z+ejP                  jS                  dd«      jU                  «       Z,ejP                  jS                  dd«      jU                  «       Z-ejP                  jS                  dd«      jU                  «       Z.ejP                  jS                  dd«      jU                  «       Z/ ej`                  d«      Z1dZ2dZ3dZ4dZ5dZ6dZ7dZ8d Z9 e$d!d"¬#«      \  Z:Z; e$d$«      Z< e$d%«      Z= e$d&«      Z> e$d'd"¬#«      \  Z?Z@ej‚                  j…                  d(«      duZCej‚                  j…                  d)«      duZD e$d*«      ZE e$d+«      ZF e$d,«      ZG e$d-«      ZH e$d.«      ZI e$d/«      ZJ e$d0d"¬#«      \  ZKZLej‚                  j…                  d1«      duZM e$d2«      ZNej‚                  j…                  d3«      duZOej‚                  j…                  d4«      duZP e$d5«      ZQ e$d6«      ZRej‚                  j…                  d7«      duZS	 ej¨                  j9                  d7«      ZUe!j­                  d8eU› �«        e$d:«      ZX e$d;«      ZY e$d<«      ZZ e$d=d"¬#«      \  Z[Z\ e$d>«      Z] e$d?«      Z^ e$d@«      Z_ e$dA«      Z` e$dB«      Za e$dC«      Zb e$dD«      Zc e$dE«      Zd e$dF«      Ze e$dG«      Zf e$dH«      Zg e$dI«      Zh e$dJ«      Ziej‚                  j…                  dK«      duZj e$dL«      ZkdZl	 ej¨                  j9                  dM«       d"Zlej‚                  j…                  dN«      duZm e$dO«      Zn e$dP«      Zo e$dQ«      Zp e$dR«      Zq e$dS«      Zr e$dT«      Zs e$dU«      Zt e$dV«      Zu e$dW«      Zv e$dX«      Zw e$dY«      Zx e$dZ«      Zy e$d[«      Zz e$d\«      Z{ e$d]«      Z| e$d^«      Z} e$d_«      Z~ e$d`d"¬#«      \  ZZ€ej‚                  j…                  da«      duZ�e�r	 ej¨                  j9                  db«       ej‚                  j…                  dc«      duZ‚ e$dd«      Zƒ e$de«      Z„ e$dfd"¬#«      \  Z…Z† e$dg«      Z‡ e$dh«      Zˆ e$di«      Z‰ e$dj«      ZŠ e$dk«      Z‹ e$dl«      ZŒ e$dmd"¬#«      \  Z�ZŽ e$dn«      Z� e$dod"¬#«      \  Z�Z‘ e$dp«      Z’ e$dq«      Z“ e$drd"¬#«      \  Z”Z• e$ds«      Z– e$dt«      Z— e$du«      Z˜ e$dv«      Z™ e$dw«      Zš e$dx«      Z›dyZœdZ�e,e'v re+e%vr e$dzd"¬#«      \  Z�Zœne!�j=                  d{«       dZ�dyZŸdZ e/e%v rd"Z n¥e+e'v r�e,e%vr‹ej‚                  j…                  d|«      duZ e r,d}Z¡dZŸe¡D ]  Z¢	 ej¨                  j9                  e¢«      ZŸ n eŸduZ e rP ej`                  eŸ«       ej`                  d~«      k  r+e!�j=                  deŸ› d€�«       dZ ne!�j=                  d�«       ej‚                  j…                  d‚«      duZ£	 ej¨                  j9                  d‚«      Z¤e!j­                  dƒe¤› �«       ej‚                  j…                  d„«      duZ¥	 ej¨                  j9                  d„«      Z¦e!j­                  d…e¦› �«       dyZ§ej‚                  j…                  d†«      duxs ej‚                  j…                  d‡«      duZ¨	 ej¨                  j9                  dˆ«      Z§e!j­                  d‰e§› �«       dZ©e-e'v r@ e$dŠd"¬#«      \  Z©Zªe©r1 e$d‹d"¬#«      \  Z«Z¬e«re!�j=                  dŒe¬› d�eª› dŽ�«       ndxZ©Z«dyxZ¬ZªdZ­e�rG ej`                  eœ«      Z®e®�j^                  e®�j`                  fe1�j^                  e1�j`                  fk\  Z­dZ±e.e%v r% e$d�d"¬#«      \  Z±Z²e±re!�j=                  d�e²› dŽ�«       d‘„ Z³d’„ Z´d“„ Zµd”„ Z¶e2fd•e"fd–„Z·d—„ Z¸d˜„ Z¹e7fd•e"fd™„Zºdš„ Z»d›„ Z¼dœ„ Z½d�„ Z¾dž„ Z¿dŸ„ ZÀd „ ZÁd¡„ ZÂd¢„ ZÃd£„ ZÄe3fd•e"fd¤„ZÅd¥„ ZÆd¦„ ZÇd§„ ZÈd¨„ ZÉd©„ ZÊdª„ ZËd«„ ZÌd¬„ ZÍd­„ ZÎ�drd•ee"   fd®„ZÏd¯„ ZÐd°„ ZÑd±„ ZÒ e«       d²„ «       ZÓ e«       d³„ «       ZÔd´„ ZÕdµ„ ZÖd¶„ Z×d·„ ZØd¸„ ZÙd¹„ ZÚdº„ ZÛd»„ ZÜd¼„ ZÝd½„ ZÞd¾„ Zßd¿„ ZàdÀ„ Záe�dsdÁ„«       Zâ e«       �dtdÂ„«       Zã e«       �dqdÃ„«       Zä e«       �dqdÄ„«       Zå e«       �dqdÅ„«       ZæedÆ„ «       ZçedÇ„ «       ZèdÈ„ ZédÉ„ ZêdÊ„ ZëdË„ ZìdÌ„ ZídÍ„ ZîdÎ„ ZïdÏ„ ZðdÐ„ ZñdÑ„ ZòdÒ„ ZódÓ„ ZôdÔ„ Zõe8fd•e"fdÕ„ZödÖ„ Z÷d×„ ZødØ„ Zù�dud•e"fdÙ„Zúe�dqdÚ„«       Zû e«       dÛ„ «       Züde#fdÜ„ZýdÝ„ Zþ e«       dÞ„ «       Zÿ e«       dße"fdà„«       �Z  e«       �dqdße"dáe#fdâ„«       �Zdã„ �Zdä„ �Zdå„ �Zdæ„ �Zdç„ �Zdè„ �Ze5fd•e"fdé„�Zdê„ �Z	e4fd•e"fdë„�Z
dì„ �Zdí„ �Zdî„ �Zdï„ �Zdð„ �Zdñ„ �Zdò„ �Zdó„ �Zdô„ �Zdõ„ �Zdö„ �Zd÷„ �Zdø„ �Zedù„ «       �Zdú„ �Zdû„ �Zdü„ �Zdý„ �Zdþ„ �Zdÿ„ �Z�d „ �Z�d„ �Z �d„ �Z!�d„ �Z"�d„ �Z#�d„ �Z$�d„ �Z%�d„ �Z&�d„ �Z'�d	„ �Z(�d
„ �Z)e9fd•e"f�d„�Z*�d„ �Z+�d„ �Z,�d„ �Z-�d„ �Z.�d„ �Z/�d„ �Z0�d„ �Z1�d„ �Z2�d„ �Z3�d„ �Z4�d„ �Z5�d„ �Z6�d„ �Z7�d„ �Z8�d„ �Z9�d„ �Z:�d„ �Z;�d„ �Z<�d„ �Z=�d�Z>�d �Z?�d!�Z@�d"�ZA�d#�ZB�d$�ZC�d%�ZD�d&�ZE�d'�ZF�d(�ZG�d)�ZH�d*�ZI�d+�ZJ�d,�ZK�d-�ZL�d.�ZM�d/�ZN�d0�ZO�d1�ZP�d2�ZQ�d3�ZR�d4�ZS�d5�ZT�d6�ZU�d7�ZV�d8�ZW�d9�ZX�d:�ZY�d;�ZZ�d<�Z[�d=�Z\�d>�Z]�d?�Z^�d@�Z_�dA�Z`�dB�Za�dC�Zb�dD�Zc�dE�Zd�dF�Ze�dG�Zf�dH�Zg�dI�Zh�dJ�Zi�dK�Zj�dL�Zk�dM�Zl�dN�Zm eg d(e÷�e>ff‘d1eØ�eKff‘d3e´�eAff‘d5eî�eBff‘d)eø�e@ff‘d6eï�eNff‘d‚eÈ�efff‘d7�e�eFff‘dŠeÞ�eOff‘d:eà�ePff‘d;eá�eRff‘dO�e!�eWff‘dQ�e-�eXff‘dR�e.�eYff‘d„eÉ�ehff‘�dO�e�eQff‘dCeÇ�egff‘�dP�e	�eEff‘dUeÆ�ecff‘dW�e�ebff‘d[eó�eZff‘dY�e�eSff‘d^�e�eDff‘da�e�eLff‘�dQ�e+�e\ff‘dg�e �eTff‘�dReÙ�eMff‘dh�e�eUff‘dj�e&�e]ff‘dl�e)�eVff‘dD�e'�e^ff‘dE�e(�e`ff‘dk�e�eCff‘dze¶�eGff‘doe¿�eHff‘�dS�e�eaff‘d]�e�e[ff‘d!e·�edff‘dˆ�e0�eeff‘�dT�e5�eiff‘d>�e6�ejff‘dPe×�ekff‘�dU�e7�elff‘d4eµ�e?ff‘dx�e=�emff‘«      �Zn�dV„ �Zo G �dW„ �dX�ep«      �Zq�dY„ �Zree"   �Zse�esee"ee"   f   f   �Zt G �dZ„ �d[e«      �Zu G �d\„ �d]�ev«      �Zw�dv�d^e"def�d_„�Zx�d`�daœ�db„�Zy�dc„ �dd�de„ �df�dg„ �dh�di„ �dji�Zz�dk„ �Z{ e«       �dl„ «       �Z|�dm„ �Z}�dne"d�etf�do„�Z~�dp„ �Zy# ej¨                  j®                  $ rV 	 ej¨                  j9                  d9«      ZUe!j­                  d8eU› �«       n!# ej¨                  j®                  $ r dZSY nw xY wY �Œ6w xY w# ej¨                  j®                  $ r dZlY �
Œ†w xY w# ej¨                  j®                  $ r dZ�Y �	Œ»w xY w# ej¨                  j®                  $ r Y �Œœw xY w# ej¨                  j®                  $ r dZ¤Y �Œùw xY w# ej¨                  j®                  $ r dZ¥Y �ŒÎw xY w# ej¨                  j®                  $ r dZ¨Y �Œ‚w xY w(w  zD
Import utilities: Utilities related to imports and our lazy inits.
é    N)ÚOrderedDict)Ú	lru_cache)Úchain)Ú
ModuleType)ÚAnyÚDictÚ	FrozenSetÚOptionalÚSetÚTupleÚUnion)Úversioné   )ÚloggingFÚpkg_nameÚreturn_versionÚreturnc                 ó  — t         j                  j                  | «      d u}d}|r;	 t         j                  j	                  | «      }t        j                  d	| › d
|› �«       |r||fS |S # t         j                  j
                  $ r� | dk(  r@	 t        j                  | «      }t        |dd«      }d|v r|}d}nd}nJ# t        $ r d}Y n=w xY w| dk(  r2	 t         j                  j	                  d«      }n# t        $ r d}Y nw xY wd}Y ŒÀw xY w)NúN/AÚtorchÚ__version__ÚdevTFÚquarkz	amd-quarkz	Detected z
 version: )Ú	importlibÚutilÚ	find_specÚmetadatar   ÚPackageNotFoundErrorÚimport_moduleÚgetattrÚImportErrorÚ	ExceptionÚloggerÚdebug)r   r   Úpackage_existsÚpackage_versionÚpackageÚtemp_versions         ú]/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/utils/import_utils.pyÚ_is_package_availabler*   *   s$  € ä—^‘^×-Ñ-¨hÓ7¸tÐC€NØ€OÙð	'ô (×0Ñ0×8Ñ8¸ÓBˆOô2 	�‰�y  
¨*°_Ð4EÐFÔGÙØ˜Ð.Ð.àÐøô9 ×!Ñ!×6Ñ6ò 	'à˜7Ò"ð+Ü'×5Ñ5°hÓ?�GÜ#*¨7°MÀ5Ó#I�Là Ñ,Ø*6˜Ø)-™à).˜ùÜ"ò +à%*’Nð+úð ˜WÒ$ð+Ü&/×&8Ñ&8×&@Ñ&@ÀÓ&M‘OøÜ ò +Ø%*’Nð+úð "'�ùð/	'úsY   §A) Á)"DÂ-B:Â9DÂ:CÃDÃCÃDÃC1Ã0DÃ1C?Ã<DÃ>C?Ã?DÄD>   Ú1ÚONÚYESÚTRUEÚAUTOÚUSE_TFÚ	USE_TORCHÚUSE_FLAXÚUSE_TORCH_XLAr+   ÚFORCE_TF_AVAILABLEz1.10z0.26.0z1.2.6z1.12.0z0.10.0z2.2.0z0.2.1z0.0.4z0.4.0Ú
accelerateT)r   ÚapexÚapollo_torchÚaqlmÚvptqÚavÚdecordÚbitsandbytesÚeetqÚ
fbgemm_gpuÚgalore_torchÚ
lomo_optimÚ	grokadamwÚschedulefreeÚbs4ÚcoloredlogsÚcv2Úyt_dlpÚdatasetsÚ
detectron2Úfaissz$Successfully imported faiss version z	faiss-cpuÚftfyÚg2p_enÚfast_hadamard_transformÚintel_extension_for_pytorchÚjiebaÚjinja2ÚkenlmÚ	keras_nlpÚLevenshteinÚlibrosaÚnattenÚnltkÚonnxÚopenaiÚoptimumÚ	auto_gptqÚ	gptqmodelÚawqr   Úoptimum_quantoÚcompressed_tensorsÚpandasÚpeftÚ
phonemizerÚuromanÚpsutilÚpy3nvmlÚpyctcdecodeÚpygmentsÚpytesseractÚpytestÚpytorch_quantizationÚrjiebaÚ
sacremosesÚsafetensorsÚscipyÚsentencepieceÚseqioÚggufÚsklearnzscikit-learnÚsmdistributedÚ	soundfileÚspacyÚ	sudachipyÚtensorflow_probabilityÚtensorflow_textÚtf2onnxÚtimmÚ
tokenizersÚ
torchaudioÚtorchaoÚ
torchdistxÚtorchvisionÚmlxÚ	num2wordsÚhqqÚtiktokenÚblobfileÚliger_kernelÚtritonÚ
spqr_quantÚrichr   r   z'Disabling PyTorch because USE_TF is setÚ
tensorflow)r‡   ztensorflow-cpuztensorflow-gpuz
tf-nightlyztf-nightly-cpuztf-nightly-gpuztf-nightly-rocmzintel-tensorflowzintel-tensorflow-avx512ztensorflow-rocmztensorflow-macosztensorflow-aarch64Ú2z"TensorFlow found but with version z*. Transformers requires version 2 minimum.z-Disabling Tensorflow because USE_TORCH is setÚessentiaz'Successfully imported essentia version Úpretty_midiz*Successfully imported pretty_midi version Ú	torch_cclÚoneccl_bindings_for_pytorchÚoneccl_bind_ptz Detected oneccl_bind_pt version ÚflaxÚjaxzJAX version z, Flax version z available.Ú	torch_xlazTorch XLA version c                  ó   — t         S ©N)Ú_kenlm_available© ó    r)   Úis_kenlm_availabler–   H  ó   € ÜÐr•   c                  ó   — t         S r’   )Ú_cv2_availabler”   r•   r)   Úis_cv2_availablerš   L  ó   € ÜÐr•   c                  ó   — t         S r’   )Ú_yt_dlp_availabler”   r•   r)   Úis_yt_dlp_availablerž   P  ó   € ÜÐr•   c                  ó   — t         S r’   )Ú_torch_availabler”   r•   r)   Úis_torch_availabler¢   T  r—   r•   Úmin_versionc                 óp   — t         xr/ t        j                  t        «      t        j                  | «      k\  S r’   )Ú_accelerate_availabler   ÚparseÚ_accelerate_version©r£   s    r)   Úis_accelerate_availabler©   X  s&   € Ü Òe¤W§]¡]Ô3FÓ%GÌ7Ï=É=ÐYdÓKeÑ%eÐer•   c                  ó4   — ddl } | j                  «       dk(  ryy)z‚
    Check whether pytorch uses deterministic algorithms by looking if torch.set_deterministic_debug_mode() is set to 1 or 2"
    r   NFT)r   Úget_deterministic_debug_mode©r   s    r)   Úis_torch_deterministicr­   \  s   € ó à×)Ñ)Ó+¨qÒ0Øàr•   c                  ó   — t         S r’   )Ú_hadamard_availabler”   r•   r)   Úis_hadamard_availabler°   h  ó   € ÜÐr•   c                 óp   — t         xr/ t        j                  t        «      t        j                  | «      k\  S r’   )Ú_hqq_availabler   r¦   Ú_hqq_versionr¨   s    r)   Úis_hqq_availablerµ   l  s$   € ÜÒWœgŸm™m¬LÓ9¼W¿]¹]È;Ó=WÑWÐWr•   c                  ó   — t         S r’   )Ú_pygments_availabler”   r•   r)   Úis_pygments_availabler¸   p  r±   r•   c                  ó   — t         S r’   )Ú_torch_versionr”   r•   r)   Úget_torch_versionr»   t  r›   r•   c                  ón  — t        «       syt        dk(  ryt        «       r/t        j                  t        «      t        j                  d«      k\  S t        «       r/t        j                  t        «      t        j                  d«      k\  S t        j                  t        «      t        j                  d«      k\  S )NFr   ú2.1.0z2.1.1)r¢   rº   Úis_torch_mlu_availabler   r¦   Úis_torch_npu_availabler”   r•   r)   Úis_torch_sdpa_availablerÀ   x  s{   € ÜÔØÜ	˜5Ò	 Øô ÔÜ�}‰}œ^Ó,´·±¸gÓ0FÑFÐFäÔÜ�}‰}œ^Ó,´·±¸gÓ0FÑFÐFä�=‰=œÓ(¬G¯M©M¸'Ó,BÑBÐBr•   c                  óŠ   — t        «       syt        dk(  ryt        j                  t        «      t        j                  d«      k\  S )NFr   z2.5.0)r¢   rº   r   r¦   r”   r•   r)   Úis_torch_flex_attn_availablerÂ   ‹  s5   € ÜÔØÜ	˜5Ò	 Øô �=‰=œÓ(¬G¯M©M¸'Ó,BÑBÐBr•   c                  ó   — t         S r’   )Ú_torchvision_availabler”   r•   r)   Úis_torchvision_availablerÅ   –  ó   € Ü!Ð!r•   c                  óv   — t        «       syt        j                  t        «      t        j                  d«      k\  S )NFz0.15)rÅ   r   r¦   Ú_torchvision_versionr”   r•   r)   Úis_torchvision_v2_availablerÉ   š  s+   € Ü#Ô%Øô �=‰=Ô-Ó.´'·-±-ÀÓ2GÑGÐGr•   c                  ó   — t         S r’   )Ú_galore_torch_availabler”   r•   r)   Úis_galore_torch_availablerÌ   ¢  ó   € Ü"Ð"r•   c                  ó   — t         S r’   )Ú_apollo_torch_availabler”   r•   r)   Úis_apollo_torch_availablerÐ   ¦  rÍ   r•   c                  ó   — t         S r’   )Ú_lomo_availabler”   r•   r)   Úis_lomo_availablerÓ   ª  ó   € ÜÐr•   c                  ó   — t         S r’   )Ú_grokadamw_availabler”   r•   r)   Úis_grokadamw_availabler×   ®  ó   € ÜÐr•   c                 óp   — t         xr/ t        j                  t        «      t        j                  | «      k\  S r’   )Ú_schedulefree_availabler   r¦   Ú_schedulefree_versionr¨   s    r)   Úis_schedulefree_availablerÜ   ²  s&   € Ü"Òi¤w§}¡}Ô5JÓ'KÌwÏ}É}Ð]hÓOiÑ'iÐir•   c                  ó   — t         S r’   )Ú_pyctcdecode_availabler”   r•   r)   Úis_pyctcdecode_availablerß   ¶  rÆ   r•   c                  ó   — t         S r’   )Ú_librosa_availabler”   r•   r)   Úis_librosa_availablerâ   º  ó   € ÜÐr•   c                  ó   — t         S r’   )Ú_essentia_availabler”   r•   r)   Úis_essentia_availableræ   ¾  r±   r•   c                  ó   — t         S r’   )Ú_pretty_midi_availabler”   r•   r)   Úis_pretty_midi_availableré   Â  rÆ   r•   c                  óT   — t        «       rdd l} | j                  j                  «       S y©Nr   F)r¢   r   ÚcudaÚis_availabler¬   s    r)   Úis_torch_cuda_availablerî   Æ  s!   € ÜÔÛà�z‰z×&Ñ&Ó(Ð(àr•   c                  ól   — t        «       r*dd l} | j                  j                  «       syt	        d«      S y)Nr   FÚ	mamba_ssm©r¢   r   rì   rí   r*   r¬   s    r)   Úis_mamba_ssm_availablerò   Ï  s,   € ÜÔÛà�z‰z×&Ñ&Ô(Øä(¨Ó5Ð5Ør•   c                  óà   — t        «       rddd l} | j                  j                  «       syt	        d«      r:dd l}t        j                  |j                  «      t        j                  d«      k\  ryy)Nr   Frð   ú2.0.4T)	r¢   r   rì   rí   r*   rð   r   r¦   r   )r   rð   s     r)   Úis_mamba_2_ssm_availablerõ   Ú  sO   € ÜÔÛà�z‰z×&Ñ&Ô(Øä$ [Ô1Û ä—=‘= ×!6Ñ!6Ó7¼7¿=¹=ÈÓ;QÒQØØr•   c                  ól   — t        «       r*dd l} | j                  j                  «       syt	        d«      S y)Nr   FÚcausal_conv1drñ   r¬   s    r)   Úis_causal_conv1d_availablerø   é  s,   € ÜÔÛà�z‰z×&Ñ&Ô(ØÜ$ _Ó5Ð5Ør•   c                  ó.   — t        «       rt        d«      S y)NÚmambapyF)r¢   r*   r”   r•   r)   Úis_mambapy_availablerû   ó  s   € ÜÔÜ$ YÓ/Ð/Ør•   c                 óR  — t        «       r�dd l}t        |j                  d«      rƒ|j                  j                  j                  «       xr$ |j                  j                  j                  «       }| �5t        j                  t        «      t        j                  | «      k\  }|xr |}|S y)Nr   ÚmpsF)
r¢   r   ÚhasattrÚbackendsrý   rí   Úis_builtr   r¦   rº   )r£   r   Úbackend_availableÚflags       r)   Úis_torch_mps_availabler  ù  s€   € ÜÔÛä�5—>‘> 5Ô)Ø %§¡× 2Ñ 2× ?Ñ ?Ó AÒ cÀeÇnÁn×FXÑFX×FaÑFaÓFcÐØÐ&Ü—}‘}¤^Ó4¼¿¹ÀkÓ8RÑR�Ø$5Ò$>¸$Ð!Ø$Ð$Ør•   c                  óŒ   — t        «       sydd l} | j                  j                  «       xr | j                  j	                  «       S ©NFr   )r¢   r   rì   rí   Úis_bf16_supportedr¬   s    r)   Úis_torch_bf16_gpu_availabler    s3   € ÜÔØãà�:‰:×"Ñ"Ó$ÒG¨¯©×)EÑ)EÓ)GÐGr•   c                  ó‚   — t        «       sydd l} 	 | j                  j                  j                  }y# t
        $ r Y yw xY w)NFr   T)r¢   r   ÚcpuÚampÚautocastÚAttributeError)r   Ú_s     r)   Úis_torch_bf16_cpu_availabler    s?   € ÜÔØãðà�I‰I�M‰M×"Ñ"ˆð øô ò Ùðús   ‘ 2 ²	>½>c                  óJ   — t        j                  dt        «       t        «       S )Nz¬The util is_torch_bf16_available is deprecated, please use is_torch_bf16_gpu_available or is_torch_bf16_cpu_available instead according to whether it's used with cpu or gpu)ÚwarningsÚwarnÚFutureWarningr  r”   r•   r)   Úis_torch_bf16_availabler    s$   € ô ‡M�Mð	`äôô
 'Ó(Ð(r•   c                 óR  — t        «       syt        «       rt        «       ryydd l}	 |j	                  dd|j
                  | ¬«      }||z  }d\  }}}|j                  ||||j
                  | ¬«      }|j                  j                  ||j
                  | ¬«      } ||«      }y#  Y yxY w)NFTr   é   ©ÚdtypeÚdevice)é   é   é   )	r¢   Úis_torch_hpu_availableÚis_habana_gaudi1r   ÚzerosÚfloat16ÚrandnÚnnÚ	LayerNorm)	r  r   Úxr  ÚbatchÚsentence_lengthÚembedding_dimÚ	embeddingÚ
layer_norms	            r)   Ú!is_torch_fp16_available_on_devicer)  )  s®   € äÔØäÔÜÔØàãðØ�K‰K˜˜1 E§M¡M¸&ˆKÓAˆØ�‰Eˆð 18Ñ-ˆˆ Ø—K‘K  ¸ÈUÏ]É]Ðci�KÓjˆ	Ø—X‘X×'Ñ'¨¸U¿]¹]ÐSYÐ'ÓZˆ
Ù�yÓ!ˆð øðñ ús   §A:B" Â"B&c                 ó¤   — t        «       sydd l}| dk(  r
t        «       S | dk(  ry	 |j                  dd|j                  | ¬«      }||z  }y#  Y yxY w)NFr   rì   ÚhpuTr  r  )r¢   r   r  r  Úbfloat16)r  r   r#  r  s       r)   Ú!is_torch_bf16_available_on_devicer-  I  sb   € äÔØãà�ÒÜ*Ó,Ð,à�‚ØðØ�K‰K˜˜1 E§N¡N¸6ˆKÓBˆØ�‰Eˆð øðñ ús   ¦$A ÁAc                  ó  — t        «       sydd l} | j                  j                  «       r| j                  j                  €y| j                  j                  | j                  j                  «       «      j                  dk  ryt        | j                  j                  j                  d«      d   «      dk  ryt	        j                  t	        j                  | j                  «      j                  «      t	        j                  d«      k  ryy)NFr   é   ú.é   z1.7T)r¢   r   rì   rí   r   Úget_device_propertiesÚcurrent_deviceÚmajorÚintÚsplitr¦   r   Úbase_versionr¬   s    r)   Úis_torch_tf32_availabler8  a  s½   € ÜÔØãà�:‰:×"Ñ"Ô$¨¯©×(:Ñ(:Ð(BØØ‡z�z×'Ñ'¨¯
©
×(AÑ(AÓ(CÓD×JÑJÈQÒNØÜ
ˆ5�=‰=×Ñ×#Ñ# CÓ(¨Ñ+Ó,¨rÒ1ØÜ‡}�}”W—]‘] 5×#4Ñ#4Ó5×BÑBÓCÄgÇmÁmÐTYÓFZÒZØàr•   c                  ó   — t         S r’   )Ú_torch_fx_availabler”   r•   r)   Úis_torch_fx_availabler;  s  r±   r•   c                  ó   — t         S r’   )Ú_peft_availabler”   r•   r)   Úis_peft_availabler>  w  rÔ   r•   c                  ó   — t         S r’   )Ú_bs4_availabler”   r•   r)   Úis_bs4_availablerA  {  r›   r•   c                  ó   — t         S r’   )Ú_tf_availabler”   r•   r)   Úis_tf_availablerD    ó   € ÜÐr•   c                  ó   — t         S r’   )Ú_coloredlogs_availabler”   r•   r)   Úis_coloredlogs_availablerH  ƒ  rÆ   r•   c                  ó   — t         S r’   )Ú_tf2onnx_availabler”   r•   r)   Úis_tf2onnx_availablerK  ‡  rã   r•   c                  ó   — t         S r’   )Ú_onnx_availabler”   r•   r)   Úis_onnx_availablerN  ‹  rÔ   r•   c                  ó   — t         S r’   )Ú_openai_availabler”   r•   r)   Úis_openai_availablerQ  �  rŸ   r•   c                  ó   — t         S r’   )Ú_flax_availabler”   r•   r)   Úis_flax_availablerT  “  rÔ   r•   c                  óÔ   — 	 t         j                  j                  d«      d uxr" t         j                  j	                  d«      dk\  S # t         j                  j
                  $ r Y yw xY w)NÚflutezflute-kernelz0.4.1F)r   r   r   r   r   r   r”   r•   r)   Úis_flute_availablerW  —  s\   € ðÜ�~‰~×'Ñ'¨Ó0¸Ð<ÒvÄ×ASÑAS×A[ÑA[Ð\jÓAkÐovÑAvÐvøÜ×Ñ×2Ñ2ò Ùðús   ‚AA ÁA'Á&A'c                  ó   — t         S r’   )Ú_ftfy_availabler”   r•   r)   Úis_ftfy_availablerZ  ž  rÔ   r•   c                  ó   — t         S r’   )Ú_g2p_en_availabler”   r•   r)   Úis_g2p_en_availabler]  ¢  rŸ   r•   c                 óª   — | r	|rJ d«       ‚t         syddl}|r|j                  j                  «       dv S | r|j                  j                  «       dk(  S y)zš
    Check if `torch_xla` is available. To train a native pytorch job in an environment with torch xla installed, set
    the USE_TORCH_XLA to false.
    z6The check_is_tpu and check_is_gpu cannot both be true.Fr   N)ÚGPUÚCUDAÚTPUT)Ú_torch_xla_availabler�   ÚruntimeÚdevice_type)Úcheck_is_tpuÚcheck_is_gpur�   s      r)   Úis_torch_xla_availablerg  ¦  s[   € ñ ¡ÐhÐ0hÓhÐ.åØãáØ× Ñ ×,Ñ,Ó.°/ÐAÐAÙ	Ø× Ñ ×,Ñ,Ó.°%Ñ7Ð7àr•   c                 óV   — t         j                  j                  d«      �
t        «       S y)NÚtorch_neuronxF)r   r   r   rg  )Úcheck_devices    r)   Úis_torch_neuroncore_availablerk  »  s#   € ä‡~�~×Ñ Ó0Ð<Ü%Ó'Ð'Ør•   c                 ó:  — t         rt        j                  j                  d«      €yddl}ddl}| r5	 |j                  j                  «       }|j                  j                  «       S t        |d«      xr |j                  j                  «       S # t        $ r Y yw xY w)zQChecks if `torch_npu` is installed and potentially if a NPU is in the environmentÚ	torch_npuNFr   Únpu)r¡   r   r   r   r   rm  rn  Údevice_countrí   ÚRuntimeErrorrþ   )rj  r   rm  r  s       r)   r¿   r¿   Â  s†   € õ œyŸ~™~×7Ñ7¸ÓDÐLØãÛáð	à—	‘	×&Ñ&Ó(ˆAØ—9‘9×)Ñ)Ó+Ð+ô �5˜%Ó Ò= U§Y¡Y×%;Ñ%;Ó%=Ð=øô ò 	Ùð	ús   ²3B Â	BÂBc                 óò  — t         rt        j                  j                  d«      €yddl}ddl}t        j                  j                  d«      }	 t        d«      t        j                  d<   |j                  j                  «       }|r|t        j                  d<   |S t        j                  j                  dd«       |S # |r|t        j                  d<   w t        j                  j                  dd«       w xY w)z‚
    Checks if `mlu` is available via an `cndev-based` check which won't trigger the drivers and leave mlu
    uninitialized.
    Ú	torch_mluNFr   ÚPYTORCH_CNDEV_BASED_MLU_CHECKr   )r¡   r   r   r   r   rr  ÚosÚenvironÚgetÚstrÚmlurí   Úpop)rj  r   rr  Ú,pytorch_cndev_based_mlu_check_previous_valueÚ	availables        r)   r¾   r¾   Õ  sÁ   € õ œyŸ~™~×7Ñ7¸ÓDÐLØãÛä35·:±:·>±>ÐBaÓ3bÐ0ðBÜ69¸!³fŒ�
‰
Ð2Ñ3Ø—I‘I×*Ñ*Ó,ˆ	á7Ø:fŒB�J‰JÐ6Ñ7ð Ðô �J‰J�N‰NÐ:¸DÔAàÐøñ 8Ø:fŒB�J‰JÐ6Ò7ä�J‰J�N‰NÐ:¸DÕAús   Á6B> Â>8C6c                 óª  — t         rt        j                  j                  d«      €yddl}ddl}d}t        r0t        j                  t        «      t        j                  |«      k  ry| r5	 |j                  j                  «       }|j                  j                  «       S t        |d«      xr |j                  j                  «       S # t        $ r Y yw xY w)zSChecks if `torch_musa` is installed and potentially if a MUSA is in the environmentÚ
torch_musaNFr   z0.33.0Úmusa)r¡   r   r   r   r   r}  r¥   r   r¦   r§   r~  ro  rí   rp  rþ   )rj  r   r}  Útorch_musa_min_versionr  s        r)   Úis_torch_musa_availabler€  î  s­   € õ œyŸ~™~×7Ñ7¸ÓEÐMØãÛà%ÐÝ¤§¡Ô/BÓ!CÄgÇmÁmÐTjÓFkÒ!kØáð	à—
‘
×'Ñ'Ó)ˆAØ—:‘:×*Ñ*Ó,Ð,ô �5˜&Ó!Ò? e§j¡j×&=Ñ&=Ó&?Ð?øô ò 	Ùð	ús   Á*3C Ã	CÃCc                  óf  ‡‡— t         r>t        j                  j                  d«      �t        j                  j                  d«      €yd} t        r0t        j                  t        «      t        j                  | «      k  ryddlŠt        j                  j                  dd«      dk(  rddl}t        ‰d	«      r‰j                  j                  «       syddlmc mc m} |j'                  «       |j(                  j*                  k(  r-‰j,                  j.                  Šˆˆfd
„}|‰j,                  _        y)zQChecks if `torch.hpu` is available and potentially if a HPU is in the environmentÚhabana_frameworksNzhabana_frameworks.torchFz1.5.0r   ÚPT_HPU_LAZY_MODEr+   r+  c                 ó‚   •— | j                   ‰j                  k(  rt        j                  d«       || |<   y  ‰| ||«       y )Nz¡In-place tensor.masked_fill_(mask, value) is not supported for int64 tensors on Gaudi1. This operation will be performed out-of-place using tensor[mask] = value.)r  Úint64r#   Úwarning_once)ÚselfÚmaskÚvalueÚoriginal_masked_fill_r   s      €€r)   Úpatched_masked_fill_z4is_torch_hpu_available.<locals>.patched_masked_fill_&  s>   ø€ Ø�z‰z˜UŸ[™[Ò(Ü×#Ñ#ð`ôð #��T’
á% d¨D°%Õ8r•   T)r¡   r   r   r   r¥   r   r¦   r§   r   rt  ru  rv  Úhabana_frameworks.torchrþ   r+  rí   Ú*habana_frameworks.torch.utils.experimentalÚutilsÚexperimentalÚ_get_device_typeÚsynDeviceTypeÚsynDeviceGaudiÚTensorÚmasked_fill_)Útorch_hpu_min_versionr‚  Úhtexpr‹  rŠ  r   s       @@r)   r  r    sã   ù€ õ Ü�>‰>×#Ñ#Ð$7Ó8Ð@Ü�>‰>×#Ñ#Ð$=Ó>ÐFàà#ÐÝ¤§¡Ô/BÓ!CÄgÇmÁmÐTiÓFjÒ!jØãä	‡z�z‡~�~Ð(¨#Ó.°#Ò5ã&ä�5˜%Ô ¨¯	©	×(>Ñ(>Ô(@Øç>Ó>ð ×ÑÓ 5×#6Ñ#6×#EÑ#EÒEØ %§¡× 9Ñ 9Ðõ	9ð %9ˆ�‰Ô!àr•   c                  ó~   — t        «       sydd lmc mc m}  | j                  «       | j                  j                  k(  S r  )r  r�  r   rŽ  r�  r�  r‘  r’  )r–  s    r)   r  r  5  s3   € ä!Ô#Øç>Ó>ð ×!Ñ!Ó# u×':Ñ':×'IÑ'IÑIÐIr•   c                  óv   — t        «       syt        j                  t        «      t        j                  d«      k\  S )NFz2.0.0©r¢   r   r¦   rº   r”   r•   r)   Úis_torchdynamo_availablerš  @  s(   € ÜÔØä�=‰=œÓ(¬G¯M©M¸'Ó,BÑBÐBr•   c                  ó8   — t        «       sydd l} t        | d«      S )NFr   Úcompile)r¢   r   rþ   r¬   s    r)   Úis_torch_compile_availabler�  G  s   € ÜÔØãô �5˜)Ó$Ð$r•   c                  óÂ   — t        «       sy	 dd l} | j                  j                  «       S # t        $ r* 	 dd lm} |j                  «       cY S # t        $ r Y Y yw xY ww xY wr  )r¢   r   ÚcompilerÚis_compilingr"   Útorch._dynamoÚ_dynamo©r   Údynamos     r)   Úis_torchdynamo_compilingr¥  R  s^   € ÜÔØð
Ûà�~‰~×*Ñ*Ó,Ð,øÜò ð	Ý*à×&Ñ&Ó(Ò(øÜò 	Úð	úðúó,   �+ «	AµAÁ
AÁ	AÁAÁAÁAc                  óÂ   — t        «       sy	 dd l} | j                  j                  «       S # t        $ r* 	 dd lm} |j                  «       cY S # t        $ r Y Y yw xY ww xY wr  )r¢   r   rŸ  Úis_exportingr"   r¡  r¢  r£  s     r)   Úis_torchdynamo_exportingr©  e  s^   € ÜÔØð
Ûà�~‰~×*Ñ*Ó,Ð,øÜò ð	Ý*à×&Ñ&Ó(Ò(øÜò 	Úð	úðúr¦  c                  ó„   — t         j                  j                  d«      €yt         j                  j                  d«      d uS )NÚtorch_tensorrtFztorch_tensorrt.fx©r   r   r   r”   r•   r)   Úis_torch_tensorrt_fx_availabler­  v  s6   € Ü‡~�~×ÑÐ 0Ó1Ð9ØÜ�>‰>×#Ñ#Ð$7Ó8ÀÐDÐDr•   c                  ó   — t         S r’   )Ú_datasets_availabler”   r•   r)   Úis_datasets_availabler°  |  r±   r•   c                  ó   — t         S r’   )Ú_detectron2_availabler”   r•   r)   Úis_detectron2_availabler³  €  ó   € Ü Ð r•   c                  ó   — t         S r’   )Ú_rjieba_availabler”   r•   r)   Úis_rjieba_availabler·  „  rŸ   r•   c                  ó   — t         S r’   )Ú_psutil_availabler”   r•   r)   Úis_psutil_availablerº  ˆ  rŸ   r•   c                  ó   — t         S r’   )Ú_py3nvml_availabler”   r•   r)   Úis_py3nvml_availabler½  Œ  rã   r•   c                  ó   — t         S r’   )Ú_sacremoses_availabler”   r•   r)   Úis_sacremoses_availablerÀ  �  r´  r•   c                  ó   — t         S r’   )Ú_apex_availabler”   r•   r)   Úis_apex_availablerÃ  ”  rÔ   r•   c                  ó   — t         S r’   )Ú_aqlm_availabler”   r•   r)   Úis_aqlm_availablerÆ  ˜  rÔ   r•   c                 óp   — t         xr/ t        j                  t        «      t        j                  | «      k\  S r’   )Ú_vptq_availabler   r¦   Ú_vptq_versionr¨   s    r)   Úis_vptq_availablerÊ  œ  s$   € ÜÒYœwŸ}™}¬]Ó;¼w¿}¹}È[Ó?YÑYÐYr•   c                  ó   — t         S r’   )Ú_av_availabler”   r•   r)   Úis_av_availablerÍ     rE  r•   c                  ó   — t         S r’   )Ú_decord_availabler”   r•   r)   Úis_decord_availablerÐ  ¤  rŸ   r•   c                  ój   — 	 t        j                  dj                  «       «       y# t        $ r Y yw xY w)zÃ
    Code comes from *torch.utils.cpp_extension.is_ninja_available()*. Returns `True` if the
    [ninja](https://ninja-build.org/) build system is available on the system, `False` otherwise.
    zninja --versionTF)Ú
subprocessÚcheck_outputr6  r"   r”   r•   r)   Úis_ninja_availablerÔ  ¨  s8   € ð
Ü×ÑÐ 1× 7Ñ 7Ó 9Ô:ð øô ò Ùðús   ‚#& ¦	2±2c           	      ó  — d„ }t        «       rt        sy |t        «      } |t        «      }||k7  r$t        j                  d|› d|› dt        › d�«       y| r/t        j                  t        «      t        j                  | «      k\  S y)Nc                 óª   — t        t        j                  | «      j                  «      dz   t        t        j                  | «      j                  «      z   S ©Nr0  )rw  r   r¦   r4  Úminor)Úfull_versions    r)   Ú get_major_and_minor_from_versionz;is_ipex_available.<locals>.get_major_and_minor_from_version¶  s;   € Ü”7—=‘= Ó.×4Ñ4Ó5¸Ñ;¼cÄ'Ç-Á-ÐP\ÓB]×BcÑBcÓ>dÑdÐdr•   FzIntel Extension for PyTorch z needs to work with PyTorch z.*, but PyTorch z? is found. Please switch to the matching version and run again.T)r¢   Ú_ipex_availablerº   Ú_ipex_versionr#   Úwarningr   r¦   )r£   rÚ  Útorch_major_and_minorÚipex_major_and_minors       r)   Úis_ipex_availablerà  µ  s�   € òeô Ô¥Øá<¼^ÓLÐÙ;¼MÓJÐØÐ 4Ò4Ü�‰Ø*Ð+?Ð*@Ð@\Ð]qÐ\rð sÜ*Ð+Ð+jðlô	
ð ÙÜ�}‰}œ]Ó+¬w¯}©}¸[Ó/IÑIÐIØr•   c                 ó  — t        «       syt        j                  t        «      }|j                  dk  s|j                  dk(  rL|j
                  dk  r=t        «       rddl}n.|j                  dk  s|j                  dk(  r|j
                  dk  ryddl}| r5	 |j                  j                  «       }|j                  j                  «       S t        |d«      xr |j                  j                  «       S # t        $ r Y yw xY w)zÇ
    Checks if XPU acceleration is available either via native PyTorch (>=2.6),
    `intel_extension_for_pytorch` or via stock PyTorch (>=2.4) and potentially
    if a XPU is in the environment.
    Fr  é   r   Nr  Úxpu)r¢   r   r¦   rº   r4  rØ  rà  rM   r   rã  ro  rí   rp  rþ   )rj  Útorch_versionrM   r   r  s        r)   Úis_torch_xpu_availablerå  É  sÞ   € ô ÔØä—M‘M¤.Ó1€MØ×Ñ˜QÒ =×#6Ñ#6¸!Ò#;À×@SÑ@SÐVWÒ@WÜÔÜ.Ø× Ñ  1Ò$¨×)<Ñ)<ÀÒ)AÀm×FYÑFYÐ\]ÒF]Øãáð	à—	‘	×&Ñ&Ó(ˆAØ—9‘9×)Ñ)Ó+Ð+ô �5˜%Ó Ò= U§Y¡Y×%;Ñ%;Ó%=Ð=øô ò 	Ùð	ús   Â3C2 Ã2	C>Ã=C>c                  óò   — t        «       rt        sydd l} t        j                  t
        j                  j                  d«      «      t        j                  d«      k  r| j                  j                  «       S y)NFr   r<   z0.43.1T)	r¢   Ú_bitsandbytes_availabler   r   r¦   r   r   rì   rí   r¬   s    r)   Úis_bitsandbytes_availablerè  æ  sW   € äÔÕ'>Øãô ‡}�}”Y×'Ñ'×/Ñ/°Ó?Ó@Ä7Ç=Á=ÐQYÓCZÒZØ�z‰z×&Ñ&Ó(Ð(ð r•   c                  óN   — t        «       sydd l} dt        | dt        «       «      v S )NFr   Úmulti_backendÚfeatures)rè  r<   r    Úset)Úbnbs    r)   Ú'is_bitsandbytes_multi_backend_availablerî  ö  s$   € Ü$Ô&Øãàœg c¨:´s³uÓ=Ð=Ð=r•   c                  ó   — t        «       syt        d«      sydd l} | j                  j	                  «       st        «       sy| j                  j                  rHt        j                  t        j                  j                  d«      «      t        j                  d«      k\  S | j                  j                  rHt        j                  t        j                  j                  d«      «      t        j                  d«      k\  S t        «       rHt        j                  t        j                  j                  d«      «      t        j                  d«      k\  S y)NFÚ
flash_attnr   r½   rô   z2.3.3)r¢   r*   r   rì   rí   r¾   r   r¦   r   r   Úhipr¬   s    r)   Úis_flash_attn_2_availablerò  ÿ  sä   € ÜÔØä  Ô.Øó à�J‰J×#Ñ#Ô%Ô)?Ô)AØà‡}�}×ÒÜ�}‰}œY×/Ñ/×7Ñ7¸ÓEÓFÌ'Ï-É-ÐX_ÓJ`Ñ`Ð`Ø	�‰×	Ò	ä�}‰}œY×/Ñ/×7Ñ7¸ÓEÓFÌ'Ï-É-ÐX_ÓJ`Ñ`Ð`Ü	Ô	!Ü�}‰}œY×/Ñ/×7Ñ7¸ÓEÓFÌ'Ï-É-ÐX_ÓJ`Ñ`Ð`àr•   c                  óª   — t        d«      syt        j                  t        j                  j                  d«      «      t        j                  d«      k\  S )Nrð  Fr½   ©r*   r   r¦   r   r   r”   r•   r)   Ú#is_flash_attn_greater_or_equal_2_10rõ    s<   € ä  Ô.Øä�=‰=œ×+Ñ+×3Ñ3°LÓAÓBÄgÇmÁmÐT[ÓF\Ñ\Ð\r•   Úlibrary_versionc                 óª   — t        d«      syt        j                  t        j                  j                  d«      «      t        j                  | «      k\  S )Nrð  Frô  )rö  s    r)   Úis_flash_attn_greater_or_equalrø    s<   € ä  Ô.Øä�=‰=œ×+Ñ+×3Ñ3°LÓAÓBÄgÇmÁmÐTcÓFdÑdÐdr•   Ú
accept_devc                 óx  — t        d«      sy|ret        j                  t        j                  t        j                  j                  d«      «      j
                  «      t        j                  | «      k\  S t        j                  t        j                  j                  d«      «      t        j                  | «      k\  S )zû
    Accepts a library version and returns True if the current version of the library is greater than or equal to the
    given version. If `accept_dev` is True, it will also accept development versions (e.g. 2.7.0.dev20250320 matches
    2.7.0).
    r   F)r*   r   r¦   r   r   r7  )rö  rù  s     r)   Úis_torch_greater_or_equalrû  '  s‹   € ô ! Ô)ØáÜ�}‰}œWŸ]™]¬9×+=Ñ+=×+EÑ+EÀgÓ+NÓO×\Ñ\Ó]Ôah×anÑanØób
ñ 
ð 	
ô �}‰}œY×/Ñ/×7Ñ7¸Ó@ÓAÄWÇ]Á]ÐSbÓEcÑcÐcr•   c                  ó   — t         S r’   )Ú_torchdistx_availabler”   r•   r)   Úis_torchdistx_availablerþ  9  r´  r•   c                  ó   — t         S r’   )Ú_faiss_availabler”   r•   r)   Úis_faiss_availabler  =  r—   r•   c                  ó   — t         S r’   )Ú_scipy_availabler”   r•   r)   Úis_scipy_availabler  A  r—   r•   c                  ó   — t         S r’   )Ú_sklearn_availabler”   r•   r)   Úis_sklearn_availabler  E  rã   r•   c                  ó   — t         S r’   )Ú_sentencepiece_availabler”   r•   r)   Úis_sentencepiece_availabler
  I  s   € Ü#Ð#r•   c                  ó   — t         S r’   )Ú_is_seqio_availabler”   r•   r)   Úis_seqio_availabler  M  r±   r•   c                 óp   — t         xr/ t        j                  t        «      t        j                  | «      k\  S r’   )Ú_is_gguf_availabler   r¦   Ú_gguf_versionr¨   s    r)   Úis_gguf_availabler  Q  s%   € ÜÒ\¤'§-¡-´Ó">Ä'Ç-Á-ÐP[ÓB\Ñ"\Ð\r•   c                  ó„   — t         j                  j                  d«      €yt         j                  j                  d«      d uS )NÚgoogleFzgoogle.protobufr¬  r”   r•   r)   Úis_protobuf_availabler  U  s5   € Ü‡~�~×Ñ Ó)Ð1ØÜ�>‰>×#Ñ#Ð$5Ó6¸dÐBÐBr•   c                 óx   — t        «       xr/ t        j                  t        «      t        j                  | «      k\  S r’   r™  r¨   s    r)   Úis_fsdp_availabler  [  s(   € ÜÓÒ_¤G§M¡M´.Ó$AÄWÇ]Á]ÐS^ÓE_Ñ$_Ð_r•   c                  ó   — t         S r’   )Ú_optimum_availabler”   r•   r)   Úis_optimum_availabler  _  rã   r•   c                  ó   — t         S r’   )Ú_auto_awq_availabler”   r•   r)   Úis_auto_awq_availabler  c  r±   r•   c                  ó   — t         S r’   )Ú_is_optimum_quanto_availabler”   r•   r)   Úis_optimum_quanto_availabler  g  s   € ä'Ð'r•   c                  ó   — t         S r’   )Ú_quark_availabler”   r•   r)   Úis_quark_availabler"  l  r—   r•   c                  ó   — t         S r’   )Ú_compressed_tensors_availabler”   r•   r)   Úis_compressed_tensors_availabler%  p  s   € Ü(Ð(r•   c                  ó   — t         S r’   )Ú_auto_gptq_availabler”   r•   r)   Úis_auto_gptq_availabler(  t  rØ   r•   c                  ó   — t         S r’   )Ú_gptqmodel_availabler”   r•   r)   Úis_gptqmodel_availabler+  x  rØ   r•   c                  ó   — t         S r’   )Ú_eetq_availabler”   r•   r)   Úis_eetq_availabler.  |  rÔ   r•   c                  ó   — t         S r’   )Ú_fbgemm_gpu_availabler”   r•   r)   Úis_fbgemm_gpu_availabler1  €  r´  r•   c                  ó   — t         S r’   )Ú_levenshtein_availabler”   r•   r)   Úis_levenshtein_availabler4  „  rÆ   r•   c                  ó(   — t         xr t        d«      S )Nzoptimum.neuron)r  r*   r”   r•   r)   Úis_optimum_neuron_availabler6  ˆ  s   € ÜÒIÔ"7Ð8HÓ"IÐIr•   c                  ó   — t         S r’   )Ú_safetensors_availabler”   r•   r)   Úis_safetensors_availabler9  Œ  rÆ   r•   c                  ó   — t         S r’   )Ú_tokenizers_availabler”   r•   r)   Úis_tokenizers_availabler<  �  r´  r•   c                  óŒ  — t         j                  j                  d«      d u} | r8	 t         j                  j	                  d«      }t        j                  d|› �«       | S # t         j                  j
                  $ rH 	 t         j                  j	                  d«      }n$# t         j                  j
                  $ r Y Y yw xY wY Œ~w xY w)NÚPILÚPillowzPillow-SIMDFzDetected PIL version )r   r   r   r   r   r   r#   r$   )Ú_pil_availabler&   s     r)   Úis_vision_availablerA  ”  s±   € ä—^‘^×-Ñ-¨eÓ4¸DÐ@€NÙð	Ü'×0Ñ0×8Ñ8¸ÓBˆOô 	�‰Ð,¨_Ð,=Ð>Ô?ØÐøô ×!Ñ!×6Ñ6ò 	ðÜ"+×"4Ñ"4×"<Ñ"<¸]Ó"K‘øÜ×%Ñ%×:Ñ:ò Úðúñ  ð	ús5   ¥A ÁCÁ<BÂCÂB=Â9CÂ<B=Â=CÃCc                  ó   — t         S r’   )Ú_pytesseract_availabler”   r•   r)   Úis_pytesseract_availablerD  £  rÆ   r•   c                  ó   — t         S r’   )Ú_pytest_availabler”   r•   r)   Úis_pytest_availablerG  §  rŸ   r•   c                  ó   — t         S r’   )Ú_spacy_availabler”   r•   r)   Úis_spacy_availablerJ  «  r—   r•   c                  ó&   — t        «       xr t        S r’   )rD  Ú_tensorflow_text_availabler”   r•   r)   Úis_tensorflow_text_availablerM  ¯  s   € ÜÓÒ;Ô!;Ð;r•   c                  ó&   — t        «       xr t        S r’   )rM  Ú_keras_nlp_availabler”   r•   r)   Úis_keras_nlp_availablerP  ³  s   € Ü'Ó)ÒBÔ.BÐBr•   c                  óV  — 	 t         j                  d   j                  } d | «       j                  vrt	        d«      ‚dt
        j                  v r!t
        j                  d   dk  rt	        d«      ‚t        j                  j                  d«      d uS # t        t        t        f$ r Y yw xY w)NÚIPythonÚIPKernelAppÚconsoleÚDATABRICKS_RUNTIME_VERSIONz11.0Ú
databricksF)ÚsysÚmodulesÚget_ipythonÚconfigr!   rt  ru  r   r   r   r  ÚKeyError)rY  s    r)   Úis_in_notebookr\  ·  s”   € ðä—k‘k )Ñ,×8Ñ8ˆØ¡£× 4Ñ 4Ñ4Ü˜iÓ(Ð(à'¬2¯:©:Ñ5¼"¿*¹*ÐEaÑ:bÐekÒ:kô ˜lÓ+Ð+ä�~‰~×'Ñ'¨	Ó2¸$Ð>Ð>øÜœK¬Ð2ò Ùðús   ‚BB ÂB(Â'B(c                  ó   — t         S r’   )Ú_pytorch_quantization_availabler”   r•   r)   Ú!is_pytorch_quantization_availabler_  È  s   € Ü*Ð*r•   c                  ó   — t         S r’   )Ú!_tensorflow_probability_availabler”   r•   r)   Ú#is_tensorflow_probability_availablerb  Ì  s   € Ü,Ð,r•   c                  ó   — t         S r’   )Ú_pandas_availabler”   r•   r)   Úis_pandas_availablere  Ð  rŸ   r•   c                  óÀ   — t        j                  dd«      } 	 t        j                  | «      } | j	                  dd«      sy	 t        S # t        j
                  $ r Y yw xY w)NÚSM_FRAMEWORK_PARAMSú{}Ú*sagemaker_distributed_dataparallel_enabledF)rt  ÚgetenvÚjsonÚloadsrv  ÚJSONDecodeErrorÚ_smdistributed_available)Úsagemaker_paramss    r)   Úis_sagemaker_dp_enabledrp  Ô  sf   € ä—y‘yÐ!6¸Ó=ÐðäŸ:™:Ð&6Ó7ÐØ×#Ñ#Ð$PÐRWÔXØð Yô
 $Ð#øô ×Ñò Ùðús   ˜'A ÁAÁAc                  óV  — t        j                  dd«      } 	 t        j                  | «      } d| vry	 t        j                  dd«      }	 t        j                  |«      }|j                  dd«      sy	 t        S # t        j                  $ r Y yw xY w# t        j                  $ r Y yw xY w)NÚSM_HP_MP_PARAMETERSrh  Ú
partitionsFrg  Úsagemaker_mpi_enabled)rt  rj  rk  rl  rm  rv  rn  )Úsmp_optionsÚmpi_optionss     r)   Úis_sagemaker_mp_enabledrw  â  s®   € ä—)‘)Ð1°4Ó8€Kðä—j‘j Ó-ˆØ˜{Ñ*Øð +ô —)‘)Ð1°4Ó8€Kðä—j‘j Ó-ˆØ�‰Ð6¸Ô>Øð ?ô
 $Ð#øô ×Ñò Ùðûô ×Ñò Ùðús#   ˜A9 Á
'B Á9BÂBÂB(Â'B(c                  ó&   — dt         j                  v S )NÚSAGEMAKER_JOB_NAME)rt  ru  r”   r•   r)   Úis_training_run_on_sagemakerrz  ú  s   € Ø¤2§:¡:Ð-Ð-r•   c                  ó   — t         S r’   )Ú_soundfile_availabler”   r•   r)   Úis_soundfile_availabler}  þ  rØ   r•   c                  ó   — t         S r’   )Ú_timm_availabler”   r•   r)   Úis_timm_availabler€    rÔ   r•   c                  ó   — t         S r’   )Ú_natten_availabler”   r•   r)   Úis_natten_availablerƒ    rŸ   r•   c                  ó   — t         S r’   )Ú_nltk_availabler”   r•   r)   Úis_nltk_availabler†  
  rÔ   r•   c                  ó   — t         S r’   ©Ú_torchaudio_availabler”   r•   r)   Úis_torchaudio_availablerŠ    r´  r•   c                 óp   — t         xr/ t        j                  t        «      t        j                  | «      k\  S r’   )Ú_torchao_availabler   r¦   Ú_torchao_versionr¨   s    r)   Úis_torchao_availablerŽ    s&   € ÜÒ_¤'§-¡-Ô0@Ó"AÄWÇ]Á]ÐS^ÓE_Ñ"_Ð_r•   c                  ó   — t         S r’   rˆ  r”   r•   r)   Úis_speech_availabler�    s   € ä Ð r•   c                  ó   — t         S r’   )Ú_spqr_availabler”   r•   r)   Úis_spqr_availabler“    rÔ   r•   c                  ó   — t         S r’   )Ú_phonemizer_availabler”   r•   r)   Úis_phonemizer_availabler–    r´  r•   c                  ó   — t         S r’   )Ú_uroman_availabler”   r•   r)   Úis_uroman_availabler™  #  rŸ   r•   c                 ó   ‡ — ˆ fd„}|S )Nc                  ó6   •— t         st        d«      ‚ ‰| i |¤ŽS )Nz|You need to install pytorch to use this method or class, or activate it with environment variables USE_TORCH=1 and USE_TF=0.)r¡   r!   )ÚargsÚkwargsÚfns     €r)   Úwrapperz"torch_only_method.<locals>.wrapper(  s+   ø€ ÝÜðVóð ñ
 �tÐ&˜vÑ&Ð&r•   r”   )rž  rŸ  s   ` r)   Útorch_only_methodr   '  s   ø€ ô'ð €Nr•   c                  ó   — t         S r’   )Ú_is_ccl_availabler”   r•   r)   Úis_ccl_availabler£  4  rŸ   r•   c                  ó   — t         S r’   )Ú_sudachipy_availabler”   r•   r)   Úis_sudachi_availabler¦  8  rØ   r•   c                  ó   — t         S r’   )Ú_sudachipy_versionr”   r•   r)   Úget_sudachi_versionr©  <  rã   r•   c                  óv   — t        «       syt        j                  t        «      t        j                  d«      k\  S )NFz0.6.8)r¦  r   r¦   r¨  r”   r•   r)   Úis_sudachi_projection_availabler«  @  s+   € ÜÔ!Øô �=‰=Ô+Ó,´·±¸gÓ0FÑFÐFr•   c                  óv   — t         j                  j                  d«      d uxr t        j                  d«      d uS )NÚrhoknpÚjumanpp)r   r   r   ÚshutilÚwhichr”   r•   r)   Úis_jumanpp_availabler±  I  s0   € Ü�N‰N×$Ñ$ XÓ.°dÐ:ÒeÄÇÁÈiÓAXÐ`dÐAdÐer•   c                  óD   — t         j                  j                  d«      d uS )NÚ	pyximportr¬  r”   r•   r)   Úis_cython_availabler´  M  s   € Ü�>‰>×#Ñ# KÓ0¸Ð<Ð<r•   c                  ó   — t         S r’   )Ú_jieba_availabler”   r•   r)   Úis_jieba_availabler·  Q  r—   r•   c                  ó   — t         S r’   )Ú_jinja_availabler”   r•   r)   Úis_jinja_availablerº  U  r—   r•   c                  ó   — t         S r’   )Ú_mlx_availabler”   r•   r)   Úis_mlx_availabler½  Y  r›   r•   c                  ó   — t         S r’   )Ú_num2words_availabler”   r•   r)   Úis_num2words_availablerÀ  ]  rØ   r•   c                  ó   — t         xr t        S r’   )Ú_tiktoken_availableÚ_blobfile_availabler”   r•   r)   Úis_tiktoken_availablerÄ  a  s   € ÜÒ6Ô#6Ð6r•   c                  ó    — t         syt        j                  t        j                  j                  d«      «      t        j                  d«      k\  S )NFrƒ   z0.3.0)Ú_liger_kernel_availabler   r¦   r   r   r”   r•   r)   Úis_liger_kernel_availablerÇ  e  s7   € Ý"Øä�=‰=œ×+Ñ+×3Ñ3°NÓCÓDÌÏÉÐV]ÓH^Ñ^Ð^r•   c                  ó   — t         S r’   )Ú_triton_availabler”   r•   r)   Úis_triton_availablerÊ  l  rŸ   r•   c                  ó   — t         S r’   )Ú_rich_availabler”   r•   r)   Úis_rich_availablerÍ  p  rÔ   r•   zÃ
{0} requires the PyAv library but it was not found in your environment. You can install it with:
```
pip install av
```
Please note that you may need to restart your runtime after installation.
zÉ
{0} requires the YT-DLP library but it was not found in your environment. You can install it with:
```
pip install yt-dlp
```
Please note that you may need to restart your runtime after installation.
zÇ
{0} requires the PyAv library but it was not found in your environment. You can install it with:
```
pip install decord
```
Please note that you may need to restart your runtime after installation.
zÐ
{0} requires the OpenCV library but it was not found in your environment. You can install it with:
```
pip install opencv-python
```
Please note that you may need to restart your runtime after installation.
ub  
{0} requires the ðŸ¤— Datasets library but it was not found in your environment. You can install it with:
```
pip install datasets
```
In a notebook or a colab, you can install it by executing a cell with
```
!pip install datasets
```
then restarting your kernel.

Note that if you have a local folder named `datasets` or a local python file named `datasets.py` in your current
working directory, python may try to import this instead of the ðŸ¤— Datasets library. You should rename this folder or
that python file if that's the case. Please note that you may need to restart your runtime after installation.
u<  
{0} requires the ðŸ¤— Tokenizers library but it was not found in your environment. You can install it with:
```
pip install tokenizers
```
In a notebook or a colab, you can install it by executing a cell with
```
!pip install tokenizers
```
Please note that you may need to restart your runtime after installation.
aB  
{0} requires the SentencePiece library but it was not found in your environment. Checkout the instructions on the
installation page of its repo: https://github.com/google/sentencepiece#installation and follow the ones
that match your environment. Please note that you may need to restart your runtime after installation.
aT  
{0} requires the protobuf library but it was not found in your environment. Checkout the instructions on the
installation page of its repo: https://github.com/protocolbuffers/protobuf/tree/master/python#installation and follow the ones
that match your environment. Please note that you may need to restart your runtime after installation.
aF  
{0} requires the faiss library but it was not found in your environment. Checkout the instructions on the
installation page of its repo: https://github.com/facebookresearch/faiss/blob/master/INSTALL.md and follow the ones
that match your environment. Please note that you may need to restart your runtime after installation.
a$  
{0} requires the PyTorch library but it was not found in your environment. Checkout the instructions on the
installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment.
Please note that you may need to restart your runtime after installation.
a(  
{0} requires the Torchvision library but it was not found in your environment. Checkout the instructions on the
installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment.
Please note that you may need to restart your runtime after installation.
a  
{0} requires the PyTorch library but it was not found in your environment.
However, we were able to find a TensorFlow installation. TensorFlow classes begin
with "TF", but are otherwise identically named to our PyTorch classes. This
means that the TF equivalent of the class you tried to import would be "TF{0}".
If you want to use TensorFlow, please use TF classes instead!

If you really do want to use PyTorch please go to
https://pytorch.org/get-started/locally/ and follow the instructions that
match your environment.
aÄ  
{0} requires the TensorFlow library but it was not found in your environment.
However, we were able to find a PyTorch installation. PyTorch classes do not begin
with "TF", but are otherwise identically named to our TF classes.
If you want to use PyTorch, please use those classes instead!

If you really do want to use TensorFlow, please follow the instructions on the
installation page https://www.tensorflow.org/install that match your environment.
zØ
{0} requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:
`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.
aC  
{0} requires the scikit-learn library but it was not found in your environment. You can install it with:
```
pip install -U scikit-learn
```
In a notebook or a colab, you can install it by executing a cell with
```
!pip install -U scikit-learn
```
Please note that you may need to restart your runtime after installation.
a!  
{0} requires the TensorFlow library but it was not found in your environment. Checkout the instructions on the
installation page: https://www.tensorflow.org/install and follow the ones that match your environment.
Please note that you may need to restart your runtime after installation.
aD  
{0} requires the detectron2 library but it was not found in your environment. Checkout the instructions on the
installation page: https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md and follow the ones
that match your environment. Please note that you may need to restart your runtime after installation.
a  
{0} requires the FLAX library but it was not found in your environment. Checkout the instructions on the
installation page: https://github.com/google/flax and follow the ones that match your environment.
Please note that you may need to restart your runtime after installation.
a8  
{0} requires the ftfy library but it was not found in your environment. Checkout the instructions on the
installation section: https://github.com/rspeer/python-ftfy/tree/master#installing and follow the ones
that match your environment. Please note that you may need to restart your runtime after installation.
zà
{0} requires the python-Levenshtein library but it was not found in your environment. You can install it with pip: `pip
install python-Levenshtein`. Please note that you may need to restart your runtime after installation.
zÈ
{0} requires the g2p-en library but it was not found in your environment. You can install it with pip:
`pip install g2p-en`. Please note that you may need to restart your runtime after installation.
a  
{0} requires the pytorch-quantization library but it was not found in your environment. You can install it with pip:
`pip install pytorch-quantization --extra-index-url https://pypi.ngc.nvidia.com`
Please note that you may need to restart your runtime after installation.
zÿ
{0} requires the tensorflow_probability library but it was not found in your environment. You can install it with pip as
explained here: https://github.com/tensorflow/probability. Please note that you may need to restart your runtime after installation.
a  
{0} requires the tensorflow_text library but it was not found in your environment. You can install it with pip as
explained here: https://www.tensorflow.org/text/guide/tf_text_intro.
Please note that you may need to restart your runtime after installation.
z{
{0} requires the torchaudio library but it was not found in your environment. Please install it and restart your
runtime.
a  
{0} requires the pandas library but it was not found in your environment. You can install it with pip as
explained here: https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html.
Please note that you may need to restart your runtime after installation.
zÐ
{0} requires the phonemizer library but it was not found in your environment. You can install it with pip:
`pip install phonemizer`. Please note that you may need to restart your runtime after installation.
zÈ
{0} requires the uroman library but it was not found in your environment. You can install it with pip:
`pip install uroman`. Please note that you may need to restart your runtime after installation.
zÐ
{0} requires the sacremoses library but it was not found in your environment. You can install it with pip:
`pip install sacremoses`. Please note that you may need to restart your runtime after installation.
zÆ
{0} requires the scipy library but it was not found in your environment. You can install it with pip:
`pip install scipy`. Please note that you may need to restart your runtime after installation.
zÐ
{0} requires the torchaudio library but it was not found in your environment. You can install it with pip:
`pip install torchaudio`. Please note that you may need to restart your runtime after installation.
zÄ
{0} requires the timm library but it was not found in your environment. You can install it with pip:
`pip install timm`. Please note that you may need to restart your runtime after installation.
a"  
{0} requires the natten library but it was not found in your environment. You can install it by referring to:
shi-labs.com/natten . You can also install it with pip (may take longer to build):
`pip install natten`. Please note that you may need to restart your runtime after installation.
z¥
{0} requires the numexpr library but it was not found in your environment. You can install it by referring to:
https://numexpr.readthedocs.io/en/latest/index.html.
zÚ
{0} requires the NLTK library but it was not found in your environment. You can install it by referring to:
https://www.nltk.org/install.html. Please note that you may need to restart your runtime after installation.
zÅ
{0} requires the PIL library but it was not found in your environment. You can install it with pip:
`pip install pillow`. Please note that you may need to restart your runtime after installation.
zÒ
{0} requires the PyTesseract library but it was not found in your environment. You can install it with pip:
`pip install pytesseract`. Please note that you may need to restart your runtime after installation.
zÒ
{0} requires the pyctcdecode library but it was not found in your environment. You can install it with pip:
`pip install pyctcdecode`. Please note that you may need to restart your runtime after installation.
zü
{0} requires the accelerate library >= {ACCELERATE_MIN_VERSION} it was not found in your environment.
You can install or update it with pip: `pip install --upgrade accelerate`. Please note that you may need to restart your
runtime after installation.
a  
{0} requires the torch ccl library but it was not found in your environment. You can install it with pip:
`pip install oneccl_bind_pt -f https://developer.intel.com/ipex-whl-stable`
Please note that you may need to restart your runtime after installation.
zÛ
{0} requires essentia library. But that was not found in your environment. You can install them with pip:
`pip install essentia==2.1b6.dev1034`
Please note that you may need to restart your runtime after installation.
zÏ
{0} requires thes librosa library. But that was not found in your environment. You can install them with pip:
`pip install librosa`
Please note that you may need to restart your runtime after installation.
z×
{0} requires thes pretty_midi library. But that was not found in your environment. You can install them with pip:
`pip install pretty_midi`
Please note that you may need to restart your runtime after installation.
zÈ
{0} requires the Cython library but it was not found in your environment. You can install it with pip: `pip install
Cython`. Please note that you may need to restart your runtime after installation.
zÆ
{0} requires the jieba library but it was not found in your environment. You can install it with pip: `pip install
jieba`. Please note that you may need to restart your runtime after installation.
zÄ
{0} requires the peft library but it was not found in your environment. You can install it with pip: `pip install
peft`. Please note that you may need to restart your runtime after installation.
zÇ
{0} requires the jinja library but it was not found in your environment. You can install it with pip: `pip install
jinja2`. Please note that you may need to restart your runtime after installation.
zÄ
{0} requires the rich library but it was not found in your environment. You can install it with pip: `pip install
rich`. Please note that you may need to restart your runtime after installation.
ÚlevenshteinÚprotobufÚspeechÚtfÚvisionÚcythonÚjinjac                 ó&  — t        |t        t        f«      s|g}t        | d«      r| j                  n| j
                  j                  }d|v r6d|vr2t        «       s(t        «       rt        t        j                  |«      «      ‚d|v r6d|vr2t        «       r(t        «       st        t        j                  |«      «      ‚d„ |D «       }|D ��cg c]  \  }} |«       rŒ|j                  |«      ‘Œ  }}}|rt        dj                  |«      «      ‚y c c}}w )NÚ__name__r   rÑ  c              3   ó.   K  — | ]  }t         |   –— Œ y ­wr’   )ÚBACKENDS_MAPPING©Ú.0Úbackends     r)   ú	<genexpr>z$requires_backends.<locals>.<genexpr>!  s   è ø€ Ò@¨GÔ˜wÕ'Ñ@ùs   ‚Ú )Ú
isinstanceÚlistÚtuplerþ   rÖ  Ú	__class__r¢   rD  r!   ÚPYTORCH_IMPORT_ERROR_WITH_TFÚformatÚTF_IMPORT_ERROR_WITH_PYTORCHÚjoin)Úobjrÿ   ÚnameÚchecksr{  ÚmsgÚfaileds          r)   Úrequires_backendsrë    sì   € Ü�h¤¤u Ô.Ø�:ˆä" 3¨
Ô3ˆ3�<Š<¸¿¹×9OÑ9O€Dð �(Ñ˜t¨8Ñ3Ô<NÔ<PÔUdÔUfÜÔ6×=Ñ=¸dÓCÓDÐDð ˆxÑ˜G¨8Ñ3Ô8JÔ8LÔUdÔUfÜÔ6×=Ñ=¸dÓCÓDÐDá@°xÔ@€FØ5;×O¡> 9¨cÁ9Å;ˆc�j‰j˜ÕÐO€FÑOÙÜ˜"Ÿ'™' &›/Ó*Ð*ð ùó Ps   Ã
DÃDc                   ó"   ‡ — e Zd ZdZˆ fd„Zˆ xZS )ÚDummyObjectzÂ
    Metaclass for the dummy objects. Any class inheriting from it will return the ImportError generated by
    `requires_backend` each time a user tries to access any method of that class.
    c                 ó|   •— |j                  d«      r|dk7  rt        ‰| �	  |«      S t        | | j                  «       y )Nr  Ú_from_config)Ú
startswithÚsuperÚ__getattribute__rë  Ú	_backends)ÚclsÚkeyrá  s     €r)   rò  zDummyObject.__getattribute__-  s4   ø€ Ø�>‰>˜#Ô 3¨.Ò#8Ü‘7Ñ+¨CÓ0Ð0Ü˜#˜sŸ}™}Õ-r•   )rÖ  Ú
__module__Ú__qualname__Ú__doc__rò  Ú__classcell__©rá  s   @r)   rí  rí  '  s   ø„ ñ÷
.ð .r•   rí  c                 ó`   — t        «       r$dd l}t        | |j                  j                  «      S yrë   )r;  Útorch.fxrÞ  ÚfxÚProxy)r#  r   s     r)   Úis_torch_fx_proxyrÿ  3  s#   € ÜÔÛä˜!˜UŸX™XŸ^™^Ó,Ð,Ør•   c                   ó¢   ‡ — e Zd ZdZ	 	 ddedededeej                  j                     de
eef   f
ˆ fd„Zˆ fd„Zded	efd
„Zdefd„Zd„ Zˆ xZS )Ú_LazyModulezu
    Module class that surfaces all objects but only performs associated imports when the objects are requested.
    rç  Úmodule_fileÚimport_structureÚmodule_specÚextra_objectsc           
      óä  •— t         ‰| �  |«       i | _        t        d„ |j	                  «       D «       «      �rÛt        «       | _        i | _        g | _        i }|j                  «       D �][  \  }}g }	|D ]A  }
|
t        vrt        d|
› d|› d�«      ‚t        |
   \  }} |«       rŒ1|	j                  |
«       ŒC | j                  j                  t        |j	                  «       «      «      | _        |j                  «       D ]q  \  }}t        |	«      r|	| j                  |<   |D ],  }|| j                  |<   t        |	«      sŒ|	| j                  |<   Œ. |j                  |g «      j!                  |«       Œs | j                  j!                  t#        |j	                  «       «      t#        t%        |j'                  «       Ž «      z   «       �Œ^ || _        || _        t,        j.                  j1                  |«      g| _        |€i n|| _        || _        || _        y t        |j	                  «       «      | _        i | _        |j                  «       D ]  \  }}|D ]  }|| j                  |<   Œ Œ t#        |j	                  «       «      t#        t%        |j'                  «       Ž «      z   | _        || _        || _        t,        j.                  j1                  |«      g| _        |€i n|| _        || _        || _        y )Nc              3   ó<   K  — | ]  }t        |t        «      –— Œ y ­wr’   ©rÞ  Ú	frozenset)rÚ  rõ  s     r)   rÜ  z'_LazyModule.__init__.<locals>.<genexpr>Q  s   è ø€ ÒM¨cŒz˜#œy×)ÑMùó   ‚zError: the following backend: 'z' was specified around object z- but isn't specified in the backends mapping.)rñ  Ú__init__Ú_object_missing_backendÚanyÚkeysrì  Ú_modulesÚ_class_to_moduleÚ__all__ÚitemsrØ  Ú
ValueErrorÚappendÚunionÚlenÚ
setdefaultÚextendrß  r   ÚvaluesÚ__file__Ú__spec__rt  ÚpathÚdirnameÚ__path__Ú_objectsÚ_nameÚ_import_structure)r‡  rç  r  r  r  r  r!  rÿ   ÚmoduleÚmissing_backendsrÛ  ÚcallableÚerrorrõ  r  r‰  rá  s                   €r)   r  z_LazyModule.__init__F  sÎ  ø€ ô 	‰Ñ˜Ôà')ˆÔ$ÜÑMÐ5E×5JÑ5JÓ5LÔMÕMÜ›EˆDŒMØ$&ˆDÔ!ØˆDŒLà "Ðà$4×$:Ñ$:Ó$<ó YÑ �˜&Ø#%Ð Ø'ò 9�GØÔ&6Ñ6Ü(Ø=¸g¸YÐFdÐekÐdlð  mZð  [óð ô '7°wÑ&?‘O�H˜eÙ#�:Ø(×/Ñ/°Õ8ð9ð !%§¡× 3Ñ 3´C¸¿¹»Ó4FÓ G�”à#)§<¡<£>ò I‘K�C˜ÜÐ+Ô,Ø<L˜×4Ñ4°SÑ9à!'ò S˜Ø7:˜×-Ñ-¨eÑ4ÜÐ/Õ0ØBR˜D×8Ñ8¸Ò?ðSð &×0Ñ0°°bÓ9×@Ñ@ÀÕHðIð —‘×#Ñ#¤D¨¯©«Ó$7¼$¼uÀfÇmÁmÃoÐ?VÓ:WÑ$WÖXð/Yð2 (ˆDŒMØ'ˆDŒMÜŸW™WŸ_™_¨[Ó9Ð:ˆDŒMØ"/Ð"7™B¸]ˆDŒMØˆDŒJØ%6ˆDÕ"ô  Ð 0× 5Ñ 5Ó 7Ó8ˆDŒMØ$&ˆDÔ!Ø/×5Ñ5Ó7ò 7‘��VØ#ò 7�EØ36�D×)Ñ)¨%Ò0ñ7ð7ô  Ð 0× 5Ñ 5Ó 7Ó8¼4ÄÐGW×G^ÑG^ÓG`Ð@aÓ;bÑbˆDŒLØ'ˆDŒMØ'ˆDŒMÜŸW™WŸ_™_¨[Ó9Ð:ˆDŒMØ"/Ð"7™B¸]ˆDŒMØˆDŒJØ%5ˆDÕ"r•   c                 ór   •— t         ‰| �  «       }| j                  D ]  }||vsŒ|j                  |«       Œ |S r’   )rñ  Ú__dir__r  r  )r‡  ÚresultÚattrrá  s      €r)   r'  z_LazyModule.__dir__‰  s?   ø€ Ü‘‘Ó"ˆð —L‘Lò 	$ˆDØ˜6Ò!Ø—‘˜dÕ#ð	$ð ˆr•   r   c                 ó  ‡— || j                   v r| j                   |   S || j                  j                  «       v r<| j                  |   Š G ˆfd„dt        ¬«      }||_        | j
                  |_        |}n‚|| j                  j                  «       v r+| j                  | j                  |   «      }t        ||«      }n;|| j                  v r| j                  |«      }nt        d| j                  › d|› �«      ‚t        | ||«       |S )Nc                   ó   •— e Zd ZW ° Zˆ fd„Zy)ú,_LazyModule.__getattr__.<locals>.Placeholderc                 ó   •— t        | ‰«       y r’   )rë  )r‡  rœ  r�  r#  s      €r)   r  z5_LazyModule.__getattr__.<locals>.Placeholder.__init__›  s   ø€ Ü% dÐ,<Õ=r•   N)rÖ  rö  r÷  ró  r  )r#  s   €r)   ÚPlaceholderr,  ˜  s   ø„ Ù,�	õ>r•   r.  )Ú	metaclasszmodule z has no attribute )r  r  r  rí  rÖ  r  rö  r  Ú_get_moduler    r  r  Úsetattr)r‡  rç  r.  r‰  r"  r#  s        @r)   Ú__getattr__z_LazyModule.__getattr__’  sõ   ø€ Ø�4—=‘=Ñ Ø—=‘= Ñ&Ð&Ø�4×/Ñ/×4Ñ4Ó6Ñ6Ø#×;Ñ;¸DÑAÐö>¬õ >ð $(ˆKÔ Ø%)§]¡]ˆKÔ"à‰EØ�T×*Ñ*×/Ñ/Ó1Ñ1Ø×%Ñ% d×&;Ñ&;¸DÑ&AÓBˆFÜ˜F DÓ)‰EØ�T—]‘]Ñ"Ø×$Ñ$ TÓ*‰Eä  7¨4¯=©=¨/Ð9KÈDÈ6Ð!RÓSÐSä��d˜EÔ"Øˆr•   Úmodule_namec           	      óª   — 	 t        j                  d|z   | j                  «      S # t        $ r$}t	        d| j                  › d|› d|› �«      |‚d }~ww xY w)Nr0  zFailed to import z@ because of the following error (look up to see its traceback):
)r   r   rÖ  r"   rp  )r‡  r3  Úes      r)   r0  z_LazyModule._get_module­  sf   € ð	Ü×*Ñ*¨3°Ñ+<¸d¿m¹mÓLÐLøÜò 	ÜØ# D§M¡M ?°!°K°=ð A!Ø!" ð%óð ðûð	ús   ‚"% ¥	A®AÁAc                 ó`   — | j                   | j                  | j                  | j                  ffS r’   )rá  r   r  r!  )r‡  s    r)   Ú
__reduce__z_LazyModule.__reduce__¶  s&   € Ø—‘ §¡¨T¯]©]¸D×<RÑ<RÐ SÐTÐTr•   )NN)rÖ  rö  r÷  rø  rw  ÚIMPORT_STRUCTURE_Tr
   r   Ú	machineryÚ
ModuleSpecr   Úobjectr  r'  r   r2  r0  r7  rù  rú  s   @r)   r  r  ?  s’   ø„ ñð AEØ+/ñ@6àð@6ð ð@6ð -ð	@6ð
 ˜i×1Ñ1×<Ñ<Ñ=ð@6ð ˜C ˜KÑ(õ@6ôFð ð ¨ó ð6 só öUr•   r  c                   ó   — e Zd ZdZy)ÚOptionalDependencyNotAvailablezPInternally used error class for signalling an optional dependency was not found.N)rÖ  rö  r÷  rø  r”   r•   r)   r=  r=  º  s   „ ÚZr•   r=  r  c                 ó*  — d}t         j                  j                  | |«      }t        j                  j                  ||| g¬«      }t        j                  j                  |«      }|j                  j                  |«       t        j                  |   }|S )zþImports transformers directly

    Args:
        path (`str`): The path to the source file
        file (`str`, *optional*): The file to join with the path. Defaults to "__init__.py".

    Returns:
        `ModuleType`: The resulting imported module
    Útransformers)Úsubmodule_search_locations)rt  r  rå  r   r   Úspec_from_file_locationÚmodule_from_specÚloaderÚexec_modulerW  rX  )r  Úfilerç  ÚlocationÚspecr"  s         r)   Údirect_transformers_importrH  ¾  su   € ð €DÜ�w‰w�|‰|˜D $Ó'€HÜ�>‰>×1Ñ1°$¸Ð^bÐ]cÐ1Ód€DÜ�^‰^×,Ñ,¨TÓ2€FØ‡K�K×Ñ˜FÔ#Ü�[‰[˜Ñ€FØ€Mr•   r”   )rÿ   c                 ó‚   ‡ — ‰ D ]  }|t         vsŒt        d|› �«      ‚ t        ‰ t        «      st        d«      ‚ˆ fd„}|S )a  
    This decorator enables two things:
    - Attaching a `__backends` tuple to an object to see what are the necessary backends for it
      to execute correctly without instantiating it
    - The '@export' string is used to dynamically import objects
    zFBackend should be defined in the BACKENDS_MAPPING. Offending backend: zBackends should be a tuple.c                 ó   •— ‰| _         | S r’   )Ú
__backends)Úfunrÿ   s    €r)   Úinner_fnzexport.<locals>.inner_fnß  s   ø€ Ø!ˆŒØˆ
r•   )rØ  r  rÞ  rà  )rÿ   rÛ  rM  s   `  r)   ÚexportrN  Ñ  sX   ø€ ð ò qˆØÔ*Ò*ÜÐeÐfmÐenÐoÓpÐpðqô �h¤Ô&ÜÐ6Ó7Ð7ôð €Or•   c                 ó
   — d| v S )NÚmodeling_tf_r”   ©r5  s    r)   ú<lambda>rR  ç  s   € ˆn Ð!€ r•   )rÑ  c                 ó
   — d| v S )NÚmodeling_flax_r”   rQ  s    r)   rR  rR  è  s   € Ð !Ð#€ r•   )rŽ   c                 ó
   — d| v S )NÚ	modeling_r”   rQ  s    r)   rR  rR  é  s   € ˆk˜QÐ€ r•   r¬   c                 óJ   — | j                  d«      xr | j                  d«      S )NÚtokenization_Ú_fast)rð  ÚendswithrQ  s    r)   rR  rR  ê  s   € ˆa�l‰l˜?Ó+ÒC°·
±
¸7Ó0C€ r•   )ry   c                 ó\  — d| vrg S d}| j                  «       }t        |«      D ]  \  }}|j                  d«      sŒ|}Œ |€g S ||d }|d   j                  d«      st        d«      ‚|d   j	                  d«      rR|d   j                  d«      d   j                  d«      j                  d	«      D �cg c]  }|j                  d
«      ‘Œ c}S g }t        dt        |«      «      D ]?  }||   j                  «       dk(  r|c S |j                  ||   j                  d«      «       ŒA |S c c}w )z�
    Returns the content of the __all__ variable in the file content.
    Returns None if not defined, otherwise returns a list of strings.
    r  Nr   z`fetch__all__ accepts a list of lines, with the first line being the __all__ variable declarationú]ú=r   z []ú,z"' z"', )
Ú
splitlinesÚ	enumeraterð  r  rZ  r6  ÚstripÚranger  r  )Úfile_contentÚstart_indexÚlinesÚindexÚlineræ  Ú_allÚ__all__line_indexs           r)   Úfetch__all__rj  î  sI  € ð ˜Ñ$Øˆ	à€KØ×#Ñ#Ó%€EÜ  Ó'ò  ‰ˆˆtØ�?‰?˜9Õ%Ø‰Kð ð
 ÐØˆ	à�+�,Ð€Eà�‰8×Ñ˜yÔ)ÜØnó
ð 	
ð
 ˆQ�x×Ñ˜ÔØ-2°1©X¯^©^¸CÓ-@ÀÑ-C×-IÑ-IÈ%Ó-P×-VÑ-VÐWZÓ-[Ö\ c�—	‘	˜&Õ!Ò\Ð\ð ˆÜ!& q¬#¨e«*Ó!5ò 	EÐØÐ&Ñ'×-Ñ-Ó/°3Ò6Ø’à—‘˜EÐ"3Ñ4×:Ñ:¸7ÓCÕDð		Eð ˆùò ]s   Â3D)c                 ó*
  — i }t         j                  j                  | «      rÝ| }g }t        j                  | «      D ]À  }|dk7  rjt         j                  j                  t         j                  j	                  | |«      «      r-t        t         j                  j	                  | |«      «      ||<   Œrt         j                  j                  t         j                  j	                  ||«      «      rŒ°|j                  |«       ŒÂ nt         j                  j                  | «      }t        j                  |«      D �cg c]B  }t         j                  j                  t         j                  j	                  ||«      «      rŒA|‘ŒD }}d|v r|j                  d«       d„ } |d|«      r |d|«      r|D �cg c]	  }d|vsŒ|‘Œ }}i }|D �]-  }|j                  d«      sŒt        t         j                  j	                  ||«      d¬«      5 }|j                  «       }	d	d	d	«       |d	d
 }d}
d}d}t        j                  «       D ]  \  }} ||«      sŒ|} n t        «       }d	v �r5|	j                  d«      }t!        |«      D �]  \  }}|j#                  d«      r|j#                  d«      sŒ*d}d|
v �rÝd}d|
v r||
j                  d«      d   j                  d«      d   j                  d«      d   }t%        t'        |j                  d«      D �cg c]  }|sŒ|j)                  d«      ‘Œ c}«      «      }n¥d||dz      v r™g }||| D ]ƒ  }d|v r|j                  d«      d   }d|v sd|v rLd|v r(|j+                  d„ |j                  d«      D «       «       n |j                  |j)                  d«      «       |j)                  «       dk(  sŒƒ n t%        |«      }nd}t-        ||z   «      }||vri ||<   |||   vrt        «       ||   |<   |j#                  d«      s|j#                  d«      sd }nc|j#                  d«      rd!nd"}||d	 j                  d«      d   j)                  d#«      }||   |   j/                  |«       |j/                  |«       |r�Œ|}
|}�Œ d$|	v s�Œ×t1        |	«      D ]I  }||vsŒt-        |«      }||vri ||<   |||   vrt        «       ||   |<   ||   |   j/                  |«       ŒK �Œ0 i |¥|¥}|S c c}w c c}w # 1 sw Y   �ŒóxY wc c}w )%aŒ	  
    This method takes the path to a file/a folder and returns the import structure.
    If a file is given, it will return the import structure of the parent folder.

    Import structures are designed to be digestible by `_LazyModule` objects. They are
    created from the __all__ definitions in each files as well as the `@export` decorators
    above methods and objects.

    The import structure allows explicit display of the required backends for a given object.
    These backends are specified in two ways:

    1. Through their `@export`, if they are exported with that decorator. This `@export` decorator
       accepts a `backend` tuple kwarg mentioning which backends are required to run this object.

    2. If an object is defined in a file with "default" backends, it will have, at a minimum, this
       backend specified. The default backends are defined according to the filename:

       - If a file is named like `modeling_*.py`, it will have a `torch` backend
       - If a file is named like `modeling_tf_*.py`, it will have a `tf` backend
       - If a file is named like `modeling_flax_*.py`, it will have a `flax` backend
       - If a file is named like `tokenization_*_fast.py`, it will have a `tokenizers` backend

    Backends serve the purpose of displaying a clear error message to the user in case the backends are not installed.
    Should an object be imported without its required backends being in the environment, any attempt to use the
    object will raise an error mentioning which backend(s) should be added to the environment in order to use
    that object.

    Here's an example of an input import structure at the src.transformers.models level:

    {
        'albert': {
            frozenset(): {
                'configuration_albert': {'AlbertConfig', 'AlbertOnnxConfig'}
            },
            frozenset({'tokenizers'}): {
                'tokenization_albert_fast': {'AlbertTokenizerFast'}
            },
        },
        'align': {
            frozenset(): {
                'configuration_align': {'AlignConfig', 'AlignTextConfig', 'AlignVisionConfig'},
                'processing_align': {'AlignProcessor'}
            },
        },
        'altclip': {
            frozenset(): {
                'configuration_altclip': {'AltCLIPConfig', 'AltCLIPTextConfig', 'AltCLIPVisionConfig'},
                'processing_altclip': {'AltCLIPProcessor'},
            }
        }
    }
    Ú__pycache__ú__init__.pyc                 ó,   ‡ — t        ˆ fd„|D «       «      S )Nc              3   ó&   •K  — | ]  }‰|v –— Œ
 y ­wr’   r”   )rÚ  r#  Ú	substrings     €r)   rÜ  zLcreate_import_structure_from_path.<locals>.find_substring.<locals>.<genexpr>f  s   øè ø€ Ò1 a�9 ”>Ñ1ùs   ƒ)r  )rp  Úlist_s   ` r)   Úfind_substringz9create_import_structure_from_path.<locals>.find_substringe  s   ø€ ÜÓ1¨5Ô1Ó1Ð1r•   Úmodular_rV  z.pyzutf-8)ÚencodingNéýÿÿÿrÝ  r   r”   z@exportú
)ú ú	ú@ú)Frÿ   z	backends=r   ú(rz  z, z'",r]  ú"ú'c              3   ó>   K  — | ]  }|j                  d «      –— Œ y­w)ú()"', N)ra  rÙ  s     r)   rÜ  z4create_import_structure_from_path.<locals>.<genexpr>²  s   è ø€ Ò3uÐQX°G·M±MÀ)×4LÑ3uùs   ‚r  ÚclassÚdefTrâ  r  ú:r  )rt  r  ÚisdirÚlistdirrå  Ú!create_import_structure_from_pathr  r  ÚremoverZ  ÚopenÚreadÚBASE_FILE_REQUIREMENTSr  rì  r6  r`  rð  rà  Úsortedra  r  r	  Úaddrj  )Úmodule_pathr  Ú	directoryÚadjacent_modulesÚfrr  r"  Úmodule_requirementsr3  rc  Úprevious_lineÚprevious_indexÚbase_requirementsÚstring_checkÚrequirementsÚexported_objectsre  rf  rg  Ú	skip_lineÚbackends_stringÚbrÿ   Úbackend_linerd  Úobject_nameÚ_all_objects                              r)   r…  r…    s-  € ðl ÐÜ	‡w�w‡}�}�[Ô!Øˆ	ØÐä—‘˜KÓ(ò 	+ˆAØ�MÒ!¤b§g¡g§m¡m´B·G±G·L±LÀÈaÓ4PÔ&QÜ&GÌÏÉÏÉÐU`ÐbcÓHdÓ&eÐ  Ò#ä—W‘W—]‘]¤2§7¡7§<¡<°	¸1Ó#=Õ>Ø ×'Ñ'¨Õ*ñ	+ô —G‘G—O‘O KÓ0ˆ	Ü')§z¡z°)Ó'<Ön !ÄBÇGÁGÇMÁMÔRT×RYÑRY×R^ÑR^Ð_hÐjkÓRlÕDmšAÐnÐÐnð
 Ð(Ñ(Ø×Ñ Ô.ò2ñ �jÐ"2Ô3¹À{ÐTdÔ8eØ1AÖ^ vÀZÐW]ÒE]šFÐ^ÐÐ^àÐØ'ó pPˆà×#Ñ# EÔ*Øä”"—'‘'—,‘,˜y¨+Ó6ÀÔIð 	$ÈQØŸ6™6›8ˆL÷	$ð " # 2Ð&ˆàˆØˆð
 ÐÜ*@×*FÑ*FÓ*Hò 	Ñ&ˆL˜,Ù˜KÕ(Ø$0Ð!Ùð	ô ›5ÐØ˜Ò$Ø ×&Ñ& tÓ,ˆEÜ(¨Ó/ó G+‘��tð —?‘?Ð#8Ô9À$Ç/Á/ÐR[ÔB\Øð
 "�	à Ò-Ø %�Ið " ]Ñ2Ø*7×*=Ñ*=¸kÓ*JÈ1Ñ*M×*SÑ*SÐTWÓ*XÐYZÑ*[×*aÑ*aÐbeÓ*fÐghÑ*i˜Ü#(¬È/×J_ÑJ_Ð`dÓJeÖ0kÀQÒij°·±¸µÒ0kÓ)lÓ#m™ð$ $ u¨^¸aÑ-?Ñ'@Ñ@Ø#%˜Ø,1°.ÀÐ,Gò &˜LØ)¨\Ñ9Ø/;×/AÑ/AÀ#Ó/FÀqÑ/I Ø" lÑ2°c¸\Ñ6IØ#'¨<Ñ#7Ø$,§O¡OÑ3uÐ\h×\nÑ\nÐosÓ\tÔ3uÕ$uà$,§O¡O°L×4FÑ4FÀyÓ4QÔ$Rð  ,×1Ñ1Ó3°sÓ:Ù %ð&ô $)¨£?™ð $&˜ä(¨Ð4EÑ)EÓF�HØÐ':Ñ:Ø8:Ð+¨HÑ5Ø"Ð*=¸hÑ*GÑGÜEHÃUÐ+¨HÑ5°kÑBàŸ?™?¨7Ô3¸D¿O¹OÈEÔ<RØ$(™	à+/¯?©?¸7Ô+C¡aÈ˜Ø&*¨;¨<Ð&8×&>Ñ&>¸sÓ&CÀAÑ&F×&LÑ&LÈSÓ&Q˜Ø+¨HÑ5°kÑB×FÑFÀ{ÔSØ(×,Ñ,¨[Ô9ã Ø$(�MØ%*’NðOG+ðV ˜Ó$Ü+¨LÓ9ò P�ØÐ&6Ò6Ü(Ð):Ó;�HØÐ':Ñ:Ø8:Ð+¨HÑ5Ø"Ð*=¸hÑ*GÑGÜEHÃUÐ+¨HÑ5°kÑBà'¨Ñ1°+Ñ>×BÑBÀ;ÕOòPðQpPðd CÐ-ÐBÐ1AÐBÐØÐùòG oùò _÷	$ñ 	$üòP 1ls1   Ä5AS9Å8S9Æ,	S>Æ6S>ÈTÌTÌTÔT	c                 óâ   ‡‡— ˆfd„Šdˆfd„	Š| }t        d«      D ]
  } ‰|«      }Œ i }|j                  «       j                  «       D ]$  \  }}t        |t        «      r||= Œ ‰|«      ||<   Œ& |S )a•  
    This method takes as input an unordered import structure and brings the required backends at the top-level,
    aggregating modules and objects under their required backends.

    Here's an example of an input import structure at the src.transformers.models level:

    {
        'albert': {
            frozenset(): {
                'configuration_albert': {'AlbertConfig', 'AlbertOnnxConfig'}
            },
            frozenset({'tokenizers'}): {
                'tokenization_albert_fast': {'AlbertTokenizerFast'}
            },
        },
        'align': {
            frozenset(): {
                'configuration_align': {'AlignConfig', 'AlignTextConfig', 'AlignVisionConfig'},
                'processing_align': {'AlignProcessor'}
            },
        },
        'altclip': {
            frozenset(): {
                'configuration_altclip': {'AltCLIPConfig', 'AltCLIPTextConfig', 'AltCLIPVisionConfig'},
                'processing_altclip': {'AltCLIPProcessor'},
            }
        }
    }

    Here's an example of an output import structure at the src.transformers.models level:

    {
        frozenset({'tokenizers'}): {
            'albert.tokenization_albert_fast': {'AlbertTokenizerFast'}
        },
        frozenset(): {
            'albert.configuration_albert': {'AlbertConfig', 'AlbertOnnxConfig'},
            'align.processing_align': {'AlignProcessor'},
            'align.configuration_align': {'AlignConfig', 'AlignTextConfig', 'AlignVisionConfig'},
            'altclip.configuration_altclip': {'AltCLIPConfig', 'AltCLIPTextConfig', 'AltCLIPVisionConfig'},
            'altclip.processing_altclip': {'AltCLIPProcessor'}
        }
    }

    c                 ó4  •— i }| j                  «       D ]�  \  }}t        |t        «      s|||<   Œt        d„ |j	                  «       D «       «      r;|j                  «       D ]'  \  }}t        |t
        «      sŒ||vri ||<   |||   |<   Œ) Œw ‰|«      ||<   Œƒ |S )Nc              3   ó<   K  — | ]  }t        |t        «      –— Œ y ­wr’   r  )rÚ  Úvs     r)   rÜ  zGspread_import_structure.<locals>.propagate_frozenset.<locals>.<genexpr>	  s   è ø€ ÒE°!”Z ¤9×-ÑEùr
  )r  rÞ  Údictr  r  r	  )Úunordered_import_structureÚtuple_first_import_structureÚ_keyÚ_valueÚkr   Úpropagate_frozensets         €r)   r§  z4spread_import_structure.<locals>.propagate_frozenset	  s´   ø€ Ø')Ð$Ø6×<Ñ<Ó>ò 	Q‰LˆD�&Ü˜f¤dÔ+Ø5;Ð,¨TÒ2äÑE°v·{±{³}ÔEÔEà"ŸL™L›Nò B‘D�A�qÜ! !¤YÕ/ØÐ$@Ñ@Ø>@Ð8¸Ñ;Ø@AÐ4°QÑ7¸Ò=ñ	Bñ 6IÈÓ5PÐ,¨TÒ2ð	Qð ,Ð+r•   c                 óø   •— g }| j                  «       D ]Z  \  }}|�|› d|› �n|}t        |t        «      r'|j                   ‰||«      j                  «       «       ŒH|j	                  ||f«       Œ\ t        |«      S r×  )r  rÞ  r¡  r  r  )Ú_dictÚprevious_keyr  r¤  r¥  Úflatten_dicts        €r)   r«  z-spread_import_structure.<locals>.flatten_dict$	  sz   ø€ ØˆØ!ŸK™K›Mò 	-‰LˆD�&Ø/;Ð/G�l�^ 1 T FÑ+ÈTˆDÜ˜&¤$Ô'Ø—‘™\¨&°$Ó7×=Ñ=Ó?Õ@à—‘˜d F˜^Õ,ð	-ô �E‹{Ðr•   râ  r’   )rb  Úcopyr  rÞ  rw  )Únested_import_structureÚordered_import_structureÚiÚflattened_import_structurerõ  r‰  r«  r§  s         @@r)   Úspread_import_structurer±  â  s’   ù€ ô^,õ&ð  7Ðô �1‹Xò QˆÙ#6Ð7OÓ#PÑ ðQð "$ÐØ.×3Ñ3Ó5×;Ñ;Ó=ò B‰
ˆˆUÜ�cœ3ÔØ(¨Ñ-á.:¸5Ó.AÐ& sÒ+ð	Bð &Ð%r•   rŒ  c                 ó.   — t        | «      }t        |«      S )au  
    This method takes a module_path as input and creates an import structure digestible by a _LazyModule.

    Here's an example of an output import structure at the src.transformers.models level:

    {
        frozenset({'tokenizers'}): {
            'albert.tokenization_albert_fast': {'AlbertTokenizerFast'}
        },
        frozenset(): {
            'albert.configuration_albert': {'AlbertConfig', 'AlbertOnnxConfig'},
            'align.processing_align': {'AlignProcessor'},
            'align.configuration_align': {'AlignConfig', 'AlignTextConfig', 'AlignVisionConfig'},
            'altclip.configuration_altclip': {'AltCLIPConfig', 'AltCLIPTextConfig', 'AltCLIPVisionConfig'},
            'altclip.processing_altclip': {'AltCLIPProcessor'}
        }
    }

    The import structure is a dict defined with frozensets as keys, and dicts of strings to sets of objects.
    )r…  r±  )rŒ  r  s     r)   Údefine_import_structurer³  B	  s   € ô* 9¸ÓEÐÜ"Ð#3Ó4Ð4r•   c                  ó”  — t         j                  D � cg c]  } | j                  d«      sŒ| ‘Œ }} |D ]=  } t         j                  |    }t        |t        «      ri |_        t         j                  | = Œ? dt         j                  v r@t         j                  d   }t        |t        «      ri |_        t        j                  |«       yyc c} w )z—
    Clear cached Transformers modules to allow reloading modified code.

    This is useful when actively developing/modifying Transformers code.
    ztransformers.r?  N)rW  rX  rð  rÞ  r  r  r   Úreload)Úmod_nameÚtransformers_modulesr"  Úmain_modules       r)   Úclear_import_cacher¹  [	  s­   € ô 69·[±[Öi¨ÀH×DWÑDWÐXgÕDhšHÐiÐÐið )ò "ˆÜ—‘˜XÑ&ˆä�fœkÔ*Ø ˆFŒOÜ�K‰K˜Ñ!ð"ð œŸ™Ñ$Ü—k‘k .Ñ1ˆÜ�k¤;Ô/Ø#%ˆKÔ Ü×Ñ˜Õ%ð	 %ùò js
   “CªC)Fr’   )FF)T)rÝ  )rm  (€  rø  Úimportlib.machineryr   Úimportlib.metadataÚimportlib.utilrk  rt  r¯  rÒ  rW  r  Úcollectionsr   Ú	functoolsr   Ú	itertoolsr   Útypesr   Útypingr   r   r	   r
   r   r   r   Ú	packagingr   rÝ  r   Ú
get_loggerrÖ  r#   rw  Úboolr*   ÚENV_VARS_TRUE_VALUESr  ÚENV_VARS_TRUE_AND_AUTO_VALUESru  rv  Úupperr0   r1   ÚUSE_JAXr3   r4   r¦   ÚTORCH_FX_REQUIRED_VERSIONÚACCELERATE_MIN_VERSIONÚSCHEDULEFREE_MIN_VERSIONÚFSDP_MIN_VERSIONÚGGUF_MIN_VERSIONÚXLA_FSDPV2_MIN_VERSIONÚHQQ_MIN_VERSIONÚVPTQ_MIN_VERSIONÚTORCHAO_MIN_VERSIONr¥   r§   rÂ  rÏ   rÅ  rÈ  rÉ  r   r   rÌ  rÏ  rç  r-  r0  rË   rÒ   rÖ   rÚ   rÛ   r@  rG  r™   r�   r¯  r²  r   r   Ú_faiss_versionr$   r   rY  r\  r¯   rÛ  rÜ  r¶  r¹  r“   rO  r3  rá   r‚  r…  rM  rP  r  r'  r*  r  r!  r  r$  rd  r=  r•  r˜  r¹  r¼  rÞ   r·   rC  rF  r^  r¶  r¿  r8  r  r	  r  r  r  r  rn  r|  rI  r¥  r¨  ra  rL  rJ  r  r;  r‰  rŒ  r�  rý  rÄ   rÈ   r¼  r¿  r³   r´   rÂ  rÃ  rÆ  rÉ  r’  rÌ  rº   r¡   ÚinfoÚ_tf_versionrC  Ú
candidatesÚpkgrå   Ú_essentia_versionrè   Ú_pretty_midi_versionÚccl_versionr¢  rS  Ú_flax_versionÚ_jax_availableÚ_jax_versionr:  rä  r4  rØ  rb  Ú_torch_xla_versionr–   rš   rž   r¢   r©   r­   r°   rµ   r¸   r»   rÀ   rÂ   rÅ   rÉ   rÌ   rÐ   rÓ   r×   rÜ   rß   râ   ræ   ré   rî   rò   rõ   rø   rû   r  r  r  r  r)  r-  r8  r;  r>  rA  rD  rH  rK  rN  rQ  rT  rW  rZ  r]  rg  rk  r¿   r¾   r€  r  r  rš  r�  r¥  r©  r­  r°  r³  r·  rº  r½  rÀ  rÃ  rÆ  rÊ  rÍ  rÐ  rÔ  rà  rå  rè  rî  rò  rõ  rø  rû  rþ  r  r  r  r
  r  r  r  r  r  r  r  r"  r%  r(  r+  r.  r1  r4  r6  r9  r<  rA  rD  rG  rJ  rM  rP  r\  r_  rb  re  rp  rw  rz  r}  r€  rƒ  r†  rŠ  rŽ  r�  r“  r–  r™  r   r£  r¦  r©  r«  r±  r´  r·  rº  r½  rÀ  rÄ  rÇ  rÊ  rÍ  ÚAV_IMPORT_ERRORÚYT_DLP_IMPORT_ERRORÚDECORD_IMPORT_ERRORÚCV2_IMPORT_ERRORÚDATASETS_IMPORT_ERRORÚTOKENIZERS_IMPORT_ERRORÚSENTENCEPIECE_IMPORT_ERRORÚPROTOBUF_IMPORT_ERRORÚFAISS_IMPORT_ERRORÚPYTORCH_IMPORT_ERRORÚTORCHVISION_IMPORT_ERRORrâ  rä  ÚBS4_IMPORT_ERRORÚSKLEARN_IMPORT_ERRORÚTENSORFLOW_IMPORT_ERRORÚDETECTRON2_IMPORT_ERRORÚFLAX_IMPORT_ERRORÚFTFY_IMPORT_ERRORÚLEVENSHTEIN_IMPORT_ERRORÚG2P_EN_IMPORT_ERRORÚ!PYTORCH_QUANTIZATION_IMPORT_ERRORÚ#TENSORFLOW_PROBABILITY_IMPORT_ERRORÚTENSORFLOW_TEXT_IMPORT_ERRORÚTORCHAUDIO_IMPORT_ERRORÚPANDAS_IMPORT_ERRORÚPHONEMIZER_IMPORT_ERRORÚUROMAN_IMPORT_ERRORÚSACREMOSES_IMPORT_ERRORÚSCIPY_IMPORT_ERRORÚSPEECH_IMPORT_ERRORÚTIMM_IMPORT_ERRORÚNATTEN_IMPORT_ERRORÚNUMEXPR_IMPORT_ERRORÚNLTK_IMPORT_ERRORÚVISION_IMPORT_ERRORÚPYTESSERACT_IMPORT_ERRORÚPYCTCDECODE_IMPORT_ERRORÚACCELERATE_IMPORT_ERRORÚCCL_IMPORT_ERRORÚESSENTIA_IMPORT_ERRORÚLIBROSA_IMPORT_ERRORÚPRETTY_MIDI_IMPORT_ERRORÚCYTHON_IMPORT_ERRORÚJIEBA_IMPORT_ERRORÚPEFT_IMPORT_ERRORÚJINJA_IMPORT_ERRORÚRICH_IMPORT_ERRORrØ  rë  Útyperí  rÿ  Ú
BACKENDS_Tr8  r  ÚBaseExceptionr=  rH  rN  r‰  rj  r…  r±  r³  r¹  r”   r•   r)   ú<module>r     sg  ðñó Û Û Û Û 	Û Û Û 
Û Ý #Ý Ý Ý ß D× DÑ Då å ð 
ˆ×	Ñ	˜HÓ	%€ò) Cð )¸ð )È%ÐPUÐVZÐ\_ÐV_ÑP`ÐbfÐPfÑJgó )òX 2Ð Ø 4× :Ñ :¸F¸8Ó DÐ à	�‰�‰˜ &Ó	)×	/Ñ	/Ó	1€Ø�J‰J�N‰N˜;¨Ó/×5Ñ5Ó7€	Ø
�*‰*�.‰.˜ VÓ
,×
2Ñ
2Ó
4€ð —
‘
—‘˜°Ó4×:Ñ:Ó<€à—Z‘Z—^‘^Ð$8¸&ÓA×GÑGÓIÐ ð *˜GŸM™M¨&Ó1Ð à!Ð Ø"Ð ØÐ ØÐ Ø Ð Ø€ØÐ ØÐ ñ .CÀ<Ð`dÔ-eÑ *Ð Ð*Ù'¨Ó/€Ù/°Ó?Ð Ù'¨Ó/€Ù!6°vÈdÔ!SÑ €�Ø—‘×(Ñ(¨Ó.°dÐ:€Ø—N‘N×,Ñ,¨XÓ6¸dÐBÐ Ù/°Ó?Ð Ù'¨Ó/€Ù-¨lÓ;Ð Ù/°Ó?Ð Ù'¨Ó5€Ù,¨[Ó9Ð Ù1FÀ~ÐfjÔ1kÑ .Ð Ð.à—‘×)Ñ)¨%Ó0¸Ð<€Ù.¨}Ó=Ð à—‘×)Ñ)¨%Ó0¸Ð<€Ø—N‘N×,Ñ,¨XÓ6¸dÐBÐ Ù+¨JÓ7Ð Ù-¨lÓ;Ð à—>‘>×+Ñ+¨GÓ4¸DÐ@Ð ð!Ø×'Ñ'×/Ñ/°Ó8€NØ
‡L�LÐ7¸Ð7GÐHÔIñ (¨Ó/€Ù)¨(Ó3Ð Ù+Ð,EÓFÐ Ù!6Ð7TÐeiÔ!jÑ €�Ù(¨Ó1Ð Ù(¨Ó2Ð Ù(¨Ó1Ð Ù,¨[Ó9Ð Ù.¨}Ó=Ð Ù*¨9Ó5Ð Ù)¨(Ó3Ð Ù'¨Ó/€Ù'¨Ó/€Ù)¨(Ó3Ð Ù*¨9Ó5Ð Ù,¨[Ó9Ð Ù,¨[Ó9Ð à—n‘n×.Ñ.¨uÓ5¸TÐAÐ Ù(¨Ó1Ð Ø$Ð ð)Ø×Ñ×ÑÐ/Ô0Ø#'Ð ð !*§¡× 8Ñ 8Ð9MÓ NÐVZÐ ZÐ Ù)¨(Ó3Ð Ù'¨Ó/€Ù-¨lÓ;Ð Ù)¨(Ó3Ð Ù)¨(Ó3Ð Ù*¨9Ó5Ð Ù.¨}Ó=Ð Ù+¨JÓ7Ð Ù.¨}Ó=Ð Ù)¨(Ó3Ð Ù"7Ð8NÓ"OÐ Ù)¨(Ó3Ð Ù-¨lÓ;Ð Ù.¨}Ó=Ð Ù(¨Ó1Ð Ù0°ÓAÐ Ù+¨GÓ4Ð Ù$9¸&ÐQUÔ$VÑ !Ð �MØ—^‘^×-Ñ-¨iÓ8ÀÐDÐ Ùð#Ø×Ñ×"Ñ" >Ô2ð %Ÿ>™>×3Ñ3°OÓDÈDÐPÐ Ù,¨[Ó9Ð Ù(¨Ó1Ð Ù+@ÀÐ]aÔ+bÑ (Ð Ð(Ù$9Ð:RÓ$SÐ !Ù2Ð3DÓEÐ Ù*¨9Ó5Ð Ù'¨Ó/€Ù-¨lÓ;Ð Ù-¨lÓ;Ð Ù'<¸YÐW[Ô'\Ñ $Ð Ð$Ù-¨lÓ;Ð Ù/DÀ]ÐcgÔ/hÑ ,Ð Ð,Ù& uÓ-€Ù,¨[Ó9Ð Ù4°UÈ4ÔPÑ €�Ù+¨JÓ7Ð Ù+¨JÓ7Ð Ù/°Ó?Ð Ù)¨(Ó3Ð Ù'¨Ó5€Ù'¨Ó/€à€ØÐ ØÐ-Ñ-°&Ð@TÑ2TÙ'<¸WÐUYÔ'ZÑ$Ð‘nà
‡K‚KÐ9Ô:ØÐð €Ø€ØÐ-Ñ-Ø�MàÐ.Ñ.°9ÐDXÑ3Xð "Ÿ™×0Ñ0°Ó>ÀdÐJˆÙðˆJð ˆKà!ò �ðØ"+×"4Ñ"4×"<Ñ"<¸SÓ"A�KÙðð (¨tÐ3ˆMÙØˆw�}‰}˜[Ó)¨M¨G¯M©M¸#Ó,>Ò>Ø—’Ø8¸¸ÐEoÐpôð !&‘à�ŠÐCÔDð  —n‘n×.Ñ.¨zÓ:À$ÐFÐ ðØ!×*Ñ*×2Ñ2°:Ó>ÐØ
‡L�LÐ:Ð;LÐ:MÐNÔOð
 #Ÿ™×1Ñ1°-Ó@ÈÐLÐ ð#Ø$×-Ñ-×5Ñ5°mÓDÐØ
‡L�LÐ=Ð>RÐ=SÐTÔUð
 €à‡N�N×Ñ˜[Ó)°Ð5ò KØ‡~�~×ÑÐ =Ó>ÀdÐJð ðØ×$Ñ$×,Ñ,Ð-=Ó>€KØ
‡L�LÐ3°K°=ÐAÔBð
 €Ø
Ð+Ñ+Ù%:¸6ÐRVÔ%WÑ"€O�]ÙÙ'<¸UÐSWÔ'XÑ$ˆ˜ÙØ�KŠK˜, | n°OÀMÀ?ÐR]Ð^Õ_à/4Ð4ˆO˜nØ+0Ð0ˆL˜=ð Ð ÙØ!�G—M‘M .Ó1€MØ(×.Ò.°×0CÒ0CÐDØ!×'Ò'Ø!×'Ò'ðIñ Ðð Ð ØÐ(Ñ(Ù/DÀ[ÐaeÔ/fÑ,ÐÐ,ÙØ�ŠÐ(Ð);Ð(<¸KÐHÔIòòòòð 0Fñ f¨ó fò	òð )8ñ X #ó XòòòCò&Cò"òHò#ò#òò ð 2Jñ j¨3ó jò"òòò"òòòòòò
¨°©ó 
òHòò)ñ ƒñó ðñ> ƒñó ðò.ò$òòòò"òòòòòòòð óó ðñ( ƒóó ðñ ƒó>ó ð>ñ$ ƒóó ðñ0 ƒó@ó ð@ð, ñ,ó ð,ð^ ñJó ðJòCò%òò&ò"Eòò!òòòò!òòð *:ñ Z 3ó Zòòò
ò 3ó ð( ó>ó ð>ñ8 ƒñó ðð>°ó >òñ0 ƒñ]ó ð]ñ ƒðe°Cò eó ñeñ ƒòd¨sð dÀò dó ñdó"!óóóó$óð *:ñ ] 3ô ]óCð *:ñ ` 3ô `óóó(ó
ó)ó ó óó!ó"óJó"ó!ð ñó ñó"óóó<óCóô"+ô-ôô$ô$ô0.ô ôôôô!ð -@ñ ` cõ `ô!ô
ô!ôô
ôô ôôGôfô=ôôôô ô7ô_ôôñ
�ñÑ ñÑ ñÑ ñÑ ñ$
Ñ ñÑ ñÑ ñÑ ñÑ ñÑ ñ
 Ñ ñ Ñ ñÑ ñ
Ñ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñ%Ñ !ñ'Ñ #ñ Ñ ñÑ ñÑ ñÑ ñ
Ñ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñÑ ñ
Ñ ñ
Ñ ñ
Ñ ñ
Ñ ñ
 ð.Ø	�¡Ð1Ð2ð.à	Ð!Ñ#3Ð4Ð5ð.ð 
Ð!Ñ#3Ð4Ð5ð.ð 
Ð+Ñ-BÐCÐDð	.ð
 
Ð'Ñ)<Ð=Ð>ð.ð 
Ð/Ñ1HÐIÐJð.ð 
Ð+Ñ-BÐCÐDð.ð 
Ñ%Ñ'9Ð:Ð;ð.ð 
Ð#Ñ%6Ð7Ð8ð.ð 
Ð#Ñ%6Ð7Ð8ð.ð 
Ð'Ñ)<Ð=Ð>ð.ð 
Ñ'Ñ)<Ð=Ð>ð.ð 
Ñ/Ñ1HÐIÐJð.ð 
Ñ'Ñ)<Ð=Ð>ð.ð 
Ð1Ñ3KÐLÐMð.ñ  
Ñ1Ñ3KÐLÐMð!.ð" 
Ð)Ñ+?Ð@ÐAð#.ñ$ 
Ñ+Ñ-BÐCÐDð%.ð& 
Ð1Ñ3KÐLÐMð'.ð( 
Ñ1Ñ3KÐLÐMð).ð* 
Ð/Ñ1HÐIÐJð+.ð, 
 Ñ"CÑEfÐ!gÐhð-.ð. 
Ñ5Ñ7QÐRÐSð/.ð0 
Ñ)Ñ+?Ð@ÐAð1.ñ2 
Ñ'Ñ)<Ð=Ð>ð3.ð4 
"Ñ$GÑIlÐ#mÐnð5.ñ6 
�Ñ!8Ð9Ð:ð7.ð8 
Ñ9Ñ;WÐXÐYð9.ð: 
Ñ#Ñ%6Ð7Ð8ð;.ð< 
Ñ/Ñ1HÐIÐJð=.ð> 
Ñ'Ñ)<Ð=Ð>ð?.ð@ 
Ñ#Ñ%6Ð7Ð8ðA.ðB 
Ñ/Ñ1HÐIÐJðC.ðD 
Ð%Ñ';Ð<Ð=ðE.ðF 
Ð1Ñ3KÐLÐMðG.ñH 
Ñ'Ñ)<Ð=Ð>ðI.ðJ 
Ñ%Ñ'9Ð:Ð;ðK.ðL 
Ð/Ñ1HÐIÐJðM.ðN 
Ñ,Ñ.>Ð?Ð@ðO.ñP 
Ñ'Ñ)<Ð=Ð>ðQ.ðR 
Ñ%Ñ'9Ð:Ð;ðS.ðT 
Ð#Ñ%6Ð7Ð8ðU.ñV 
Ñ%Ñ'9Ð:Ð;ðW.ðX 
Ð'Ñ)<Ð=Ð>ðY.ðZ 
Ñ#Ñ%6Ð7Ð8ð[.ó0Ñ ôf+ö(	.‘$õ 	.ôð �s‰^�
Ø™* d¨3°°C±¨=Ñ&9Ð9Ñ:Ñ öxU�*õ xUöv[¡]õ [ó Sð Àõ ñ& ÷ ò, "¡7Ú#¡YÚ¡
ÚCÁ_ð	Ñ ô'ñT ƒòFó ñFôR]&ñ@5¨ð 5Ñ1Cõ 5õ2&øðaF ×Ñ×.Ñ.ò !ð!Ø"×+Ñ+×3Ñ3°KÓ@ˆØ�‰Ð;¸NÐ;KÐLÕMøØ×Ñ×2Ñ2ò !Ø Òð!ýð	!ûð< ×Ñ×.Ñ.ò )Ø#(Ó ð)ûð4 ×Ñ×2Ñ2ò #Ø"Óð#ûð@ !×)Ñ)×>Ñ>ò Úðûð" ×Ñ×.Ñ.ò ØÓðûð ×Ñ×.Ñ.ò #Ø"Óð#ûð ×Ñ×.Ñ.ò ØÓðús¢   Ë/v< Î)x. Òy ×6y2Ú/z Û/z4 Ý/{ ö<x+÷/xøx+øx$ø!x+ø#x$ø$x+ø*x+ø.yùyùy/ù.y/ù2zúzúz1ú0z1ú4{û{û{5û4{5