Ë
    ÜÓ^j1  ã                   óz   — 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y)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	        ‰| �  di |¤Ž y )Nr   é   © )r$   Úlistr%   r&   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €úx/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/radio/configuration_radio.pyr-   zRadioConfig.__post_init__P   sK   ø€ Ø×ÑÐ$Ø!" A ˆDÔÜ˜dŸn™nÓ-ˆŒÜ˜TŸ]™]Ó+ˆŒÜ‰ÑÑ' Ó'ó    Úreturnc                 ó4   — | 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Ñ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	      sO  ø… ñð, €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€Iˆt�E‰{˜U 5¨%°Ð#6Ñ7Ñ7ÓQÙ9>¸Ó9O€Hˆd�5‰k˜E %¨°Ð"5Ñ6Ñ6ÓOØ#Ð�uÓ#ô(ð ð8 Cò 8ó ô8r2   N)r9   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úimage_utilsr   r   Úutilsr   Ú__all__r	   r*   r2   r1   ú<module>rH      sI   ðñ *å .å 3ß <Ý #ð ˆ/€ñ Ð/Ô0Øô>8Ð"ó >8ó ó 1ñ>8r2   