Ë
    ÜÓ^j½  ã                   ór   — 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
)é    )Ústricté   )ÚPreTrainedConfig)ÚRopeParameters)Úauto_docstringzMiniMaxAI/MiniMax-Text-01-hf)Ú
checkpointc                   ó®  ‡ — e Zd ZU dZdZdg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ddddœZ	ddi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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dz  ed-<   d.Zeee   z  dz  ed/<   d0Z eed1<   dZ!edz  ed2<   d3Z"eez  ed4<   d.Z#eed5<   dZ$eed<   d0Z%eed6<   d7Z&eed8<   d3Z'eed9<   dZ(e)e*z  dz  ed:<   dZ+ee   dz  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z  ed@<   d,Z0eez  edA<   d,Z1eez  edB<   d,Z2eez  edC<   ˆ fdD„Z3ˆ xZ4S )EÚMiniMaxConfiga¡  
    block_size (`int`, *optional*, defaults to 256):
        The length of each attention block, determining how queries, keys, and values
        are grouped and processed for intra- and inter-block attention.
    full_attn_alpha_factor (`float`, *optional*, defaults to 1):
        Weight for residual value in residual connection after normal attention.
    full_attn_beta_factor (`float`, *optional*, defaults to 1):
        Weight for hidden state value in residual connection after normal attention.
    linear_attn_alpha_factor (`float`, *optional*, defaults to 1):
        Weight for residual value in residual connection after lightning attention.
    linear_attn_beta_factor (`float`, *optional*, defaults to 1):
        Weight for hidden state value in residual connection after lightning attention.
    mlp_alpha_factor (`float`, *optional*, defaults to 1):
        Weight for residual value in residual connection after MLP.
    mlp_beta_factor (`float`, *optional*, defaults to 1):
        Weight for hidden state value in residual connection after MLP.

    ```python
    >>> from transformers import MiniMaxModel, MiniMaxConfig

    >>> # Initializing a MiniMax style configuration
    >>> configuration = MiniMaxConfig()

    >>> # Initializing a model from the MiniMax style configuration
    >>> model = MiniMaxModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```ÚminimaxÚpast_key_valuesg    €„.AÚcolwiseÚrowwiseÚpacked_colwiseÚmoe_tp_experts)zlayers.*.self_attn.q_projzlayers.*.self_attn.k_projzlayers.*.self_attn.v_projzlayers.*.self_attn.o_projú!layers.*.mlp.experts.gate_up_projúlayers.*.mlp.experts.down_projúlayers.*.mlp.expertsÚ	input_idsÚinputs_embedsÚhidden_statesÚattention_mask)Úembed_tokensÚlayersÚnormÚ	ep_routerÚgrouped_gemm)zlayers.*.mlp.gater   r   r   Únum_expertsÚnum_local_expertsi }  Ú
vocab_sizei   Úhidden_sizei 8  Úintermediate_sizeé    Únum_hidden_layersÚnum_attention_headsé   Únum_key_value_headsNÚhead_dimÚsiluÚ
hidden_acti   Úmax_position_embeddingsg{®Gáz”?Úinitializer_rangegñhãˆµøä>Úrms_norm_epsTÚ	use_cacheÚpad_token_idé   Úbos_token_idé   Úeos_token_idFÚtie_word_embeddingsÚsliding_windowg        Úattention_dropoutÚnum_experts_per_tokÚoutput_router_logitsgü©ñÒMbP?Úrouter_aux_loss_coefÚrouter_jitter_noiseÚrope_parametersÚlayer_typesé   Ú
block_sizeÚfull_attn_alpha_factorÚfull_attn_beta_factorÚlinear_attn_alpha_factorÚlinear_attn_beta_factorÚmlp_alpha_factorÚmlp_beta_factorc                 óö   •— | j                   €| j                  | _         | j                  €;t        | j                  «      D �cg c]  }t        |dz   dz  «      rdnd‘Œ c}| _        t        ‰| �  di |¤Ž y c c}w )Nr/   r1   Úfull_attentionÚlinear_attention© )r&   r$   r;   Úranger#   ÚboolÚsuperÚ__post_init__)ÚselfÚkwargsÚiÚ	__class__s      €ú|/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/minimax/configuration_minimax.pyrK   zMiniMaxConfig.__post_init__w   sz   ø€ Ø×#Ñ#Ð+Ø'+×'?Ñ'?ˆDÔ$à×ÑÐ#äW\Ð]a×]sÑ]sÓWtö ØRS¤D¨!¨a©%°1©Ô$5Ñ Ð;MÑMò ˆDÔô 	‰ÑÑ' Ó'ùò	 s   ÁA6)5Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚdefault_thetaÚbase_model_tp_planÚbase_model_pp_planÚbase_model_ep_planÚattribute_mapr   ÚintÚ__annotations__r    r!   r#   r$   r&   r'   r)   Ústrr*   r+   Úfloatr,   r-   rI   r.   r0   r2   Úlistr3   r4   r5   r6   r   r7   r8   r9   r:   r   Údictr;   r=   r>   r?   r@   rA   rB   rC   rK   Ú__classcell__)rO   s   @rP   r
   r
      s;  ø… ñð< €JØ#4Ð"5ÐØ€Mà%.Ø%.Ø%.Ø%.Ø-=Ø*3Ø 0ñÐð &˜¨Ð(9Ð:Ø#Ð%5Ð6¸Ð8IÐJØ!Ð" _Ð$5Ð6ñÐð )Ø-;Ø*8Ø 0ñ	Ðð #Ð$7Ð8€Mà€J�ÓØ€K�ÓØ"Ð�sÓ"ØÐ�sÓØ!Ð˜Ó!Ø Ð˜Ó Ø€Hˆc�D‰jÓØ€J�ÓØ#,Ð˜SÓ,Ø#Ð�uÓ#Ø€L�%ÓØ€IˆtÓØ#€L�#˜‘*Ó#Ø €L�#˜‘*Ó Ø+,€L�#˜˜S™	‘/ DÑ(Ó,Ø %Ð˜Ó%Ø!%€N�C˜$‘JÓ%Ø%(Ð�u˜s‘{Ó(Ø Ð˜Ó ØÐ�sÓØ!&Ð˜$Ó&Ø"'Ð˜%Ó'Ø!$Ð˜Ó$Ø48€O�^ dÑ*¨TÑ1Ó8Ø$(€K��c‘˜TÑ!Ó(Ø€J�ÓØ*+Ð˜C %™KÓ+Ø)*Ð˜3 ™;Ó*Ø,-Ð˜c E™kÓ-Ø+,Ð˜S 5™[Ó,Ø$%Ð�c˜E‘kÓ%Ø#$€O�S˜5‘[Ó$÷	(ð 	(ó    r
   N)
Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodeling_rope_utilsr   Úutilsr   r
   Ú__all__rG   rc   rP   ú<module>ri      sK   ðõ* /å 3Ý 1Ý #ñ Ð9Ô:Øôb(Ð$ó b(ó ó ;ðb(ðJ Ð
�rc   