+
    œ°³jª   ã                   ó„   € ^ RI HtHt ^ RIHt ^RIHt ^RIHt ^RI	H
t
 ]
! RR7      ] ! R R	]4      4       4       tR	.tR
# )é    )ÚAnyÚLiteral)Ústrict)ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstringzpoolside/laguna-XS.2)Ú
checkpointc                   ó~  a a€ ] tR t^t oRtRtR.t/ RRbRRbRRbRRbR	R
bRRbRRbRRbRRbRR
bRRbRR
bRRbRRbRRbRR
btRR.R.3RRR.R.3RR.R.3/tR R!RR"RR"RR/t	R#t
R$tR%t^(t^0t^tR&tR'tR(tR)tR*tR+tR,tR-tR.tR-tR-t^tR/tR+tR0tR,tR,t R,t!R,t"^€t#R+t$R*t%R,t&R,t'R1t(R+t)R.t*V 3R2 lt+R3 t,R4 t-V3R5 lt.R6t/Vt0V ;t1# )7ÚLagunaConfiguD  
gating (`bool` or `str`, *optional*, defaults to `True`):
    Softplus output-gate granularity. ``True`` or ``"per-head"`` applies one gate per head,
    broadcast across ``head_dim``; ``"per-element"`` applies one gate per ``(head, head_dim)``
    channel.
num_attention_heads_per_layer (`list[int]`, *optional*):
    Per-layer override for ``num_attention_heads``. Length must equal ``num_hidden_layers``.
mlp_layer_types (`list[str]`, *optional*):
    Per-layer MLP type â€” ``"dense"`` or ``"sparse"``. Length must equal
    ``num_hidden_layers``. Defaults to first layer dense, rest sparse.
moe_routed_scaling_factor (`float`, *optional*, defaults to 1.0):
    Scalar applied to routed-expert output before combining with the shared-expert output.
moe_apply_router_weight_on_input (`bool`, *optional*, defaults to `False`):
    Whether to apply router weights to the MoE input rather than the output. Not supported
    in transformers yet; ``True`` will raise a ``NotImplementedError`` for now.
moe_router_logit_softcapping (`float`, *optional*, defaults to 0.0):
    Scaling factor when applying tanh softcapping on the logits of the MoE router logits.

Example:

```python
>>> from transformers import LagunaModel, LagunaConfig

>>> configuration = LagunaConfig()
>>> model = LagunaModel(configuration)
>>> configuration = model.config
```
ÚlagunaÚpast_key_valueszlayers.*.self_attn.q_projÚcolwisezlayers.*.self_attn.k_projzlayers.*.self_attn.v_projzlayers.*.self_attn.g_projzlayers.*.self_attn.o_projÚrowwisezlayers.*.self_attn.q_normÚreplicated_with_grad_allreducezlayers.*.self_attn.k_normzlayers.*.mlp.gate_projzlayers.*.mlp.up_projzlayers.*.mlp.down_projz!layers.*.mlp.experts.gate_up_projÚpacked_colwisezlayers.*.mlp.experts.down_projzlayers.*.mlp.expertsÚmoe_tp_expertsz%layers.*.mlp.shared_experts.gate_projz#layers.*.mlp.shared_experts.up_projz%layers.*.mlp.shared_experts.down_projÚembed_tokensÚ	input_idsÚinputs_embedsÚlayersÚhidden_statesÚattention_maskÚnormzlayers.*.mlp.gateÚ	ep_routerÚgrouped_gemmi ˆ i   i    Úsilui   g{®Gáz”?g�íµ ÷Æ°>TFNi   g        é   gü©ñÒMbP?ç      ð?c           	     óœ  <€ V P                   f   R.V P                  ,          V n         V P                  f)   R.R.V P                  ^,
          ,          ,           V n        V P                  f$   V P                  .V P                  ,          V n        RRRRRRR	/R
RRRRRR//pV P
                  f   W n        \        SV `  ! R/ VBRR
R0/B  R # )NÚfull_attentionÚdenseÚsparseÚ	rope_typeÚdefaultÚ
rope_thetag    €„AÚpartial_rotary_factorg      à?Úsliding_attentiong     ˆÃ@r   Úignore_keys_at_rope_validation© )Úlayer_typesÚnum_hidden_layersÚmlp_layer_typesÚnum_attention_heads_per_layerÚnum_attention_headsÚrope_parametersÚsuperÚ__post_init__)ÚselfÚkwargsÚdefault_rope_paramsÚ	__class__s   &, €Úp/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/laguna/configuration_laguna.pyr1   ÚLagunaConfig.__post_init__‚   sà   ø€ Ø×ÑÒ#Ø 0Ð1°D×4JÑ4JÕJˆDÔØ×ÑÒ'Ø$+ 9°¨z¸T×=SÑ=SÐVWÕ=WÕ/XÕ#XˆDÔ Ø×-Ñ-Ò5Ø26×2JÑ2JÐ1KÈd×NdÑNdÕ1dˆDÔ.ð ˜{¨I°|ÀXÐOfÐhkÐlØ +¨y¸,ÈÐQhÐjmÐ!nðe
Ðð ×ÑÒ'Ø#6Ô ô 	‰ÒÑo ÑoÐH[Ð]mÐGnÕoó    c                ó   € V# )Nr)   )r2   r3   s   &,r6   Úconvert_rope_params_to_dictÚ(LagunaConfig.convert_rope_params_to_dict”   s   € Øˆr8   c                óN  € V P                   '       d   \        R4      hV P                  eT   \        V P                  4      V P                  8w  d0   \        R\        V P                  4       RV P                   R24      h\        V P                  4      V P                  8w  d0   \        R\        V P                  4       RV P                   R24      h\        V P                  4      V P                  8w  d0   \        R\        V P                  4       RV P                   R24      hR# )z'Part of ``@strict``-powered validation.zhmoe_apply_router_weight_on_input=True is not yet supported in the transformers implementation of Laguna.Nz&num_attention_heads_per_layer length (z ) must equal num_hidden_layers (z).zlayer_types length (zmlp_layer_types length ()Ú moe_apply_router_weight_on_inputÚNotImplementedErrorr-   Úlenr+   Ú
ValueErrorr*   r,   )r2   s   &r6   Úvalidate_architectureÚ"LagunaConfig.validate_architecture—   s/  € à×0×0Ð0Ü%ð9óð ð
 ×.Ñ.Ò:Ü�D×6Ñ6Ó7¸4×;QÑ;QÔQäØ8¼¸T×=_Ñ=_Ó9`Ð8að b1Ø15×1GÑ1GÐ0HÈðLóð ô ˆt×ÑÓ  D×$:Ñ$:Ô:ÜØ&¤s¨4×+;Ñ+;Ó'<Ð&=ð >1Ø15×1GÑ1GÐ0HÈðLóð ô ˆt×#Ñ#Ó$¨×(>Ñ(>Ô>ÜØ*¬3¨t×/CÑ/CÓ+DÐ*Eð F1Ø15×1GÑ1GÐ0HÈðLóð ñ ?r8   c                óˆ  <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[ ;R&   S[;R	&   S[;R
&   S[;R&   S[;R&   S[S[,          R,          ;R&   S[ ;R&   S[S[ ,          ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[S[,          R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ S[S[ ,          ,          R,          ;R&   S[ ;R&   S[;R&   S[S[,          ;R&   S[S[ ,          R,          ;R&   S[S[,          R,          ;R&   S[;R &   S[;R!&   S[;R"&   # )#é   Ú
vocab_sizeÚhidden_sizeÚintermediate_sizer+   r.   Únum_key_value_headsÚ
hidden_actÚmax_position_embeddingsÚinitializer_rangeÚrms_norm_epsÚ	use_cacheÚtie_word_embeddingsNr/   Úsliding_windowÚattention_dropoutÚmoe_intermediate_sizeÚshared_expert_intermediate_sizeÚnum_experts_per_tokÚnum_expertsÚoutput_router_logitsÚrouter_aux_loss_coefr*   Úpad_token_idÚbos_token_idÚeos_token_idÚhead_dimÚattention_biasÚgatingr-   r,   Úmoe_routed_scaling_factorr=   Úmoe_router_logit_softcapping)ÚintÚstrÚfloatÚboolr   ÚdictÚlist)ÚformatÚ__classdict__s   "€r6   Ú__annotate__ÚLagunaConfig.__annotate__   s6  ø‡ ‚ ñ@ ÑñA ñB ÑñC ñD Ñ!ñE ñF ÑñG ñH Ñ!ñI ñJ Ñ ñK ñL ÑñM ñN !Ñ)ñO ñP Ñ#ñQ ñR ÑñS ñT ÑñU ñV Ñ%ñW ñX $¡dÕ*¨TÕ1Ñ8ñY ñZ Ññ[ ñ\ ™s•{Ñ(ñ] ñ^ Ñ$ñ_ ñ` &)Ñ.ña ñb Ñ ñc ñd Ññe ñf Ñ&ñg ñh  Ñ'ñi ñj ‘c•˜TÕ!Ñ(ñk ñl ˜•*Ñ#ñm ñn ˜•*Ñ#ño ñp ™™S�	•/ DÕ(Ñ/ñq ñv Ññw ñx Ñ ñy ñz ‘3�JÑñ{ ñ| $(©¥9¨tÕ#3Ñ:ñ} ñ@ ™#•Y Õ%Ñ,ñA ñB  %Ñ*ñC ñD '+Ñ2ñE ñF #(Ñ-òG r8   )r*   r,   r-   r/   )2Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚbase_model_tp_planÚbase_model_pp_planÚbase_model_ep_planrE   rF   rG   r+   r.   rH   rI   rJ   rK   rL   rM   rN   r/   rO   rP   rQ   rR   rS   rT   rU   rV   r*   rW   rX   rY   rZ   r[   r\   r-   r,   r]   r=   r^   r1   r:   rA   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r5   rf   s   @@r6   r   r      s  ù‡ € ñð: €JØ#4Ð"5ÐðØ# Yðà# Yðð 	$ Yðð 	$ Yð	ð
 	$ Yðð 	$Ð%Eðð 	$Ð%Eðð 	! )ðð 	 	ðð 	! )ðð 	,Ð-=ðð 	)¨)ðð 	Ð 0ðð 	0°ðð 	.¨yðð  	0°ð!Ðð& 	˜+˜¨Ð(9Ð:Ø�OÐ%5Ð6¸Ð8IÐJØ�/Ð" _Ð$5Ð6ðÐð 	˜[Ø+¨^Ø(¨.ØÐ 0ð	Ðð €JØ€KØ!ÐØÐØ!ÐØ ÐØ€JØ#)ÐØ#ÐØ€LØ€IØ %ÐØ48€OØ€NØ%(ÐØ!$ÐØ+.Ð#Ø ÐØ€KØ!&ÐØ"'ÐØ$(€KØ#€LØ#€LØ+/€Lð €HØ €NØ€FØ6:Ð!à(,€OØ'*ÐØ-2Ð$Ø*-Ð õpò$ò÷u … r8   r   N)Útypingr   r   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   r   Ú__all__r)   r8   r6   Ú<module>r}      sN   ð÷(  å .å 3Ý 1Ý #ñ Ð1Ô2ØôPÐ#ó Pó ó 3ðPðf Ð
‚r8   