+
    œ°³j�  ã                   óì   € R t ^ RIHt ^RIHt ^RIHt ^RIHt ]]! RRR7       ! R R	]4      4       4       t	]]! R
RR7       ! R R]4      4       4       t
]! RR7      ] ! R R]4      4       4       tR.tR# )zDBRX model configuration)Ústrict)ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstringz4This config is used to instantiate attention layers.z$transformers-community/dbrx-instruct)Úcustom_introÚ
checkpointc                   ó@   a € ] tR t^t o RtRtRtRt^tV 3R lt	Rt
V tR# )ÚDbrxAttentionConfiga^  
attn_pdrop (`float`, *optional*, defaults to 0.0):
    The dropout probability for the attention layers.
clip_qkv (`float`, *optional*):
    If set, clip the queries, keys, and values in the attention layer to this value.
kv_n_heads (`int`, *optional*, defaults to 1):
    For grouped_query_attention only, allow user to specify number of kv heads.
Úattn_configç        Nc                ól   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[S[ ,          R,          ;R&   S[;R&   # )é   Ú
attn_pdropNÚclip_qkvÚ
kv_n_heads)ÚfloatÚint)ÚformatÚ__classdict__s   "€Úl/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/dbrx/configuration_dbrx.pyÚ__annotate__Ú DbrxAttentionConfig.__annotate__   s9   ø‡ ‚ ñ" ™•Ñ!ñ# ñ$ ‘E�k˜DÕ Ñ'ñ% ñ& Ñò' ó    © )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úbase_config_keyr   r   r   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r	   r	      s'   ø‡ € ñð $€Oà!€JØ#'€HØ€J÷' ƒ r   r	   z6This config is used to instantiate feedforward layers.c                   óf   a a€ ] tR t^-t oRtRtRtRtRt^t	^t
RtRtRtV 3R ltV3R	 ltR
tVtV ;t# )ÚDbrxFFNConfigaÙ  
ffn_act_fn (`dict`, *optional*, defaults to `None`):
    A dict specifying activation function for the FFN.
    The dict should have a key 'name' with the value being the name of the activation function along with
    any additional keyword arguments. If `None`, then set to `{"name": "silu"}`.
ffn_hidden_size (`int`, *optional*, defaults to 3584):
    The hidden size of the feedforward network.
moe_num_experts (`int`, *optional*, defaults to 4):
    The number of experts in the mixture of experts layer.
moe_top_k (`int`, *optional*, defaults to 1):
    The number of experts to use in the mixture of experts layer.
moe_jitter_eps (`float`, *optional*, defaults to `None`):
    If not `None`, the jitter epsilon for the mixture of experts layer.
moe_loss_weight (`float`, *optional*, defaults to 0.01):
    The loss weight for the mixture of experts layer.
moe_normalize_expert_weights (`float`, *optional*, defaults to 1.0):
    The normalization factor for the expert weights.
Ú
ffn_configi   Ni   g{®Gáz„?g      ð?c                óØ   <€ V P                   f
   RR/V n         R F  pW!9   g   K  VP                  V4       K  	  \        V4      ^ 8w  d   \        RV: 24      h\        SV `  ! R/ VB  R # )NÚnameÚsiluzFound unknown kwargs=)Ú
model_typeÚattn_implementationÚexperts_implementationÚtransformers_versionÚ_commit_hashÚtorch_dtypeÚdtyper   )Ú
ffn_act_fnÚpopÚlenÚ
ValueErrorÚsuperÚ__post_init__)ÚselfÚkwargsÚkÚ	__class__s   &, €r   r5   ÚDbrxFFNConfig.__post_init__Q   sh   ø€ Ø�?‰?Ò"Ø% vÐ.ˆDŒOó
ˆAð Ž{Ø—
‘
˜1–ñ
ô ˆv‹;˜!ÔÜÐ5¨f©YÐ7Ó8Ð8ä‰ÒÑ' Ô'r   c                ó´   <€ V ^8„  d   Qh/ S[ ;R&   S[R,          ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[S[ ,          R,          ;R&   S[;R&   S[R,          ;R	&   # )
r   Úhidden_sizeNr0   Úffn_hidden_sizeÚmoe_num_expertsÚ	moe_top_kÚmoe_jitter_epsÚmoe_loss_weightÚmoe_normalize_expert_weights)r   Údictr   )r   r   s   "€r   r   ÚDbrxFFNConfig.__annotate__-   s„   ø‡ ‚ ñ6 Ññ7 ñ8 �t•Ñ"ñ9 ñ: Ññ; ñ< Ññ= ñ> Ññ? ñ@ ™C•K $Õ&Ñ-ñA ñB Ñ!ñC ñD #(¨$¥,Ñ4òE r   )r0   )r   r   r   r   r   r   r<   r0   r=   r>   r?   r@   rA   rB   r5   r    r!   r"   Ú__classcell__©r9   r   s   @@r   r$   r$   -   sG   ù‡ € ñð& #€Oà€KØ"€JØ€OØ€OØ€IØ)-€NØ!€OØ14Ð õ(÷I … r   r$   )r   c                   ó°   a a€ ] tR t^ft oRtRtR]R]/tRRRRR	R
RR/t	Rt
^t^tRtRtRtRtRtRtRtRtRtRtRtRtRtRtV 3R ltR tV3R ltRtVtV ;t # )Ú
DbrxConfiga   
max_seq_len (`int`, *optional*, defaults to 2048):
    The maximum sequence length of the model.
attn_config (`dict`, *optional*):
    A dictionary used to configure the model's attention module.
ffn_config (`dict`, *optional*):
    A dictionary used to configure the model's FFN module.

Example:
```python
>>> from transformers import DbrxConfig, DbrxModel

>>> # Initializing a Dbrx configuration
>>> configuration = DbrxConfig(n_layers=2, d_model=256, n_heads=8, vocab_size=128)

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

>>> # Accessing the model configuration
>>> configuration = model.config
```
Údbrxr
   r%   Únum_attention_headsÚn_headsr<   Úd_modelÚnum_hidden_layersÚn_layersÚmax_position_embeddingsÚmax_seq_leni   i }  r   NTg{®Gáz”?Fc                óô  <€ V P                   f   \        4       V n         M:\        V P                   \        4      '       d   \        R/ V P                   B V n         V P                  f   \        4       V n        M:\        V P                  \        4      '       d   \        R/ V P                  B V n        V P                  V P                  n        V P                   P                  V n	        \        SV `,  ! R/ VB  R # )Nr   )r
   r	   Ú
isinstancerC   r%   r$   rL   r<   r   Únum_key_value_headsr4   r5   )r6   r7   r9   s   &,€r   r5   ÚDbrxConfig.__post_init__›   s°   ø€ Ø×ÑÒ#Ü2Ó4ˆDÕÜ˜×(Ñ(¬$×/Ò/Ü2ÑF°T×5EÑ5EÑFˆDÔà�?‰?Ò"Ü+›oˆD�OÜ˜Ÿ™¬×.Ò.Ü+Ñ>¨d¯o©oÑ>ˆDŒOð '+§l¡lˆ�‰Ô#à#'×#3Ñ#3×#>Ñ#>ˆÔ Ü‰ÒÑ' Ô'r   c                ó@   € V P                   '       d   \        R4      hR# )zOPart of `@strict`-powered validation. Validates the architecture of the config.z5tie_word_embeddings is not supported for DBRX models.N)Útie_word_embeddingsr3   )r6   s   &r   Úvalidate_architectureÚ DbrxConfig.validate_architecture¬   s   € à×#×#Ð#ÜÐTÓUÐUñ $r   c                óì  <€ V ^8„  d   Qh/ S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ ;R&   S[R,          ;R&   S[R,          ;R&   S[S[,          R,          ;R	&   S[S[,          R,          ;R
&   S[;R&   S[;R&   S[R,          ;R&   S[S[,          R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ S[S[ ,          ,          R,          ;R&   S[;R&   # )r   NrL   rK   rN   rP   Ú
vocab_sizeÚresid_pdropÚ	emb_pdropr
   r%   Ú	use_cacheÚinitializer_rangeÚoutput_router_logitsÚrope_parametersÚpad_token_idÚbos_token_idÚeos_token_idrV   )r   r   r	   rC   r$   Úboolr   Úlist)r   r   s   "€r   r   ÚDbrxConfig.__annotate__f   sS  ø‡ ‚ ñF �4�ZÑñG ñH �4�ZÑñI ñJ �D�jÑñK ñL �t•Ñ"ñM ñN ÑñO ñP ˜•Ñ#ñQ ñR �t�|Ñ!ñS ñT %¡tÕ+¨dÕ2Ñ9ñU ñV ¡Õ$ tÕ+Ñ2ñW ñX ÑñY ñZ Ñ#ñ[ ñ\  �+Ñ-ñ] ñ^ $¡dÕ*¨TÕ1Ñ8ñ_ ñ` ˜•*Ñ#ña ñb ˜•*Ñ#ñc ñd ™™S�	•/ DÕ(Ñ/ñe ñf Ñ%òg r   )r
   r%   rS   )!r   r   r   r   r   r)   r	   r$   Úsub_configsÚattribute_maprL   rK   rN   rP   rZ   r[   r\   r
   r%   r]   r^   r_   r`   ra   rb   rc   rV   r5   rW   r    r!   r"   rE   rF   s   @@r   rH   rH   f   s¨   ù‡ € ñð. €JØ Ð"5°|À]ÐS€Kà˜yØ�yØ˜ZØ! =ð	€Mð €GØ€GØ€HØ"€KØ€JØ #€KØ!€IØ59€KØ.2€JØ€IØ#ÐØ(-ÐØ48€OØ#€LØ#€LØ+/€LØ %Ðõ(ò"V÷M … r   rH   N)r   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   r	   r$   rH   Ú__all__r   r   r   Ú<module>rn      s°   ðñ å .å 3Ý 1Ý #ð ÙØGØ5ôôÐ*ó ó	ó ð
ð" ÙØIØ5ôô1(Ð$ó 1(ó	ó ð
1(ñh ÐAÔBØôGVÐ!ó GVó ó CðGVðT ˆ.‚r   