
    Z j<                         S r SSKJr  SSKJr  SSKJr  SSKJrJ	r	  \	R                  " \5      r\" SS9\ " S	 S
\5      5       5       r\" SS9\ " S S\5      5       5       rS/rg)zEvolla model configuration    )strict   )PreTrainedConfig)RopeParameters)auto_docstringloggingzwestlake-repl/Evolla-10B-hf)
checkpointc                   "   \ rS rSr% 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r\\S'   Sr\\S'   S r\\S!'   Sr\\S"'   Sr\\S#'   S$rg%)&SaProtConfig   a  
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{Gz?initializer_rangeh㈵>layer_norm_epsrotaryposition_embedding_typeg     @
rope_thetaFemb_layer_norm_beforeTtoken_dropout
is_decoderadd_cross_attention N)__name__
__module____qualname____firstlineno____doc__r   int__annotations__r   r   r   r   r   r   r   floatr   r   r   r   r!   strr"   r#   boolr$   r%   r&   __static_attributes__r'       ڀ/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/evolla/configuration_evolla.pyr   r      s     JM3L#Ks!!!s!'**03 %#+3#'S'#u#!NE!#+S+J"'4'M4J %%r3   r   c                   z  ^  \ rS rSr% SrSrS\0rSrSr	\
\-  S-  \S'   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r\\S'   Sr\\
-  S-  \S'   Sr\\S'   Sr\\-  S-  \S'   Sr\\S'   Sr\S-  \S'   S r \S-  \S!'   S"r!\S-  \S#'   Sr"\S-  \S$'   S%r#\S-  \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-  \S0'   S1r+\\,\   -  S-  \S2'   Sr-\\S3'   Sr.\\S4'   Sr/\S-  \S5'   Sr0\S-  \S6'   U 4S7 jr1S8r2U =r3$ )9EvollaConfig>   a  
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                    > U R                   c%  [        5       U l         [        R                  S5        O9[	        U R                   [
        5      (       a  [        S0 U R                   D6U l         [        TU ]  " S0 UD6  g )NzX`protein_encoder_config` is `None`. Initializing the `SaProtConfig` with default values.r'   )r9   r   loggerinfo
isinstancedictsuper__post_init__)selfkwargs	__class__s     r4   rY   EvollaConfig.__post_init__   s_    &&.*6.D'KKrs33T::*6*U9T9T*UD'''r3   )r9   )4r(   r)   r*   r+   r,   
model_typer   sub_configsdefault_thetar9   rW   r   r.   r   r-   r   r   r   r   r<   r>   r0   r   r?   r/   r@   r   rA   r1   rB   rC   rD   rE   rF   rG   rI   rK   rL   rM   rN   r   r   rO   rP   listrQ   rR   r%   r&   rY   r2   __classcell__)r\   s   @r4   r6   r6   >   s   #J J+\:KM=AD#33d:AJK"s"s!!&'t'J#'S'L%48O^d*T18 ND ,/us{T)/Hd#$cDj$'++9<(%$,<)*C$J*"#OS4Z#%'d
'"#OS4Z#(*3:*$%sTz%#u##L#*#%L#*%+1L#S	/D(1It %%#Jt#',,( (r3   r6   N)r,   huggingface_hub.dataclassesr   configuration_utilsr   modeling_rope_utilsr   utilsr   r   
get_loggerr(   rT   r   r6   __all__r'   r3   r4   <module>ri      s    ! . 3 1 , 
		H	% 89&# &  :&D 89P(# P(  :P(f 
r3   