ó
    ‡Ž¡j  ã                   ód   • S r SSKJr  SSKJr  SSKJr  \" SS9\ " S S	\5      5       5       rS	/rg
)z&Funnel Transformer model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringzfunnel-transformer/small)Ú
checkpointc                   ó  ^ • \ rS rSr% SrSrSSS.rSr\\	S'   S	r
\\   \\S
4   -  \	S'   Sr\\   S-  \	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'   Sr\\	S '   S!r\\	S"'   S#r\\	S$'   S%r\\	S&'   S%r \\	S''   S%r!\\	S('   Sr"\S-  \	S)'   S%r#\\	S*'   U 4S+ jr$S, r%\&S- 5       r'\'RP                  S. 5       r'\&S/ 5       r)\)RP                  S0 5       r)S1r*U =r+$ )2ÚFunnelConfigé   aÐ  
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                 ó”   >• U R                   c  S/[        U R                  5      -  OU R                   U l         [        TU ]  " S0 UD6  g )Né   © )r   Úlenr   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €Ú½C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\transformers/models/funnel/configuration_funnel.pyr0   ÚFunnelConfig.__post_init__K   sA   ø€ Ø<@×<NÑ<NÑ<V˜a˜S¤3 t×'7Ñ'7Ó#8Ò8Ð\`×\nÑ\nˆÔÜ‰ÒÑ' Ó'ó    c                 ó  • [        U R                  5      [        U R                  5      :w  a  [        S5      eU R                  S;  a  [        SU R                   S35      eU R
                  S;  a  [        SU R
                   S35      eg)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%   ©r1   s    r4   Úvalidate_architectureÚ"FunnelConfig.validate_architectureO   s˜   € äˆt×ÑÓ ¤C¨×(:Ñ(:Ó$;Ó;ÜÐ]Ó^Ð^Ø×Ñð %
ó 
ô ˜t D×$5Ñ$5Ð#6Ð6rÐsÓtÐtØ×Ñð '
ó 
ô Ø�t×*Ñ*Ð+Ð+zÐ{óð ð	
r6   c                 ó,   • [        U R                  5      $ ©N)Úsumr   r;   s    r4   Únum_hidden_layersÚFunnelConfig.num_hidden_layers`   ó   € ä�4×#Ñ#Ó$Ð$r6   c                 ó   • [        S5      e)NzYThis model does not support the setting of `num_hidden_layers`. Please set `block_sizes`.©ÚNotImplementedError©r1   Úvalues     r4   rA   rB   d   s   € ä!Øgó
ð 	
r6   c                 ó,   • [        U R                  5      $ r?   )r.   r   r;   s    r4   Ú
num_blocksÚFunnelConfig.num_blocksj   rC   r6   c                 ó   • [        S5      e)NzRThis model does not support the setting of `num_blocks`. Please set `block_sizes`.rE   rG   s     r4   rJ   rK   n   s   € ä!Ð"vÓwÐwr6   )r   ),Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__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*   r0   r<   ÚpropertyrA   ÚsetterrJ   Ú__static_attributes__Ú__classcell__)r3   s   @r4   r	   r	      s•  ø‡ ñð* €Jà Ø'ñ€Mð
 €J�ÓØ/8€K��c‘˜U 3¨ 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r6   r	   N)	rQ   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r-   r6   r4   Ú<module>rc      sN   ðñ -å .å 3Ý #ñ Ð5Ñ6ØôXxÐ#ó Xxó ó 7ðXxðv Ð
�r6   