§
    ‚Š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LongT5 model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringzgoogle/long-t5-local-base)Ú
checkpointc                   ó´  ‡ — e Zd ZU dZdZdgZdddddœ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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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 e         z  dz  e	d+<   dZ!edz  e	d,<   d-Z"ee	d.<   d#Z#ee	d/<   ˆ fd0„Z$d1„ Z%ˆ xZ&S )2ÚLongT5Configa!  
    d_ff (`int`, *optional*, defaults to 2048):
        Size of the intermediate feed forward layer in each `LongT5Block`.
    local_radius (`int`, *optional*, defaults to 127):
        Number of tokens to the left/right for each token to locally self-attend in a local attention mechanism.
    global_block_size (`int`, *optional*, defaults to 16):
        Length of blocks an input sequence is divided into for a global token representation. Used only for
        `encoder_attention_type = "transient-global"`.
    relative_attention_num_buckets (`int`, *optional*, defaults to 32):
        The number of buckets to use for each attention layer.
    relative_attention_max_distance (`int`, *optional*, defaults to 128):
        The maximum distance of the longer sequences for the bucket separation.
    feed_forward_proj (`string`, *optional*, defaults to `"relu"`):
        Type of feed forward layer to be used. Should be one of `"relu"` or `"gated-gelu"`. LongT5v1.1 uses the
        `"gated-gelu"` feed forward projection. Original LongT5 implementation uses `"gated-gelu"`.
    encoder_attention_type (`string`, *optional*, defaults to `"local"`):
        Type of encoder attention to be used. Should be one of `"local"` or `"transient-global"`, which are
        supported by LongT5 implementation.
    Úlongt5Úpast_key_valuesÚd_modelÚ	num_headsÚ
num_layersÚd_kv)Úhidden_sizeÚnum_attention_headsÚnum_hidden_layersÚhead_dimi€}  Ú
vocab_sizei   é@   i   Úd_ffé   NÚnum_decoder_layersé   é   Úlocal_radiusé   Úglobal_block_sizeé    Úrelative_attention_num_bucketsé€   Úrelative_attention_max_distancegš™™™™™¹?Údropout_rateg�íµ ÷Æ°>Úlayer_norm_epsilong      ð?Úinitializer_factorÚreluÚfeed_forward_projTÚis_encoder_decoderÚlocalÚencoder_attention_typeÚ	use_cacher   Úpad_token_idé   Úeos_token_idÚbos_token_idFÚ
is_decoderÚtie_word_embeddingsc                 ó  •— | j         �| j         n| j        | _         | j                             d¦  «        }|d         | _        |d         dk    | _        | j        dk    rd| _         t          ¦   «         j        di |¤Ž d S )Nú-éÿÿÿÿr   Úgatedz
gated-geluÚgelu_new© )r   r   r&   ÚsplitÚdense_act_fnÚis_gated_actÚsuperÚ__post_init__)ÚselfÚkwargsÚact_infoÚ	__class__s      €úm/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/longt5/configuration_longt5.pyr;   zLongT5Config.__post_init__N   s‹   ø€ Ø=AÔ=TÐ=` $Ô"9Ð"9ÐfjÔfuˆÔØÔ)×/Ò/°Ñ4Ô4ˆØ$ RœLˆÔØ$ QœK¨7Ò2ˆÔàÔ! \Ò1Ð1Ø *ˆDÔà�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'ó    c                 óÎ   — | j                              d¦  «        }t          |¦  «        dk    r|d         dk    st          |¦  «        dk    rt          d| j         › d�¦  «        ‚dS )	zOPart of `@strict`-powered validation. Validates the architecture of the config.r2   r,   r   r4   é   z`feed_forward_proj`: z© is not a valid activation function of the dense layer. Please make sure `feed_forward_proj` is of the format `gated-{ACT_FN}` or `{ACT_FN}`, e.g. 'gated-gelu' or 'relu'N)r&   r7   ÚlenÚ
ValueError)r<   r>   s     r@   Úvalidate_architecturez"LongT5Config.validate_architectureY   s{   € àÔ)×/Ò/°Ñ4Ô4ˆÝˆx‰=Œ=˜1ÒÐ ¨!¤°Ò!7Ð!7½3¸x¹=¼=È1Ò;LÐ;LÝð)¨Ô(>ð )ð )ð )ñô ð ð <MÐ;LrA   )'Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚattribute_mapr   ÚintÚ__annotations__r   r   r   r   r   r   r   r   r   r!   r"   Úfloatr#   r$   r&   Ústrr'   Úboolr)   r*   r+   r-   Úlistr.   r/   r0   r;   rF   Ú__classcell__)r?   s   @r@   r	   r	      s  ø€ € € € € € ðð ð( €JØ#4Ð"5Ðà Ø*Ø)Øð	ð €Mð €J�ÐÐÑØ€GˆSÐÐÑØ€Dˆ#€N€N�NØ€Dˆ#ÐÐÑØ€J�ÐÐÑØ%)Ð˜˜d™
Ð)Ð)Ñ)Ø€IˆsÐÐÑØ€L�#ÐÐÑØÐ�sÐÐÑØ*,Ð" CÐ,Ð,Ñ,Ø+.Ð# SÐ.Ð.Ñ.Ø #€L�%˜#‘+Ð#Ð#Ñ#Ø $Ð˜Ð$Ð$Ñ$Ø #Ð˜Ð#Ð#Ñ#Ø#Ð�sÐ#Ð#Ñ#Ø#Ð˜Ð#Ð#Ñ#Ø")Ð˜CÐ)Ð)Ñ)Ø€IˆtÐÐÑØ €L�#˜‘*Ð Ð Ñ Ø+,€L�#˜˜Sœ	‘/ DÑ(Ð,Ð,Ñ,Ø#€L�#˜‘*Ð#Ð#Ñ#Ø€J�ÐÐÑØ $Ð˜Ð$Ð$Ñ$ð	(ð 	(ð 	(ð 	(ð 	(ðð ð ð ð ð ð rA   r	   N)	rJ   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r6   rA   r@   ú<module>rY      sª   ðð !Ð  à .Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø #Ð #Ð #Ð #Ð #Ð #ð €Ð6Ð7Ñ7Ô7ØðIð Ið Ið Ið IÐ#ñ Iô Iñ „ñ 8Ô7ðIðX Ð
€€€rA   