
    n i                     $   d dl Z d dlmZ  G d de j                  Z G d de j                  Z G d de j                  Z G d	 d
ej                  Z G d dej                  Z	 G d dej                  Z
 G d dej                  ZdS )    N)
model_specc                   .    e Zd ZdZdZdZdZdZdZdZ	dZ
d	S )

ActivationActivation type.r                     N)__name__
__module____qualname____doc__RELUGELUTanhSWISHGELUGELUSigmoidTanhSigmoid     ]/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/ctranslate2/specs/common_spec.pyr   r      s7        DHEDKDGGGr   r   c                       e Zd ZdZdZdZdS )EmbeddingsMergez&Merge strategy for factors embeddings.r   r   N)r   r   r   r   CONCATADDr   r   r   r   r      s        00F
CCCr   r   c                       e Zd ZdZdZdZdZdS )Quantizationr   r   r   r   N)r   r   r   r   CT2AWQ_GEMMAWQ_GEMVr   r   r   r    r       s#        
CHHHHr   r    c                       e Zd ZddZdS )LayerNormSpecFc                 L    d | _         |s	d | _        d S t          j        | _        d S N)gammabetar   OPTIONALlayer_norm_use_residual)selfrms_norms     r   __init__zLayerNormSpec.__init__$   s-    
 	?DIII+5+>D(((r   N)Fr   r   r   r.   r   r   r   r%   r%   #   s(        ? ? ? ? ? ?r   r%   c                       e Zd Zd Zd ZdS )
LinearSpecc                 z    d | _         t          j        | _        t          j        | _        t          j        | _        d S r'   )weightr   r*   weight_scaleweight_zerobiasr,   s    r   r.   zLinearSpec.__init__-   s-    &/%.'			r   c                 8    t          | j        t                     S r'   )
isinstancer6   strr7   s    r   has_biaszLinearSpec.has_bias3   s    di----r   N)r   r   r   r.   r;   r   r   r   r1   r1   ,   s2        ( ( (. . . . .r   r1   c                       e Zd Zd ZdS )
Conv1DSpecc                 X    d | _         t          j        | _        t          j        | _        d S r'   )r3   r   r*   r4   r6   r7   s    r   r.   zConv1DSpec.__init__8   s"    &/'			r   Nr/   r   r   r   r=   r=   7   s#        ( ( ( ( (r   r=   c                       e Zd Zd ZdS )EmbeddingsSpecc                 X    d | _         t          j        | _        t          j        | _        d S r'   )r3   r   r*   r4   multiply_by_sqrt_depthr7   s    r   r.   zEmbeddingsSpec.__init__?   s%    &/&0&9###r   Nr/   r   r   r   r@   r@   >   s#        : : : : :r   r@   )enumctranslate2.specsr   IntEnumr   r   r    	LayerSpecr%   r1   r=   r@   r   r   r   <module>rG      sb    ( ( ( ( ( (	 	 	 	 	 	 	 	    dl       4<   ? ? ? ? ?J( ? ? ?. . . . .% . . .( ( ( ( (% ( ( (: : : : :Z) : : : : :r   