Ë
    ÜÓ^jŽ  ã                   ór   — d dl mZ ddlmZ ddlmZ ddlmZ  ed¬«      e G d„ d	e«      «       «       Zd	gZ	y
)é    )Ústricté   )ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstringzHuggingFaceTB/SmolLM3-3B)Ú
checkpointc                   ó  ‡ — e Zd ZU dZdZdgZdZddddddddœZdgd	gfd
dgd
gfd
gd
gfdœZdZ	e
ed<   dZe
ed<   dZe
ed<   dZe
ed<   dZe
ed<   dZe
dz  ed<   dZeed<   dZe
ed<   dZeed<   d Zeed!<   d"Zeed#<   d$Ze
dz  ed%<   d&Ze
dz  ed'<   d(Ze
ee
   z  dz  ed)<   dZeez  dz  ed*<   d+Z eed,<   dZ!e
dz  ed-<   dZ"ee
   dz  ed.<   dZ#e
ed/<   dZ$ee   dz  ed0<   d+Z%eed1<   d2Z&ee
z  ed3<   d+Z'eed4<   d"Z(eed5<   ˆ fd6„Z)ˆ xZ*S )7ÚSmolLM3Configa>  
    no_rope_layers (`List[int]`, *optional*):
        List with at least the same length as the number of layers in the model.
        A `1` at an index position indicates that the corresponding layer will use RoPE,
        while a `0` indicates that it's a NoPE layer.
    no_rope_layer_interval (`int`, *optional*, defaults to 4):
        If `no_rope_layers` is `None`, it will be created using a NoPE layer every
        `no_rope_layer_interval` layers.

    ```python
    >>> from transformers import SmolLM3Model, SmolLM3Config

    >>> # Initializing a SmolLM3 style configuration
    >>> configuration = SmolLM3Config()

    >>> # Initializing a model from the SmolLM3 style configuration
    >>> model = SmolLM3Model(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úsmollm3Úpast_key_valuesg    €„>AÚcolwiseÚrowwise)zlayers.*.self_attn.q_projzlayers.*.self_attn.k_projzlayers.*.self_attn.v_projzlayers.*.self_attn.o_projzlayers.*.mlp.gate_projzlayers.*.mlp.up_projzlayers.*.mlp.down_projÚ	input_idsÚinputs_embedsÚhidden_statesÚattention_mask)Úembed_tokensÚlayersÚnormi õ Ú
vocab_sizei   Úhidden_sizei +  Úintermediate_sizeé$   Únum_hidden_layersé   Únum_attention_headsé   NÚnum_key_value_headsÚsiluÚ
hidden_acti €  Úmax_position_embeddingsg{®Gáz”?Úinitializer_rangeg�íµ ÷Æ°>Úrms_norm_epsTÚ	use_cacheiô Úpad_token_idi ô Úbos_token_idiô Úeos_token_idÚrope_parametersFÚuse_sliding_windowÚsliding_windowÚno_rope_layersÚno_rope_layer_intervalÚlayer_typesÚattention_biasg        Úattention_dropoutÚmlp_biasÚtie_word_embeddingsc                 ó"  •— | j                   €| j                  | _         | j                  €Dt        | j                  «      D �cg c]   }t        |dz   | j                  z  dk7  «      ‘Œ" c}| _        | j                  €�g | _        t        | j                  «      D ]b  }| j                  |   }| j                  r*| j                  �|s| j                  j                  d«       ŒH| j                  j                  d«       Œd t        ‰| �0  di |¤Ž y c c}w )Né   r   Úsliding_attentionÚfull_attention© )r   r   r+   Úranger   Úintr,   r-   r)   r*   ÚappendÚsuperÚ__post_init__)ÚselfÚkwargsÚ	layer_idxÚhas_ropeÚ	__class__s       €ú|/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/smollm3/configuration_smollm3.pyr;   zSmolLM3Config.__post_init__a   sþ   ø€ Ø×#Ñ#Ð+Ø'+×'?Ñ'?ˆDÔ$à×ÑÐ&äY^Ð_c×_uÑ_uÓYvö#ØLU”�Y ‘] d×&AÑ&AÑAÀQÑFÕGò#ˆDÔð ×ÑÐ#Ø!ˆDÔÜ" 4×#9Ñ#9Ó:ò >�	Ø×.Ñ.¨yÑ9�Ø×*Ò*¨t×/BÑ/BÐ/NÑW_Ø×$Ñ$×+Ñ+Ð,?Õ@à×$Ñ$×+Ñ+Ð,<Õ=ð>ô 	‰ÑÑ' Ó'ùò#s   Á%D)+Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚdefault_thetaÚbase_model_tp_planÚbase_model_pp_planr   r8   Ú__annotations__r   r   r   r   r   r    Ústrr!   r"   Úfloatr#   r$   Úboolr%   r&   r'   Úlistr(   r   Údictr)   r*   r+   r,   r-   r.   r/   r0   r1   r;   Ú__classcell__)r@   s   @rA   r
   r
      sµ  ø… ñð, €JØ#4Ð"5ÐØ€Mð &/Ø%.Ø%.Ø%.Ø"+Ø )Ø"+ñÐð &˜¨Ð(9Ð:Ø#Ð%5Ð6¸Ð8IÐJØ!Ð" _Ð$5Ð6ñÐð €J�ÓØ€K�ÓØ"Ð�sÓ"ØÐ�sÓØ!Ð˜Ó!Ø&'Ð˜˜t™Ó'Ø€J�ÓØ#(Ð˜SÓ(Ø#Ð�uÓ#Ø€L�%ÓØ€IˆtÓØ%€L�#˜‘*Ó%Ø%€L�#˜‘*Ó%Ø+1€L�#˜˜S™	‘/ DÑ(Ó1Ø48€O�^ dÑ*¨TÑ1Ó8Ø$Ð˜Ó$Ø!%€N�C˜$‘JÓ%Ø'+€N�D˜‘I Ñ$Ó+Ø"#Ð˜CÓ#Ø$(€K��c‘˜TÑ!Ó(Ø €N�DÓ Ø%(Ð�u˜s‘{Ó(Ø€HˆdÓØ $Ð˜Ó$÷(ð (ó    r
   N)
Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   r
   Ú__all__r6   rR   rA   ú<module>rX      sK   ðõ* /å 3Ý 1Ý #ñ Ð5Ô6ØôU(Ð$ó U(ó ó 7ðU(ðp Ð
�rR   