§
    ‚Štj<  ã                   ó  — d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	  e	j
        e¦  «        Z ed¬¦  «        e G d	„ d
e¦  «        ¦   «         ¦   «         Z ed¬¦  «        e G d„ de¦  «        ¦   «         ¦   «         ZdgZdS )zEvolla model configurationé    )Ústricté   )ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstringÚloggingzwestlake-repl/Evolla-10B-hf)Ú
checkpointc                   ó  — e Zd ZU 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ed<   dZeed<   dZeez  ed<   dZeez  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ed<   dZeed<   dZeed <   dZeed!<   dZeed"<   d#S )$ÚSaProtConfigaß  
    mask_token_id (`int`, *optional*, defaults to 4):
        The id of the *mask* token in the protein sequence model.
    position_embedding_type (`str`, *optional*, defaults to `"rotary"`):
        The type of position embedding to use in the protein sequence model. Currently only `"rotary"` is supported.
    rope_theta (`float`, *optional*, defaults to 10000.0):
        The base period of the RoPE embeddings.
    emb_layer_norm_before (`bool`, *optional*, defaults to `False`):
        Whether to apply layer normalization before the position embedding in the protein sequence model.
    token_dropout (`bool`, *optional*, defaults to `True`):
        Whether to apply dropout to the tokens in the protein sequence model.
    i¾  Ú
vocab_sizeé   Úmask_token_idé   Úpad_token_idi   Úhidden_sizeé!   Únum_hidden_layersé   Únum_attention_headsi   Úintermediate_sizeçš™™™™™¹?Úhidden_dropout_probÚattention_probs_dropout_probi  Úmax_position_embeddingsç{®Gáz”?Úinitializer_rangeçñhãˆµøä>Úlayer_norm_epsÚrotaryÚposition_embedding_typeg     ˆÃ@Ú
rope_thetaFÚemb_layer_norm_beforeTÚtoken_dropoutÚ
is_decoderÚadd_cross_attentionN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚintÚ__annotations__r   r   r   r   r   r   r   Úfloatr   r   r   r   r    Ústrr!   r"   Úboolr#   r$   r%   © ó    úm/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/evolla/configuration_evolla.pyr   r      sP  € € € € € € ðð ð €J�ÐÐÑØ€M�3ÐÐÑØ€L�#ÐÐÑØ€K�ÐÐÑØÐ�sÐÐÑØ!Ð˜Ð!Ð!Ñ!Ø!Ð�sÐ!Ð!Ñ!Ø'*Ð˜ ™Ð*Ð*Ñ*Ø03Ð  %¨#¡+Ð3Ð3Ñ3Ø#'Ð˜SÐ'Ð'Ñ'Ø#Ð�uÐ#Ð#Ñ#Ø!€N�EÐ!Ð!Ñ!Ø#+Ð˜SÐ+Ð+Ñ+Ø€J�ÐÐÑØ"'Ð˜4Ð'Ð'Ñ'Ø€M�4ÐÐÑØ€J�ÐÐÑØ %Ð˜Ð%Ð%Ñ%Ð%Ð%r0   r   c                   óv  ‡ — e Zd ZU dZdZdeiZdZdZe	e
z  dz  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ed<   dZedz  ed<   dZeed<   dZe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 <   d!Z edz  ed"<   dZ!edz  ed#<   d$Z"edz  ed%<   d&Z#edz  ed'<   dZ$edz  ed(<   d&Z%edz  ed)<   dZ&e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e+e         z  dz  ed1<   dZ,eed2<   dZ-eed3<   dZ.edz  ed4<   dZ/edz  ed5<   ˆ fd6„Z0ˆ xZ1S )7ÚEvollaConfiga€  
    protein_encoder_config (`dict`, *optional*):
        Dictionary of configuration options used to initialize [`SaProtConfig`].
    aligner_ffn_mult (`int`, *optional*, defaults to 4):
        The FFN multiplier for the aligner layer.
    aligner_enable_bias (`bool`, *optional*, defaults to `True`):
        Whether to use bias in the aligner layer.
    aligner_attention_probs_dropout_prob (`float`, *optional*, defaults to 0.1):
        The dropout ratio for the attention probabilities in the aligner layer.
    aligner_num_add_layers (`int`, *optional*, defaults to 8):
        The number of additional layers for the aligner layer.
    resampler_depth (`int`, *optional*, defaults to 6):
        The depth of the resampler layer in the llama model.
    resampler_dim_head (`int`, *optional*, defaults to 64):
        The dimension of the heads in the resampler layer in the llama model.
    resampler_heads (`int`, *optional*, defaults to 8):
        The number of heads in the resampler layer in the llama model.
    resampler_num_latents (`int`, *optional*, defaults to 64):
        The number of latents in the resampler layer in the llama model.
    resampler_ff_mult (`int`, *optional*, defaults to 4):
        The FFN multiplier for the resampler layer.

    Example:

    ```python
    >>> from transformers import EvollaModel, EvollaConfig

    >>> # Initializing a Evolla evolla-10b style configuration
    >>> configuration = EvollaConfig()

    >>> # Initializing a model from the evolla-10b style configuration
    >>> model = EvollaModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```ÚevollaÚprotein_encoder_configg    €„ANi õ r   i   r   i 8  r   é    r   r   é   Únum_key_value_headsÚsiluÚ
hidden_acti    r   r   Úrms_norm_epsÚrope_parametersFÚattention_biasg        Úattention_dropoutÚmlp_biasr   Úaligner_ffn_multTÚaligner_enable_biasr   Ú$aligner_attention_probs_dropout_probÚaligner_num_add_layersé   Úresampler_depthé@   Úresampler_dim_headÚresampler_headsÚresampler_num_latentsÚresampler_ff_multr   r   r   i ô Úbos_token_idi	ô Úeos_token_idÚ	use_cacheÚtie_word_embeddingsr$   r%   c                 ó  •— | j         €.t          ¦   «         | _         t                               d¦  «         n0t	          | j         t
          ¦  «        rt          di | j         ¤Ž| _          t          ¦   «         j        di |¤Ž d S )NzX`protein_encoder_config` is `None`. Initializing the `SaProtConfig` with default values.r/   )r5   r   ÚloggerÚinfoÚ
isinstanceÚdictÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €r1   rU   zEvollaConfig.__post_init__Š   s€   ø€ ØÔ&Ð.Ý*6©.¬.ˆDÔ'Ý�KŠKÐrÑsÔsÐsÐsÝ˜Ô3µTÑ:Ô:ð 	VÝ*6Ð*UÐ*U¸Ô9TÐ*UÐ*UˆDÔ'Ø�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'r0   )2r&   r'   r(   r)   Ú
model_typer   Úsub_configsÚdefault_thetar5   rS   r   r+   r   r*   r   r   r   r   r8   r:   r-   r   r;   r,   r<   r   r=   r.   r>   r?   r@   rA   rB   rC   rE   rG   rH   rI   rJ   r   r   rK   rL   ÚlistrM   rN   r$   r%   rU   Ú__classcell__)rX   s   @r1   r3   r3   >   s¿  ø€ € € € € € ð#ð #ðJ €JØ+¨\Ð:€KØ€Mà=AÐ˜DÐ#3Ñ3°dÑ:ÐAÐAÑAØ€J�ÐÐÑØ€K�ÐÐÑØ"Ð�sÐ"Ð"Ñ"ØÐ�sÐÐÑØ!Ð˜Ð!Ð!Ñ!Ø&'Ð˜˜t™Ð'Ð'Ñ'Ø€J�ÐÐÑØ#'Ð˜SÐ'Ð'Ñ'Ø€L�%ÐÐÑØ48€O�^ dÑ*¨TÑ1Ð8Ð8Ñ8Ø €N�DÐ Ð Ñ Ø,/Ð�u˜s‘{ TÑ)Ð/Ð/Ñ/Ø€HˆdÐÐÑØ#$Ð�c˜D‘jÐ$Ð$Ñ$Ø'+Ð˜ ™Ð+Ð+Ñ+Ø9<Ð(¨%°$©,Ð<Ð<Ñ<Ø)*Ð˜C $™JÐ*Ð*Ñ*Ø"#€O�S˜4‘ZÐ#Ð#Ñ#Ø%'Ð˜˜d™
Ð'Ð'Ñ'Ø"#€O�S˜4‘ZÐ#Ð#Ñ#Ø(*Ð˜3 ™:Ð*Ð*Ñ*Ø$%Ð�s˜T‘zÐ%Ð%Ñ%Ø#Ð�uÐ#Ð#Ñ#Ø#€L�#˜‘*Ð#Ð#Ñ#Ø%€L�#˜‘*Ð%Ð%Ñ%Ø+1€L�#˜˜Sœ	‘/ DÑ(Ð1Ð1Ñ1Ø€IˆtÐÐÑØ %Ð˜Ð%Ð%Ñ%Ø#€J��t‘Ð#Ð#Ñ#Ø',Ð˜ ™Ð,Ð,Ñ,ð(ð (ð (ð (ð (ð (ð (ð (ð (r0   r3   N)r)   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   r   Ú
get_loggerr&   rP   r   r3   Ú__all__r/   r0   r1   ú<module>rd      s'  ðð !Ð  à .Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,ð 
ˆÔ	˜HÑ	%Ô	%€ð €Ð8Ð9Ñ9Ô9Øð&ð &ð &ð &ð &Ð#ñ &ô &ñ „ñ :Ô9ð&ðD €Ð8Ð9Ñ9Ô9ØðP(ð P(ð P(ð P(ð P(Ð#ñ P(ô P(ñ „ñ :Ô9ðP(ðf Ð
€€€r0   