ó
    ˆŽ¡jõ  ã                   ól   • S r SSKrSSKJr  SSKJr  SSKJr  \" SS9\ " S	 S
\5      5       5       rS
/r	g)zMAMBA2 configurationé    N)Ústricté   )ÚPreTrainedConfig)Úauto_docstringzstate-spaces/mamba2-2.8b)Ú
checkpointc                   ó  ^ • \ rS rSr% SrSrSr\\S'   Sr	\\S'   Sr
\\S	'   S
r\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\S-  \S'   Sr\S-  \S'   Sr\\\   -  S-  \S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   S r\\S!'   S"r\\S#'   Sr\\S$'   S%r\\-  \S&'   S'r\\S('   S"r \\S)'   S*r!\\S+'   S,\" S-5      4r"\\   \#\S.4   -  \S/'   Sr$\\S0'   Sr%\\S1'   S2r&\\S3'   Sr'\\S4'   U 4S5 jr(S6 r)\*S7 5       r+S8r,U =r-$ )9ÚMamba2Configé   aX  
layer_norm_epsilon (`float`, *optional*, defaults to 1e-05):
    The epsilon to use in the layer normalization layers..
expand (`int`, *optional*, defaults to 2):
    Expanding factor used to determine the intermediate size.
n_groups (`int`, *optional*, defaults to 8):
    Number of groups for the evolution matrices of mamba 2.
use_bias (`bool`, *optional*, defaults to `False`):
    Whether or not to use bias in ["in_proj", "out_proj"] of the mixer block
use_conv_bias (`bool`, *optional*, defaults to `True`):
    Whether or not to use bias in the convolution layer of the mixer block.
residual_in_fp32 (`bool`, *optional*, defaults to `True`):
    Whether or not residuals should be in `float32`. If set to `False` residuals will keep the same `dtype` as the rest of the model
rescale_prenorm_residual (`bool`, *optional*, defaults to `False`):
    Whether or not to rescale `out_proj` weights when initializing.
chunk_size (`int`, *optional*, defaults to 256):
    Size of the chunks that will comprise the sequence.

Example:

```python
>>> from transformers import Mamba2Config, Mamba2Model

>>> # Initializing a Mamba2 configuration
>>> configuration = Mamba2Config()

>>> # Initializing a model (with random weights) from the configuration
>>> model = Mamba2Model(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```Úmamba2é€   Ú	num_headsé@   Úhead_dimi €  Ú
vocab_sizei   Úhidden_sizeÚ
state_sizeÚnum_hidden_layersgñhãˆµøä>Úlayer_norm_epsiloné   NÚpad_token_idr   Úbos_token_idé   Úeos_token_idÚexpandé   Úconv_kernelé   Ún_groupsFÚuse_biasTÚuse_conv_biasÚsiluÚ
hidden_actgš™™™™™¹?Úinitializer_rangeÚresidual_in_fp32ÚautoÚtime_step_rankgü©ñÒMbP?Útime_step_minÚtime_step_maxg-Cëâ6?Útime_step_floorg        Úinf.Útime_step_limitÚrescale_prenorm_residualÚ	use_cacheé   Ú
chunk_sizeÚtie_word_embeddingsc                 ó®   >• U R                   S:X  a#  [        R                  " U R                  S-  5      OU R                   U l         [        TU ]  " S0 UD6  g )Nr%   é   © )r&   ÚmathÚceilr   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €Ú½C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\transformers/models/mamba2/configuration_mamba2.pyr7   ÚMamba2Config.__post_init__Z   sJ   ø€ à04×0CÑ0CÀvÓ0MŒD�IŠI�d×&Ñ&¨Ñ+Ô,ÐSW×SfÑSfð 	Ôô 	‰ÒÑ' Ó'ó    c                 óì   • U R                   U R                  -  U R                  U R                  -  :w  a@  [	        SU R                   U R                  -   SU R                  U R                  -   S35      eg)zOPart of `@strict`-powered validation. Validates the architecture of the config.z2Inconsistent configuration: hidden_size * expand (z#) must equal num_heads * head_dim (z).N)r   r   r   r   Ú
ValueError©r8   s    r;   Úvalidate_architectureÚ"Mamba2Config.validate_architecture`   sr   € à×Ñ˜tŸ{™{Ñ*°·±ÀÇÁÑ0NÓOÜðØ×$Ñ$ t§{¡{Ñ2Ð3ð 4Ø—N‘N T§]¡]Ñ2Ð3°2ð7óð ð Pr=   c                 ó"   • S/U R                   -  $ )NÚlinear_attention)r   r@   s    r;   Úlayer_typesÚMamba2Config.layer_typesi   s   € à"Ð# d×&<Ñ&<Ñ<Ð<r=   )r&   ).Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typer   ÚintÚ__annotations__r   r   r   r   r   r   Úfloatr   r   r   Úlistr   r   r   r   Úboolr    r"   Ústrr#   r$   r&   r'   r(   r)   r+   Útupler,   r-   r/   r0   r7   rA   ÚpropertyrE   Ú__static_attributes__Ú__classcell__)r:   s   @r;   r	   r	      su  ø‡ ñðB €Jà€IˆsÓØ€HˆcÓØ€J�ÓØ€K�ÓØ€J�ÓØÐ�sÓØ $Ð˜Ó$Ø €L�#˜‘*Ó Ø €L�#˜‘*Ó Ø+,€L�#˜˜S™	‘/ DÑ(Ó,Ø€FˆCƒOØ€K�ÓØ€HˆcÓØ€HˆdÓØ€M�4ÓØ€J�ÓØ"Ð�uÓ"Ø!Ð�dÓ!Ø &€N�C˜#‘IÓ&Ø €M�5Ó Ø€M�5ÓØ!€O�UÓ!Ø8;¹UÀ5»\Ð7J€O�T˜%‘[ 5¨°¨Ñ#4Ñ4ÓJØ%*Ð˜dÓ*Ø€IˆtÓØ€J�ÓØ %Ð˜Ó%õ(òð ñ=ó ö=r=   r	   )
rK   r4   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r3   r=   r;   Ú<module>r[      sN   ðñ ã å .å 3Ý #ñ Ð5Ñ6ØôQ=Ð#ó Q=ó ó 7ðQ=ðh Ð
�r=   