+
    œ°³j—  ã                   óx   € R 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	# )
zPyTorch Phi-MoE model.)Ústrict)ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstringzmicrosoft/Phi-3.5-MoE-instruct)Ú
checkpointc                   óØ   a a€ ] tR t^t oRtRtR.tRRRRRRR	R
/tRtRt	Rt
Rt^ t^ t^tRtRtRtRtRtRt^t^tRtRtRtRt^t^tRtRtRtRt Rt!Rt"V 3R lt#V 3R lt$V3R lt%Rt&Vt'V ;t(# )ÚPhimoeConfigar  
num_local_experts (`int`, *optional*, defaults to 16):
    Number of experts per Sparse MLP layer.
input_jitter_noise (`float`, *optional*, defaults to 0.0):
    Input jitter noise
lm_head_bias (`bool`, *optional*, defaults to `False`):
    LM head bias

Example:

```python
>>> from transformers import PhimoeModel, PhimoeConfig
>>> # Initializing a Phi-3 style configuration
>>> configuration = PhimoeConfig.from_pretrained("microsoft/Phi-3.5-MoE-instruct")
>>> # Initializing a model from the configuration
>>> model = PhimoeModel(configuration)
>>> # Accessing the model configuration
>>> configuration = model.config
```ÚphimoeÚpast_key_valueszlayers.*.mlp.routerÚ	ep_routerz!layers.*.mlp.experts.gate_up_projÚgrouped_gemmzlayers.*.mlp.experts.down_projzlayers.*.mlp.expertsÚmoe_tp_expertsg    €„.Ai@}  i   i   Úsilug{®Gáz”?gñhãˆµøä>TNFg        gü©ñÒMbP?g{®Gáz„?c                óf   <€ V P                   f   V P                  V n         \        SV `  ! R/ VB  R # )N© )Únum_key_value_headsÚnum_attention_headsÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s   &,€Úp/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/phimoe/configuration_phimoe.pyr   ÚPhimoeConfig.__post_init__U   s-   ø€ Ø×#Ñ#Ò+Ø'+×'?Ñ'?ˆDÔ$Ü‰ÒÑ' Ô'ó    c                óÂ  <€ \         SV `  4        V P                  R,          R8w  d¸   RV P                  9   d   V P                  R,          V n        V P                  P	                  RR4      pV P                  P	                  RR4      p\        V\        \        34      '       g   \        RV 24      h\        V\        \        34      '       g   \        RV 24      hR# R# )	z/
Validate the `rope_parameters` configuration.
Ú	rope_typeÚdefaultÚ original_max_position_embeddingsÚshort_mscaleNÚlong_mscalez=`rope_parameters`'s short_mscale field must be a number, got z<`rope_parameters`'s long_mscale field must be a number, got )	r   Úvalidate_ropeÚrope_parametersr   ÚgetÚ
isinstanceÚintÚfloatÚ	TypeError)r   Úrope_parameters_short_mscaleÚrope_parameters_long_mscaler   s   &  €r   r!   ÚPhimoeConfig.validate_ropeZ   sÞ   ø€ ô 	‰ÑÔð ×Ñ Õ,°	Ô9Ø1°T×5IÑ5IÔIØ8<×8LÑ8LÐMoÕ8p�Ô5Ø+/×+?Ñ+?×+CÑ+CÀNÐTXÓ+YÐ(Ø*.×*>Ñ*>×*BÑ*BÀ=ÐRVÓ*WÐ'ÜÐ:¼SÄ%¸L×IÒIÜØSÐTpÐSqÐróð ô Ð9¼CÄ¸<×HÒHÜØRÐSnÐRoÐpóð ñ Iñ :r   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,          ;R&   S[ R,          ;R&   S[ S[S[ ,          ,          R,          ;R&   S[;R&   S[S[,          R,          ;R&   S[ R,          ;R&   S[S[ ,          ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   # )é   Ú
vocab_sizeÚhidden_sizeÚintermediate_sizeÚnum_hidden_layersr   r   Ú
hidden_actÚmax_position_embeddingsÚinitializer_rangeÚrms_norm_epsÚ	use_cacheNÚpad_token_idÚbos_token_idÚeos_token_idÚtie_word_embeddingsr"   Úsliding_windowÚattention_dropoutÚnum_experts_per_tokÚnum_local_expertsÚoutput_router_logitsÚrouter_aux_loss_coefÚrouter_jitter_noiseÚinput_jitter_noiseÚattention_biasÚlm_head_bias)r%   Ústrr&   ÚboolÚlistr   Údict)ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚPhimoeConfig.__annotate__   s²  ø‡ ‚ ñD ÑñE ñF ÑñG ñH Ñ!ñI ñJ ÑñK ñL Ñ!ñM ñN Ñ ñO ñP ÑñQ ñR !Ñ,ñS ñT Ñ#ñU ñV ÑñW ñX ÑñY ñZ ˜•*Ñ#ñ[ ñ\ ˜•*Ñ ñ] ñ^ ™™S�	•/ DÕ(Ñ,ñ_ ñ` Ñ%ña ñb $¡dÕ*¨TÕ1Ñ8ñc ñd ˜$•JÑ%ñe ñf ™s•{Ñ(ñg ñh Ñ ñi ñj Ññk ñl Ñ&ñm ñn  Ñ'ño ñp Ñ%ñq ñr Ñ#ñs ñt Ñ ñu ñv Ñòw r   )r   r   i   ))Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚbase_model_ep_planÚdefault_thetar-   r.   r/   r0   r   r   r1   r2   r3   r4   r5   r6   r7   r8   r9   r"   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   r   r!   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r   rI   s   @@r   r   r      sà   ù‡ € ñð( €JØ#4Ð"5Ðà˜{Ø+¨^Ø(¨.ØÐ 0ð	Ðð €Mà€JØ€KØ!ÐØÐØ!ÐØ ÐØ€JØ#,ÐØ#ÐØ€LØ€IØ#€LØ €LØ+,€LØ %ÐØ48€OØ!%€NØ%(ÐØ ÐØÐØ!&ÐØ"'ÐØ!%ÐØ #ÐØ €NØ€Lõ(õ
÷E … r   r   N)rP   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   r   Ú__all__r   r   r   Ú<module>r^      sN   ðñ å .å 3Ý 1Ý #ñ Ð;Ô<ØôSÐ#ó Só ó =ðSðl Ð
‚r   