§
    9²¸jS  ã                   ó˜   — 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dS )é    )Ústricté   )ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstring)Úintervalzbiohub/ESMC-6B-hf)Ú
checkpointc                   óþ  ‡ — e Zd ZU dZd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dz  e	d"<   d#Zedz  e	d$<   d%Ze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	d*<   dZeez  dz  e	d+<   d'Z ee	d,<   dZ!edz  e	d-<   d.Z"edz  e	d/<   d0Z#edz  e	d1<   ˆ fd2„Z$d3„ Z%ˆ xZ&S )4Ú
EsmcConfiga¤  
    mask_token_id (`int`, *optional*, defaults to 32):
        Index of the mask token in the vocabulary (``"<mask>"``), used for masked language modelling.
    classifier_dropout (`float`, *optional*, defaults to 0.1):
        Dropout ratio for the classification head.

    Examples:

    ```python
    >>> from transformers import EsmcConfig, EsmcModel

    >>> # Initializing an ESMC biohub/ESMC-6B-hf style configuration
    >>> configuration = EsmcConfig()

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

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
    ÚesmcÚ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Únormé@   Ú
vocab_sizei 
  Úhidden_sizei   Úintermediate_sizeéP   Únum_hidden_layersé(   Únum_attention_headsNÚnum_key_value_headsÚsiluÚ
hidden_acti   Úmax_position_embeddingsg        g      ð?)ÚminÚmaxg{®Gáz”?)ÚdefaultÚinitializer_rangeé   Úpad_token_idr   Úbos_token_idé   Úeos_token_idFÚtie_word_embeddingsÚrope_parametersÚattention_biasÚattention_dropoutÚmlp_biasÚhead_dimé    Úmask_token_idgš™™™™™¹?Úclassifier_dropoutc                 óÎ   •— | j         €d| _         | j        €d| _        | j        €| j        | j        z  | _        | j        €| j        | _         t          ¦   «         j        di |¤Ž d S )Nr   r)   © )r(   r*   r0   r   r   r   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €ú{/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/transformers/models/esmc/configuration_esmc.pyr7   zEsmcConfig.__post_init__^   sx   ø€ ð ÔÐ$Ø !ˆDÔØÔÐ$Ø !ˆDÔØŒ=Ð Ø Ô,°Ô0HÑHˆDŒMØÔ#Ð+Ø'+Ô'?ˆDÔ$à�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'ó    c                 óÌ   — | j         | j        z  dk    r t          d| j         › d| j        › d�¦  «        ‚| j        | j        k    r t          d| j        › d| j        › d�¦  «        ‚dS )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).zFESMC does not support grouped-query attention: `num_key_value_heads` (z$) must equal `num_attention_heads` (N)r   r   Ú
ValueErrorr   )r8   s    r;   Úvalidate_architecturez EsmcConfig.validate_architecturel   s±   € àÔ˜dÔ6Ñ6¸!Ò;Ð;Ýð7 DÔ$4ð 7ð 7ØÔ2ð7ð 7ð 7ñô ð ð
 Ô# tÔ'?Ò?Ð?ÝðoØÔ,ðoð oØRVÔRjðoð oð oñô ð ð @Ð?r<   )'Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚbase_model_tp_planÚbase_model_pp_planr   ÚintÚ__annotations__r   r   r   r   r   r    Ústrr!   r   r%   Úfloatr'   r(   r*   Úlistr+   Úboolr,   r   Údictr-   r.   r/   r0   r2   r3   r7   r?   Ú__classcell__)r:   s   @r;   r   r      sZ  ø€ € € € € € ðð ð, €Jð &/Ø%.Ø%.Ø%.Ø"+Ø )Ø"+ðð Ðð &˜¨Ð(9Ð:Ø#Ð%5Ð6¸Ð8IÐJØ!Ð" _Ð$5Ð6ðð Ðð €J�ÐÐÑØ€K�ÐÐÑØ!Ð�sÐ!Ð!Ñ!ØÐ�sÐÐÑØ!Ð˜Ð!Ð!Ñ!Ø&*Ð˜˜t™Ð*Ð*Ñ*Ø€J�ÐÐÑØ#'Ð˜SÐ'Ð'Ñ'Ø9˜x˜x¨C°SÐ9Ñ9Ô9À$ÐGÑGÔGÐ�uÐGÐGÑGØ €L�#˜‘*Ð Ð Ñ Ø €L�#˜‘*Ð Ð Ñ Ø+,€L�#˜˜Sœ	‘/ DÑ(Ð,Ð,Ñ,Ø %Ð˜Ð%Ð%Ñ%Ø48€O�^ dÑ*¨TÑ1Ð8Ð8Ñ8Ø €N�DÐ Ð Ñ Ø,/Ð�s˜U‘{ TÑ)Ð/Ð/Ñ/Ø€HˆdÐÐÑØ€Hˆc�D‰jÐÐÑð !#€M�3˜‘:Ð"Ð"Ñ"Ø'*Ð˜ ™Ð*Ð*Ñ*ð(ð (ð (ð (ð (ðð ð ð ð ð ð r<   r   N)Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   Úutils.type_validatorsr   r   Ú__all__r5   r<   r;   ú<module>rU      sÇ   ðð( /Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø #Ð #Ð #Ð #Ð #Ð #Ø -Ð -Ð -Ð -Ð -Ð -ð €Ð.Ð/Ñ/Ô/ØðZð Zð Zð Zð ZÐ!ñ Zô Zñ „ñ 0Ô/ðZðz ˆ.€€€r<   