Ë
    ÜÓ^j8  ã                   ó‚   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
  ed¬	«      e G d
„ de«      «       «       ZdgZy)zLLaMA model configurationé    )Ústricté   )ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstring)Úintervalzmeta-llama/Llama-2-7b-hf)Ú
checkpointc                   óú  ‡ — e Zd ZU dZdZdgZddddddddœZdgdgfd	d
gd	gfd	gd	gfdœZdZe	e
d<   dZe	e
d<   dZe	e
d<   dZe	e
d<   dZe	e
d<   dZe	dz  e
d<   dZee
d<   dZe	e
d<     edd¬«      d¬«      Zee
d <   d!Zee
d"<   d#Zee
d$<   dZe	dz  e
d%<   d&Ze	dz  e
d'<   d(Ze	ee	   z  dz  e
d)<   d&Ze	dz  e
d*<   d+Zee
d,<   dZe e!z  dz  e
d-<   d+Z"ee
d.<   dZ#e	ez  dz  e
d/<   d+Z$ee
d0<   dZ%e	dz  e
d1<   ˆ fd2„Z&d3„ Z'ˆ xZ(S )4ÚLlamaConfigat  
    ```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                 ó²   •— | j                   €| j                  | j                  z  | _         | j                  €| j                  | _        t	        ‰| �  di |¤Ž y )N© )r2   r   r   r   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €úx/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/llama/configuration_llama.pyr6   zLlamaConfig.__post_init__V   sO   ø€ Ø�=‰=Ð Ø ×,Ñ,°×0HÑ0HÑHˆDŒMØ×#Ñ#Ð+Ø'+×'?Ñ'?ˆDÔ$ä‰ÑÑ' Ó'ó    c                 óˆ   — | j                   | j                  z  dk7  r&t        d| j                   › d| j                  › d�«      ‚y)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)r7   s    r:   Úvalidate_architecturez!LlamaConfig.validate_architecture^   sS   € à×Ñ˜d×6Ñ6Ñ6¸!Ò;ÜØ# D×$4Ñ$4Ð#5ð 6Ø×2Ñ2Ð3°2ð7óð ð <r;   ))Ú__name__Ú
__module__Ú__qualname__Ú__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   Údictr/   r0   r1   r2   r6   r>   Ú__classcell__)r9   s   @r:   r   r      s•  ø… ñð €JØ#4Ð"5Ðð &/Ø%.Ø%.Ø%.Ø"+Ø )Ø"+ñÐð &˜¨Ð(9Ð:Ø#Ð%5Ð6¸Ð8IÐJØ!Ð" _Ð$5Ð6ñÐð €J�ÓØ€K�ÓØ"Ð�sÓ"ØÐ�sÓØ!Ð˜Ó!Ø&*Ð˜˜t™Ó*Ø€J�ÓØ#'Ð˜SÓ'Ø9™x¨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)rB   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   Úutils.type_validatorsr   r   Ú__all__r4   r;   r:   ú<module>rU      sP   ðñ&  å .å 3Ý 1Ý #Ý -ñ Ð5Ô6ØôEÐ"ó Eó ó 7ðEðP ˆ/�r;   