§
    ‚Štj  ã                   ó„   — d 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 )z&Funnel Transformer model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringzfunnel-transformer/small)Ú
checkpointc                   ó*  ‡ — e Zd ZU dZdZdddœZdZeed<   dZ	e
e         eed	f         z  ed
<   dZe
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ed<   dZeez  ed<   dZeez  ed<   dZeez  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ed'<   dZ!edz  ed(<   d$Z"eed)<   ˆ fd*„Z#d+„ Z$e%d,„ ¦   «         Z&e&j'        d-„ ¦   «         Z&e%d.„ ¦   «         Z(e(j'        d/„ ¦   «         Z(ˆ xZ)S )0ÚFunnelConfiga  
    block_sizes (`list[int]`, *optional*, defaults to `[4, 4, 4]`):
        The sizes of the blocks used in the model.
    block_repeats (`list[int]`, *optional*):
        If passed along, each layer of each block is repeated the number of times indicated.
    num_decoder_layers (`int`, *optional*, defaults to 2):
        The number of layers in the decoder (when not using the base model).
    pooling_type (`str`, *optional*, defaults to `"mean"`):
        Possible values are `"mean"` or `"max"`. The way pooling is performed at the beginning of each block.
    attention_type (`str`, *optional*, defaults to `"relative_shift"`):
        Possible values are `"relative_shift"` or `"factorized"`. The former is faster on CPU/GPU while the latter
        is faster on TPU.
    separate_cls (`bool`, *optional*, defaults to `True`):
        Whether or not to separate the cls token when applying pooling.
    truncate_seq (`bool`, *optional*, defaults to `True`):
        When using `separate_cls`, whether or not to truncate the last token when pooling, to avoid getting a
        sequence length that is not a multiple of 2.
    pool_q_only (`bool`, *optional*, defaults to `True`):
        Whether or not to apply the pooling only to the query or to query, key and values for the attention layers.
    ÚfunnelÚd_modelÚn_head)Úhidden_sizeÚnum_attention_headsi:w  Ú
vocab_size)é   r   r   .Úblock_sizesNÚblock_repeatsé   Únum_decoder_layersi   é   é@   Úd_headi   Úd_innerÚgelu_newÚ
hidden_actgš™™™™™¹?Úhidden_dropoutÚattention_dropoutg        Úactivation_dropoutÚinitializer_rangeÚinitializer_stdg•Ö&è.>Úlayer_norm_epsÚmeanÚpooling_typeÚrelative_shiftÚattention_typeTÚseparate_clsÚtruncate_seqÚpool_q_onlyÚpad_token_idÚtie_word_embeddingsc                 ó�   •— | j         €dgt          | j        ¦  «        z  n| j         | _          t          ¦   «         j        di |¤Ž d S )Né   © )r   Úlenr   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €úm/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/funnel/configuration_funnel.pyr/   zFunnelConfig.__post_init__K   sQ   ø€ Ø<@Ô<NÐ<V˜a˜S¥3 tÔ'7Ñ#8Ô#8Ñ8Ð8Ð\`Ô\nˆÔØ�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'ó    c                 óü   — t          | j        ¦  «        t          | j        ¦  «        k    rt          d¦  «        ‚| j        dvrt          d| j        › d�¦  «        ‚| j        dvrt          d| j        › d�¦  «        ‚dS )zOPart of `@strict`-powered validation. Validates the architecture of the config.z>`block_sizes` and `block_repeats` should have the same length.)r!   ÚmaxzGot z< for `pooling_type` but only 'mean' and 'max' are supported.)r#   Ú
factorizedzO for `attention_type` but only 'relative_shift' and 'factorized' are supported.N)r-   r   r   Ú
ValueErrorr"   r$   ©r0   s    r3   Úvalidate_architecturez"FunnelConfig.validate_architectureO   sª   € åˆtÔÑ Ô ¥C¨Ô(:Ñ$;Ô$;Ò;Ð;ÝÐ]Ñ^Ô^Ð^ØÔð %
ð 
ð 
õ Ðs DÔ$5ÐsÐsÐsÑtÔtÐtØÔð '
ð 
ð 
õ Ø{�tÔ*Ð{Ð{Ð{ñô ð ð	
ð 
r4   c                 ó*   — t          | j        ¦  «        S ©N)Úsumr   r9   s    r3   Únum_hidden_layerszFunnelConfig.num_hidden_layers`   ó   € å�4Ô#Ñ$Ô$Ð$r4   c                 ó    — t          d¦  «        ‚)NzYThis model does not support the setting of `num_hidden_layers`. Please set `block_sizes`.©ÚNotImplementedError©r0   Úvalues     r3   r>   zFunnelConfig.num_hidden_layersd   s   € å!Øgñ
ô 
ð 	
r4   c                 ó*   — t          | j        ¦  «        S r<   )r-   r   r9   s    r3   Ú
num_blockszFunnelConfig.num_blocksj   r?   r4   c                 ó    — t          d¦  «        ‚)NzRThis model does not support the setting of `num_blocks`. Please set `block_sizes`.rA   rC   s     r3   rF   zFunnelConfig.num_blocksn   s   € å!Ð"vÑwÔwÐwr4   )*Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚattribute_mapr   ÚintÚ__annotations__r   ÚlistÚtupler   r   r   r   r   r   r   Ústrr   Úfloatr   r   r   r   r    r"   r$   r%   Úboolr&   r'   r(   r)   r/   r:   Úpropertyr>   ÚsetterrF   Ú__classcell__)r2   s   @r3   r	   r	      s|  ø€ € € € € € ðð ð* €Jà Ø'ðð €Mð
 €J�ÐÐÑØ/8€K��c”˜U 3¨ 8œ_Ñ,Ð8Ð8Ñ8Ø&*€M�4˜”9˜tÑ#Ð*Ð*Ñ*ØÐ˜ÐÐÑØ€GˆSÐÐÑØ€FˆCÐÐÑØ€FˆCÐÐÑØ€GˆSÐÐÑØ €J�Ð Ð Ñ Ø"%€N�E˜C‘KÐ%Ð%Ñ%Ø%(Ð�u˜s‘{Ð(Ð(Ñ(Ø&)Ð˜ ™Ð)Ð)Ñ)Ø"Ð�uÐ"Ð"Ñ"Ø$(€O�U˜T‘\Ð(Ð(Ñ(Ø €N�EÐ Ð Ñ Ø€L�#ÐÐÑØ*€N�CÐ*Ð*Ñ*Ø€L�$ÐÐÑØ€L�$ÐÐÑØ€K�ÐÐÑØ#€L�#˜‘*Ð#Ð#Ñ#Ø $Ð˜Ð$Ð$Ñ$ð(ð (ð (ð (ð (ðð ð ð" ð%ð %ñ „Xð%ð Ôð
ð 
ñ Ôð
ð
 ð%ð %ñ „Xð%ð Ôðxð xñ Ôðxð xð xð xð xr4   r	   N)	rK   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r,   r4   r3   ú<module>r\      s²   ðð -Ð ,à .Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø #Ð #Ð #Ð #Ð #Ð #ð €Ð5Ð6Ñ6Ô6ØðXxð Xxð Xxð Xxð XxÐ#ñ Xxô Xxñ „ñ 7Ô6ðXxðv Ð
€€€r4   