
    Z jK                        S r SSKrSSKrSSKrSSKJr  SSKJrJrJ	r	J
r
  SSKJrJr  SSKJr  SSKJrJr  SS	KJrJr  S
SKJrJr  \R2                  " \5      r\" S\S\4   S9r\R:                  " SSSSS.5        \" S(0 SS0D\D6r\R:                  " SSSS.5        / rS\4S jr S\S-  4S jr! " S S\\\"\   4   5      r#\#" \5      r$ " S S\\\4   5      r%S \\&\   -  4S! jr'S)S" jr( S)S#\)S\\/\4   4S$ jjr* " S% S&5      r+S'S&/r,g)*zAuto Config class.    N)OrderedDict)CallableIteratorKeysView
ValuesView)AnyTypeVar   )PreTrainedConfig)get_class_from_dynamic_moduleresolve_trust_remote_code)CONFIG_NAMElogging   )CONFIG_MAPPING_NAMES!SPECIAL_MODEL_TYPE_TO_MODULE_NAME
_CallableT.)boundEvollaConfigMLCDVisionConfig'VibeVoiceAcousticTokenizerDecoderConfig'VibeVoiceAcousticTokenizerEncoderConfig)EvollaModelmlcd$vibevoice_acoustic_tokenizer_decoder$vibevoice_acoustic_tokenizer_encoderzgpt-sw3
GPT2Configevollavibevoice_acoustic_tokenizer)r   r   r   returnc                     U [         ;   a  [         U    n U [        ;   a  SU  3n U $ U R                  SS5      n U [        ;   a  SU  3n U $ )z2Converts a config key to the corresponding module.zdeprecated.-_)r   DEPRECATED_MODELSreplace)keys    |/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/auto/configuration_auto.pymodel_type_to_module_namer(   >   s[     ///4##u%C

++c3
C
C5!J    c                     [         R                  " 5        H  u  pX :X  d  M  Us  $    [        R                  R                  5        H  u  pUR                  U :X  d  M  Us  $    g)z<Converts a config class name to the corresponding model typeN)r   itemsCONFIG_MAPPING_extra_content__name__)configr&   clss      r'   config_class_to_model_typer1   O   sT    (..0=J 1 #11779<<6!J : r)   c                       \ rS rSrSrSS jrS\S\\   4S jr	S\
\   4S jrS\
\\      4S	 jrS\
\\\\   4      4S
 jrS\\   4S jrS\S\4S jrSS\S\\   SS4S jjrSrg)_LazyConfigMapping[   zC
A dictionary that lazily load its values when they are requested.
r    Nc                 ,    Xl         0 U l        0 U l        g N)_mappingr-   _modulesselfmappings     r'   __init___LazyConfigMapping.__init__`   s     r)   r&   c                    XR                   ;   a  U R                   U   $ XR                  ;  a  [        U5      eU R                  U   n[        U5      nX0R                  ;  a'  [
        R                  " SU 3S5      U R                  U'   [        U R                  U   U5      (       a  [        U R                  U   U5      $ [
        R                  " S5      n[        XB5      $ )N.transformers.modelstransformers)	r-   r7   KeyErrorr(   r8   	importlibimport_modulehasattrgetattr)r:   r&   valuemodule_nametransformers_modules        r'   __getitem___LazyConfigMapping.__getitem__e   s    %%%&&s++mm#3-c"/4mm+)2)@)@1[MARTi)jDMM+&4==-u554==5u== (55nE*22r)   c                     [        U R                  R                  5       5      [        U R                  R                  5       5      -   $ r6   )listr7   keysr-   r:   s    r'   rN   _LazyConfigMapping.keysv   s3    DMM&&()D1D1D1I1I1K,LLLr)   c                     U R                    Vs/ s H  oU   PM	     sn[        U R                  R                  5       5      -   $ s  snf r6   )r7   rM   r-   valuesr:   ks     r'   rR   _LazyConfigMapping.valuesy   s9    !%/AQ/$t7J7J7Q7Q7S2TTT/s   Ac                     U R                    Vs/ s H  oX   4PM
     sn[        U R                  R                  5       5      -   $ s  snf r6   )r7   rM   r-   r+   rS   s     r'   r+   _LazyConfigMapping.items|   s;    &*mm4mDGm4tD<O<O<U<U<W7XXX4s   Ac                     [        [        U R                  R                  5       5      [        U R                  R                  5       5      -   5      $ r6   )iterrM   r7   rN   r-   rO   s    r'   __iter___LazyConfigMapping.__iter__   s8    D++-.d6I6I6N6N6P1QQRRr)   itemc                 H    XR                   ;   =(       d    XR                  ;   $ r6   )r7   r-   r:   r\   s     r'   __contains___LazyConfigMapping.__contains__   s    }}$C0C0C(CCr)   rG   c                 j    XR                   ;   a  U(       d  [        SU S35      eX R                  U'   g)z/
