ó
    ‡Ž¡jm  ã                   ó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google/gemma2-7b)Ú
checkpointc                   ó0  ^ • \ 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r\
\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&r\ \!-  S&-  \S-'   S.r"\\S/'   S0r#\
\-  S&-  \S1'   Sr$\
\S2'   S3r%\
S&-  \S4'   S&r&\\   S&-  \S5'   S6r'\S&-  \S7'   S8r(\S&-  \S9'   S&r)\S&-  \S:'   U 4S; jr*S< r+S=r,U =r-$ )>ÚGemma2Configé   aX  
query_pre_attn_scalar (`float`, *optional*, defaults to 256):
    scaling factor used on the attention scores
final_logit_softcapping (`float`, *optional*, defaults to 30.0):
    scaling factor when applying tanh softcapping on the logits.
attn_logit_softcapping (`float`, *optional*, defaults to 50.0):
    scaling factor when applying tanh softcapping on the attention scores.
use_bidirectional_attention (`bool`, *optional*):
    If True, the model will attend to all text tokens instead of using a causal mask.

```python
>>> from transformers import Gemma2Model, Gemma2Config
>>> # Initializing a Gemma2 gemma2-7b style configuration
>>> configuration = Gemma2Config()
>>> # Initializing a model from the gemma2-7b style configuration
>>> model = Gemma2Model(configuration)
>>> # Accessing the model configuration
>>> configuration = model.config
```Úgemma2Úpast_key_valuesÚ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é   Únum_key_value_headsé   Úhead_dimÚgelu_pytorch_tanhÚhidden_activationi    Úmax_position_embeddingsg{®Gáz”?Úinitializer_rangeg�íµ ÷Æ°>Úrms_norm_epsTÚ	use_cacher   NÚpad_token_idé   Úeos_token_idé   Úbos_token_idÚtie_word_embeddingsÚrope_parametersFÚattention_biasg        Úattention_dropoutÚquery_pre_attn_scalari   Úsliding_windowÚlayer_typesg      >@Úfinal_logit_softcappingg      I@Úattn_logit_softcappingÚuse_bidirectional_attentionc                 óÐ   >• U R                   cC  [        U R                  5       Vs/ s H  n[        US-   S-  5      (       a  SOSPM     snU l         [        TU ]  " S0 UD6  g s  snf )Nr)   r+   Úsliding_attentionÚfull_attention© )r3   Úranger   ÚboolÚsuperÚ__post_init__)ÚselfÚkwargsÚiÚ	__class__s      €Ú½C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\transformers/models/gemma2/configuration_gemma2.pyr>   ÚGemma2Config.__post_init__^   si   ø€ Ø×ÑÑ#äX]Ð^b×^tÑ^tÔXuó ÚXuÐST¤t¨Q°©U°a©K×'8Ñ'8Ñ#Ð>NÒNÑXuñ ˆDÔô 	‰ÒÑ' Ó'ùò	 s   ¦$A#c                 óŠ   • U R                   U R                  -  S:w  a&  [        SU R                    SU R                   S35      eg)zOPart of `@strict`-powered validation. Validates the architecture of the config.r   zThe hidden size (z6) is not a multiple of the number of attention heads (z).N)r   r   Ú
ValueError)r?   s    rC   Úvalidate_architectureÚ"Gemma2Config.validate_architecturef   sS   € à×Ñ˜d×6Ñ6Ñ6¸!Ó;ÜØ# D×$4Ñ$4Ð#5ð 6Ø×2Ñ2Ð3°2ð7óð ð <ó    )r3   ).Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚbase_model_tp_planÚbase_model_pp_planr   ÚintÚ__annotations__r   r   r   r   r   r!   r#   Ústrr$   r%   Úfloatr&   r'   r<   r(   r*   Úlistr,   r-   r.   r   Údictr/   r0   r1   r2   r3   r4   r5   r6   r>   rG   Ú__static_attributes__Ú__classcell__)rB   s   @rC   r
   r
      sÄ  ø‡ ñð( €JØ#4Ð"5Ðà%.Ø%.Ø%.Ø%.Ø"+Ø )Ø"+ñÐð &˜¨Ð(9Ð:Ø#Ð%5Ð6¸Ð8IÐJØ!Ð" _Ð$5Ð6ñÐð €J�ÓØ€K�ÓØ!Ð�sÓ!ØÐ�sÓØ Ð˜Ó Ø Ð˜Ó Ø€HˆcÓØ0Ð�sÓ0Ø#'Ð˜SÓ'Ø#Ð�uÓ#Ø€L�%ÓØ€IˆtÓØ €L�#˜‘*Ó Ø+,€L�#˜˜S™	‘/ DÑ(Ó,Ø €L�#˜‘*Ó Ø $Ð˜Ó$Ø48€O�^ dÑ*¨TÑ1Ó8Ø €N�DÓ Ø,/Ð�s˜U‘{ TÑ)Ó/Ø!$Ð˜3Ó$Ø!%€N�C˜$‘JÓ%Ø$(€K��c‘˜TÑ!Ó(Ø,0Ð˜U T™\Ó0Ø+/Ð˜E D™LÓ/Ø/3Ð ¨¡Ó3õ(÷ð rI   r
   N)
Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   r
   Ú__all__r:   rI   rC   Ú<module>r`      sK   ðõ* /å 3Ý 1Ý #ñ Ð-Ñ.ØôNÐ#ó Nó ó /ðNðb Ð
�rI   