
    Z j                     l    S SK J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
)    )strict   )PreTrainedConfig)RopeParameters)auto_docstringzHuggingFaceTB/SmolLM3-3B)
checkpointc                     ^  \ rS rSr% SrSrS/rSrSSSSSSSS.rS	/S
/4SS/S/4S/S/4S.r	Sr
\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\S-  \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+'   S,r!\\S-'   Sr"\S-  \S.'   Sr#\\   S-  \S/'   Sr$\\S0'   Sr%\\   S-  \S1'   S,r&\\S2'   S3r'\\-  \S4'   S,r(\\S5'   S#r)\\S6'   U 4S7 jr*S8r+U =r,$ )9SmolLM3Config   a  
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{Gz?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                 L  > U R                   c  U R                  U l         U R                  cG  [        U R                  5       Vs/ s H!  n[        US-   U R                  -  S:g  5      PM#     snU l        U R                  c  / U l        [        U R                  5       Ho  nU R                  U   nU R                  (       a1  U R                  b$  U(       d  U R                  R                  S5        MT  U R                  R                  S5        Mq     [        TU ]0  " S0 UD6  g s  snf )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       ڂ/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/smollm3/configuration_smollm3.pyr<   SmolLM3Config.__post_init__a   s    ##+'+'?'?D$&Y^_c_u_uYv#YvIY]d&A&AAQFGYv#D #!D"4#9#9:	..y9**t/B/B/NW_$$++,?@$$++,<= ; 	''#s   (D!)r.   r,   r   )-__name__
__module____qualname____firstlineno____doc__
model_typekeys_to_ignore_at_inferencedefault_thetabase_model_tp_planbase_model_pp_planr   r9   __annotations__r   r   r   r   r   r!   strr"   r#   floatr$   r%   boolr&   r'   r(   listr)   r   dictr*   r+   r,   r-   r.   r/   r0   r1   r2   r<   __static_attributes____classcell__)rA   s   @rB   r
   r
      s   , J#4"5M &/%.%.%."+ )"+ &(9:#%568IJ!"_$56 JK"s"s!!&'t'J#(S(#u#L%It%L#*%%L#*%+1L#S	/D(148O^d*T18$$!%NC$J%'+NDI$+"#C#$(KcT!( ND %(us{(Hd $$( (    r
   N)
huggingface_hub.dataclassesr   configuration_utilsr   modeling_rope_utilsr   utilsr   r
   __all__r7   rV   rB   <module>r\      sK   * / 3 1 # 56U($ U(  7U(p 
rV   