§
    ‚Štj1  ã                   ó”   — d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 dgZ
 e	d¬	¦  «        e G d
„ de¦  «        ¦   «         ¦   «         ZdS )z#RADIO vision encoder configuration.é    )Ústricté   )ÚPreTrainedConfig)ÚOPENAI_CLIP_MEANÚOPENAI_CLIP_STD)Úauto_docstringÚRadioConfigznvidia/C-RADIOv4-H)Ú
checkpointc                   óö  ‡ — e Zd ZU dZ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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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#z  ed$<    ee¦  «        Z ee         eeeef         z  ed%<    ee!¦  «        Z"ee         eeeef         z  ed&<   d'Z#eed(<   ˆ fd)„Z$e%d*efd+„¦   «         Z&ˆ xZ'S ),r	   aÈ  
    mlp_ratio (`float`, *optional*, defaults to 4.0):
        Ratio of the hidden size of the MLP relative to `hidden_size`.
    use_swiglu_ffn (`bool`, *optional*, defaults to `False`):
        Whether to use a SwiGLU feed-forward network in the encoder layers instead of the standard MLP.
    layerscale_value (`float`, *optional*, defaults to 1.0):
        Initial value for the LayerScale parameters. C-RADIO has no LayerScale; the default of `1.0` makes the
        (inherited) LayerScale an identity operation.
    max_img_size (`int`, *optional*, defaults to 2048):
        Maximum supported image size (in pixels) used to size the position embedding table of the CPE patch generator.
    num_cls_tokens (`int`, *optional*, defaults to 3):
        Number of learned class (summary) tokens prepended to the patch sequence.
    num_registers (`int`, *optional*, defaults to 7):
        Number of learned register tokens prepended to the patch sequence.
    summary_idxs (`list[int]`, *optional*, defaults to `[0, 1]`):
        Indices of the class tokens to gather and flatten into the `summary` output embedding.
    norm_mean (`tuple[float, float, float]`, *optional*, defaults to `OPENAI_CLIP_MEAN`):
        Per-channel mean used by the input conditioner to normalize pixel values.
    norm_std (`tuple[float, float, float]`, *optional*, defaults to `OPENAI_CLIP_STD`):
        Per-channel standard deviation used by the input conditioner to normalize pixel values.
    Úradioi   Úhidden_sizeé    Únum_hidden_layersé   Únum_attention_headsg      @Ú	mlp_ratioÚgeluÚ
hidden_actg�íµ ÷Æ°>Úlayer_norm_epsg        Úattention_probs_dropout_probÚhidden_dropout_probÚdrop_path_rateFÚuse_swiglu_ffnTÚqkv_biasg      ð?Úlayerscale_valuer   Únum_channelsÚ
patch_sizeéà   Ú
image_sizei   Úmax_img_sizeÚnum_cls_tokensé   Únum_registersNÚsummary_idxsÚ	norm_meanÚnorm_stdg{®Gáz”?Úinitializer_rangec                 ó¾   •— | j         €	ddg| _         t          | j        ¦  «        | _        t          | j        ¦  «        | _         t	          ¦   «         j        di |¤Ž d S )Nr   é   © )r$   Úlistr%   r&   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €úk/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/radio/configuration_radio.pyr-   zRadioConfig.__post_init__P   s]   ø€ ØÔÐ$Ø!" A ˆDÔÝ˜dœnÑ-Ô-ˆŒÝ˜Tœ]Ñ+Ô+ˆŒØ�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'ó    Úreturnc                 ó    — | j         | j        z   S )zJNumber of skipped prefix tokens (cls + registers) before spatial features.)r!   r#   )r.   s    r1   Únum_summary_tokenszRadioConfig.num_summary_tokensW   s   € ð Ô" TÔ%7Ñ7Ð7r2   )(Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   ÚintÚ__annotations__r   r   r   Úfloatr   Ústrr   r   r   r   r   Úboolr   r   r   r   r   r    r!   r#   r$   r+   Útupler   r%   r   r&   r'   r-   Úpropertyr5   Ú__classcell__)r0   s   @r1   r	   r	      s   ø€ € € € € € ðð ð, €Jà€K�ÐÐÑØÐ�sÐÐÑØ!Ð˜Ð!Ð!Ñ!Ø€IˆuÐÐÑØ€J�ÐÐÑØ €N�EÐ Ð Ñ Ø*-Ð  %Ð-Ð-Ñ-Ø!$Ð˜Ð$Ð$Ñ$Ø€N�EÐÐÑØ €N�DÐ Ð Ñ Ø€HˆdÐÐÑà!Ð�eÐ!Ð!Ñ!à€L�#ÐÐÑØ€J�ÐÐÑØ€J�ÐÐÑà€L�#ÐÐÑØ€N�CÐÐÑØ€M�3ÐÐÑØ%)€L�$�s”)˜dÑ"Ð)Ð)Ñ)à:?¸%Ð@PÑ:QÔ:Q€Iˆt�EŒ{˜U 5¨%°Ð#6Ô7Ñ7ÐQÐQÑQØ9>¸¸Ñ9OÔ9O€Hˆd�5Œk˜E %¨°Ð"5Ô6Ñ6ÐOÐOÑOØ#Ð�uÐ#Ð#Ñ#ð(ð (ð (ð (ð (ð ð8 Cð 8ð 8ð 8ñ „Xð8ð 8ð 8ð 8ð 8r2   N)r9   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úimage_utilsr   r   Úutilsr   Ú__all__r	   r*   r2   r1   ú<module>rH      s¾   ðð *Ð )à .Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ø #Ð #Ð #Ð #Ð #Ð #ð ˆ/€ð €Ð/Ð0Ñ0Ô0Øð>8ð >8ð >8ð >8ð >8Ð"ñ >8ô >8ñ „ñ 1Ô0ð>8ð >8ð >8r2   