ó
    qyüi8  ã                   ó|   • S r SSKJr  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)zLLaMA model configurationé    )Ústricté   )ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstring)Úintervalzmeta-llama/Llama-2-7b-hf)Ú
checkpointc                   óø  ^ • \ 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SS9" SS 9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r$\
\-  S-  \S0'   S,r%\\S1'   Sr&\
S-  \S2'   U 4S3 jr'S4 r(S5r)U =r*$ )6ÚLlamaConfigé   aP  
```python
>>> from transformers import LlamaModel, LlamaConfig

>>> # Initializing a LLaMA llama-7b style configuration
>>> configuration = LlamaConfig()

>>> # Initializing a model from the llama-7b style configuration
>>> model = LlamaModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```ÚllamaÚ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_headsNÚnum_key_value_headsÚsiluÚ
hidden_acti   Úmax_position_embeddingsg        g      ð?)ÚminÚmaxg{®Gáz”?)ÚdefaultÚinitializer_rangeg�íµ ÷Æ°>Úrms_norm_epsTÚ	use_cacheÚpad_token_idé   Úbos_token_idé   Úeos_token_idÚpretraining_tpFÚtie_word_embeddingsÚrope_parametersÚattention_biasÚattention_dropoutÚmlp_biasÚhead_dimc                 ó¸   >• U R                   c  U R                  U R                  -  U l         U R                  c  U R                  U l        [        TU ]  " S0 UD6  g )N© )r3   r   r   r   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €Új/home/mande/repo/quber/.venv/lib/python3.13/site-packages/transformers/models/llama/configuration_llama.pyr7   ÚLlamaConfig.__post_init__V   sO   ø€ Ø�=‰=Ñ Ø ×,Ñ,°×0HÑ0HÑHˆDŒMØ×#Ñ#Ñ+Ø'+×'?Ñ'?ˆDÔ$ä‰ÒÑ' Ó'ó    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)r8   s    r;   Úvalidate_architectureÚ!LlamaConfig.validate_architecture^   sS   € à×Ñ˜d×6Ñ6Ñ6¸!Ó;ÜØ# D×$4Ñ$4Ð#5ð 6Ø×2Ñ2Ð3°2ð7óð ð <r=   )r3   r   )+Ú__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    Ústrr!   r   r%   Úfloatr&   r'   Úboolr(   r*   r,   Úlistr-   r.   r/   r   Údictr0   r1   r2   r3   r7   r@   Ú__static_attributes__Ú__classcell__)r:   s   @r;   r   r      s˜  ø‡ ñð €JØ#4Ð"5Ðð &/Ø%.Ø%.Ø%.Ø"+Ø )Ø"+ñÐð &˜¨Ð(9Ð:Ø#Ð%5Ð6¸Ð8IÐJØ!Ð" _Ð$5Ð6ñÐð €J�ÓØ€K�ÓØ"Ð�sÓ"ØÐ�sÓØ!Ð˜Ó!Ø&*Ð˜˜t™Ó*Ø€J�ÓØ#'Ð˜SÓ'Ù'¨C°SÒ9À$ÑGÐ�uÓGØ€L�%ÓØ€IˆtÓØ#€L�#˜‘*Ó#Ø €L�#˜‘*Ó Ø+,€L�#˜˜S™	‘/ DÑ(Ó,Ø!"€N�C˜$‘JÓ"Ø %Ð˜Ó%Ø48€O�^ dÑ*¨TÑ1Ó8Ø €N�DÓ Ø,/Ð�s˜U‘{ TÑ)Ó/Ø€HˆdÓØ€Hˆc�D‰jÓõ(÷ð r=   r   N)rF   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   Úutils.type_validatorsr   r   Ú__all__r5   r=   r;   Ú<module>rZ      sP   ðñ&  å .å 3Ý 1Ý #Ý -ñ Ð5Ñ6ØôEÐ"ó Eó ó 7ðEðP ˆ/�r=   