Register a new configuration in this mapping.
'z>' is already used by a Transformers config, pick another name.N)r7   
ValueErrorr-   )r:   r&   rG   exist_oks       r'   register_LazyConfigMapping.register   s3     --q%cdee#(C r)   )r-   r7   r8   r    NF)r.   
__module____qualname____firstlineno____doc__r<   strtyper   rJ   rM   rN   rR   tupler+   r   rZ   objectboolr_   re   __static_attributes__ r)   r'   r3   r3   [   s    
3s 3t,<'= 3"Md3i MUT"234 UYtE#t,<'="=>? YS(3- SD DD D)C )-=(> )SW ) )r)   r3   c                       \ rS rSrSrS rS rS rS\\	   4S jr
S\\	   4S jrS\\	   4S	 jrS\\	   4S
 jrS\S\4S jrSrg)_LazyLoadAllMappings   z
A mapping that will load all pairs of key values at the first access (either by indexing, requestions keys, values,
etc.)

Args:
    mapping: The mapping to load.
c                 ,    Xl         SU l        0 U l        g )NF)r7   _initialized_datar9   s     r'   r<   _LazyLoadAllMappings.__init__   s    !
r)   c                    U R                   (       a  g U R                  R                  5        HP  u  p[        U5      n[        R
                  " SU 3S5      n[        XB5      nU R                  R                  U5        MR     SU l         g )Nr?   r@   T)	rx   r7   r+   r(   rC   rD   rF   ry   update)r:   
model_typemap_namerH   moduler;   s         r'   _initialize _LazyLoadAllMappings._initialize   sr    $(MM$7$7$9 J3J?K,,q->@UVFf/GJJg&	 %: !r)   c                 @    U R                  5         U R                  U   $ r6   r   ry   )r:   r&   s     r'   rJ    _LazyLoadAllMappings.__getitem__   s    zz#r)   r    c                 V    U R                  5         U R                  R                  5       $ r6   r   ry   rN   rO   s    r'   rN   _LazyLoadAllMappings.keys       zz  r)   c                 V    U R                  5         U R                  R                  5       $ r6   )r   ry   rR   rO   s    r'   rR   _LazyLoadAllMappings.values   s!    zz  ""r)   c                 V    U R                  5         U R                  R                  5       $ r6   r   rO   s    r'   r+   _LazyLoadAllMappings.items   r   r)   c                 L    U R                  5         [        U R                  5      $ r6   )r   rY   ry   rO   s    r'   rZ   _LazyLoadAllMappings.__iter__   s    DJJr)   r\   c                 >    U R                  5         XR                  ;   $ r6   r   r^   s     r'   r_   !_LazyLoadAllMappings.__contains__   s    zz!!r)   )ry   rx   r7   N)r.   ri   rj   rk   rl   r<   r   rJ   r   rm   rN   r   rR   r+   r   rZ   rp   rq   r_   rr   rs   r)   r'   ru   ru      si    

!!hsm !#
3 #!x} ! (3-  " "D "r)   ru   model_classc                     [        U [        [        -  5      (       a*  SR                  U  Vs/ s H  oc  M  SU S3PM     sn5      $ SU  S3$ s  snf )Nz or [``])
isinstancerM   ro   join)r   cs     r'   _get_class_namer      sP    +te|,,{{M1Jb2JMNN}B Ns
   A
Ac                 L   Uc  U(       d  [        S5      eU(       a  Uc/  [        R                  " 5        VVs0 s H  u  p4USU S3_M     nnnO:UR                  5        VVs0 s H  u  p6U[        ;   d  M  U[        U5      _M     nnn[	        UR                  5       5       Vs/ s H  nU  SU SXS    S[        U    S3PM     nnOUR                  5        VVs0 s H$  u  pHU[        ;   d  M  [        U   [        U5      _M&     n	nn[        R                  " 5        VVs0 s H  u  p4U[        U   _M     n
nn[	        U	R                  5       5       Vs/ s H  nU  SU S	X    SX    S3PM     nnS
R                  U5      $ s  snnf s  snnf s  snf s  snnf s  snnf s  snf )NzFUsing `use_model_types=False` requires a `config_to_class` dictionary.r   r   z- **z** -- z (z model)z- [`z`] configuration class: 
)rc   r   r+   r   sortedrN   r   )indentconfig_to_classuse_model_typesr}   r/   model_type_to_namer   linesclasconfig_to_nameconfig_to_model_nameconfig_names               r'   _list_model_optionsr      s   abb"XlXrXrXt!uXtBT**6("o"=Xt!u 0?/D/D/F"/F+J!55 9
OK88/F  " %%7%<%<%>?
?
 hd:,f-?-K,LBOcdnOoNppwx? 	 
 !0 5 5 7
 7-- @ (/$*?? 7 	 
 PdOiOiOk 
Ok9KF(44Ok 	  
  &n&9&9&;<
  = hd;- (+,B/C/P.QQXZ< 	 

 99U3 "v"




 

s/   F"F
6F
$!FF/F!FF!r   c                    ^ ^ U U4S jnU$ )Nc                   > U R                   nUc  U $ UR                  S5      nSnU[        U5      :  aJ  [        R                  " SX#   5      c0  US-  nU[        U5      :  a  [        R                  " SX#   5      c  M0  U[        U5      :  aU  [        R                  " SX#   5      R                  5       S   nT(       a  U S3n[        UTTS9X#'   SR                  U5      nO[        SU  SU 35      eXl         U $ )	Nr   r   z^(\s*)List options\s*$r   z    )r   r   zThe function z\ should have an empty 'List options' in its docstring as placeholder, current docstring is:
)	rl   splitlenresearchgroupsr   r   rc   )fn
docstringsr   ir   r   r   s        r'   docstring_decorator>replace_list_option_in_docstrings.<locals>.docstring_decorator   s    ZZ
I  &#e*n+Deh!O!WFA #e*n+Deh!O!Ws5z>YY8%(CJJLQOF"84*6?dstEH5)Jt $##-,0   
	r)   rs   )r   r   r   s   `` r'   !replace_list_option_in_docstringsr      s    . r)   c                       \ rS rSrSrSS jr\S\S\4S j5       r	\\
" 5       S\\R                  \   -  4S	 j5       5       r\SSS
 jj5       rSrg)
AutoConfigi  a
  
This is a generic configuration class that will be instantiated as one of the configuration classes of the library
when created with the [`~AutoConfig.from_pretrained`] class method.

This class cannot be instantiated directly using `__init__()` (throws an error).
r    Nc                     [        S5      e)NzwAutoConfig is designed to be instantiated using the `AutoConfig.from_pretrained(pretrained_model_name_or_path)` method.)OSErrorrO   s    r'   r<   AutoConfig.__init__  s    \
 	
r)   r}   c           	          U[         ;   a  [         U   nU" U0 UD6$ [        SU SSR                  [         R                  5       5       35      e)NzUnrecognized model identifier: z. Should contain one of z, )r,   rc   r   rN   )r0   r}   argskwargsconfig_classs        r'   	for_modelAutoConfig.for_model  sY    ')*5L000-j\9QRVR[R[\j\o\o\qRrQst
 	
r)   pretrained_model_name_or_pathc                 V   SUS'   XS'   UR                  SS5      nUR                  SS5      n[        R                  " U40 UD6u  pVSU;   =(       a    SUS   ;   nS	U;   =(       a    US	   [        ;   nU=(       a*    [        US	      R                  R                  S
5      (       + n	U(       a2  US   S   n
SU
;   a  U
R                  S5      S   nOSn[        X1XU5      nU(       a@  U(       a9  U	(       d2  [        W
U4SU0UD6nUR                  5         UR                  " U40 UD6$ S	U;   aI  US	   S:X  a   SU;   a  [        R                  S5        SUS	'    [        US	      nUR                  " U40 UD6$ [        SU S[          S35      e! [         a    [        SUS	    S35      ef = f)a%  
Instantiate one of the configuration classes of the library from a pretrained model configuration.

The configuration class to instantiate is selected based on the `model_type` property of the config object that
is loaded, or when it's missing, by falling back to using pattern matching on `pretrained_model_name_or_path`:

List options

Args:
    pretrained_model_name_or_path (`str` or `os.PathLike`):
        Can be either:

            - A string, the *model id* of a pretrained model configuration hosted inside a model repo on
              huggingface.co.
            - A path to a *directory* containing a configuration file saved using the
              [`~PreTrainedConfig.save_pretrained`] method, or the [`~PreTrainedModel.save_pretrained`] method,
              e.g., `./my_model_directory/`.
            - a path to a saved configuration JSON *file*, e.g.,
              `./my_model_directory/configuration.json`.
    cache_dir (`str` or `os.PathLike`, *optional*):
        Path to a directory in which a downloaded pretrained model configuration should be cached if the
        standard cache should not be used.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether or not to force the (re-)download the model weights and configuration files and override the
        cached versions if they exist.
    proxies (`dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
        'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
    revision (`str`, *optional*, defaults to `"main"`):
        The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
        git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
        identifier allowed by git.
    return_unused_kwargs (`bool`, *optional*, defaults to `False`):
        If `False`, then this function returns just the final configuration object.

        If `True`, then this functions returns a `Tuple(config, unused_kwargs)` where *unused_kwargs* is a
        dictionary consisting of the key/value pairs whose keys are not configuration attributes: i.e., the
        part of `kwargs` which has not been used to update `config` and is otherwise ignored.
    trust_remote_code (`bool`, *optional*, defaults to `False`):
        Whether or not to allow for custom models defined on the Hub in their own modeling files. This option
        should only be set to `True` for repositories you trust and in which you have read the code, as it will
        execute code present on the Hub on your local machine.
    kwargs(additional keyword arguments, *optional*):
        The values in kwargs of any keys which are configuration attributes will be used to override the loaded
        values. Behavior concerning key/value pairs whose keys are *not* configuration attributes is controlled
        by the `return_unused_kwargs` keyword parameter.

Examples:

```python
>>> from transformers import AutoConfig

>>> # Download configuration from huggingface.co and cache.
>>> config = AutoConfig.from_pretrained("google-bert/bert-base-uncased")

>>> # Download configuration from huggingface.co (user-uploaded) and cache.
>>> config = AutoConfig.from_pretrained("dbmdz/bert-base-german-cased")

>>> # If configuration file is in a directory (e.g., was saved using *save_pretrained('./test/saved_model/')*).
>>> config = AutoConfig.from_pretrained("./test/bert_saved_model/")

>>> # Load a specific configuration file.
>>> config = AutoConfig.from_pretrained("./test/bert_saved_model/my_configuration.json")

>>> # Change some config attributes when loading a pretrained config.
>>> config = AutoConfig.from_pretrained("google-bert/bert-base-uncased", output_attentions=True, foo=False)
>>> config.output_attentions
True

>>> config, unused_kwargs = AutoConfig.from_pretrained(
...     "google-bert/bert-base-uncased", output_attentions=True, foo=False, return_unused_kwargs=True
... )
>>> config.output_attentions
True

>>> unused_kwargs
{'foo': False}
```
T
_from_autoname_or_pathtrust_remote_codeNcode_revisionauto_mapr   r}   ztransformers.z--r   mistrallayer_typeszhDetected mistral model with layer_types, treating as ministral for alternating attention compatibility. 	ministralz6The checkpoint you are trying to load has model type `a%  ` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`zUnrecognized model in z(. Should have a `model_type` key in its r?   )popr   get_config_dictr,   ri   
startswithr   r   r   register_for_auto_classfrom_pretrainedloggerinforB   rc   	from_dictr   )r0   r   r   r   r   config_dictunused_kwargshas_remote_codehas_local_codeexplicit_local_code	class_refupstream_repor   s                r'   r   AutoConfig.from_pretrained  s   d  $|!>~"JJ':DA

?D9%5%E%EFc%ngm%n"$3_T^H_8_%4d\9RVd9d, 
^KP\D]5^5i5i5t5t6
 2
 #J/=Iy  ) 5a 8 $ 9!.cp! 09L88HUY_L 002//0MXQWXX[(<(I5-;:V~ -8L)-k,.GH  ))+GGG$%B$C D55@MD
 	
  
 L[YeMfLg hX X	 	
s   F F(c                     [        U[        5      (       a,  UR                  U :w  a  [        SUR                   SU  S35      e[        R                  XUS9  g)z
Register a new configuration for this class.

Args:
    model_type (`str`): The model type like "bert" or "gpt".
    config ([`PreTrainedConfig`]): The config to register.
zzThe config you are passing has a `model_type` attribute that is not consistent with the model type you passed (config has z and you passed z!. Fix one of those so they match!)rd   N)
issubclassr   r}   rc   r,   re   )r}   r/   rd   s      r'   re   AutoConfig.register  sd     f.//F4E4E4S**0*;*;)<<LZL Y 
 	
XFr)   rs   rg   rh   )r.   ri   rj   rk   rl   r<   classmethodrm   r   r   r   osPathLiker   staticmethodre   rr   rs   r)   r'   r   r     s}    
 
3 
<L 
 
 &(E
C"++cBR<R E
 ) E
N G Gr)   r   r,   rs   )NT)-rl   rC   r   r   collectionsr   collections.abcr   r   r   r   typingr   r	   configuration_utilsr   dynamic_module_utilsr   r   utilsr   r   auto_mappingsr   r   
get_loggerr.   r   r   r|   r$   rm   r(   r1   rn   r3   r,   ru   rM   r   r   rq   r   r   __all__rs   r)   r'   <module>r      si     	 	 # D D  3 \ ) R 
		H	%\#s();<

   %"0Y0Y	 #Wi%>WBVW  ! ( (0N0N  c "	#* 	0)S$/?*@%@A 0)f $$890";sCx0 0"f tCy  D 37+/zlJ&':oG oGd \
*r)   