§
    ‚Štj¶&  ã                   óJ  — d Z ddlmZ ddlmZ ddlmZmZ  ej        e	¦  «        Z
 ed¬¦  «        e G d„ d	e¦  «        ¦   «         ¦   «         Z ed¬¦  «        e G d
„ de¦  «        ¦   «         ¦   «         Z ed¬¦  «        e G d„ de¦  «        ¦   «         ¦   «         Zg d¢ZdS )zGroupViT model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringÚloggingznvidia/groupvit-gcc-yfcc)Ú
checkpointc                   ó  — e Zd ZU dZ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z  ed<   dZeez  ed<   dZeed<   dZeed<   dZedz  ed<   dZedz  ed<   d Zeee         z  dz  ed!<   dS )"ÚGroupViTTextConfigaz  
    Example:

    ```python
    >>> from transformers import GroupViTTextConfig, GroupViTTextModel

    >>> # Initializing a GroupViTTextModel with nvidia/groupvit-gcc-yfcc style configuration
    >>> configuration = GroupViTTextConfig()

    >>> model = GroupViTTextModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úgroupvit_text_modelÚtext_configi Á  Ú
vocab_sizeé   Úhidden_sizei   Úintermediate_sizeé   Únum_hidden_layersé   Únum_attention_headséM   Úmax_position_embeddingsÚ
quick_geluÚ
hidden_actçñhãˆµøä>Úlayer_norm_epsç        ÚdropoutÚattention_dropoutç{®Gáz”?Úinitializer_rangeç      ð?Úinitializer_factoré   NÚpad_token_idiþÀ  Úbos_token_idiÿÀ  Úeos_token_id)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚbase_config_keyr   ÚintÚ__annotations__r   r   r   r   r   r   Ústrr   Úfloatr   r   r   r!   r#   r$   r%   Úlist© ó    úq/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/groupvit/configuration_groupvit.pyr
   r
      s<  € € € € € € ðð ð '€JØ#€Oà€J�ÐÐÑØ€K�ÐÐÑØ!Ð�sÐ!Ð!Ñ!ØÐ�sÐÐÑØ Ð˜Ð Ð Ñ Ø#%Ð˜SÐ%Ð%Ñ%Ø"€J�Ð"Ð"Ñ"Ø €N�EÐ Ð Ñ Ø€GˆU�S‰[ÐÐÑØ%(Ð�u˜s‘{Ð(Ð(Ñ(Ø#Ð�uÐ#Ð#Ñ#Ø #Ð˜Ð#Ð#Ñ#Ø €L�#˜‘*Ð Ð Ñ Ø$€L�#˜‘*Ð$Ð$Ñ$Ø+0€L�#˜˜Sœ	‘/ DÑ(Ð0Ð0Ñ0Ð0Ð0r2   r
   c                   ó  — e Zd ZU dZdZdZdZeed<   dZ	eed<   dZ
eed	<   d
Zee         eedf         z  ed<   dZee         eedf         z  ed<   dZee         eedf         z  ed<   dZeed<   dZeee         z  eeef         z  ed<   dZeee         z  eeef         z  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d!<   d"Zeed#<   d"Zeed$<   d%Zeeez           eeez  df         z  ed&<   d'„ Zd(S ))ÚGroupViTVisionConfigaÛ  
    depths (`list[int]`, *optional*, defaults to [6, 3, 3]):
        The number of layers in each encoder block.
    num_group_tokens (`list[int]`, *optional*, defaults to [64, 8, 0]):
        The number of group tokens for each stage.
    num_output_groups (`list[int]`, *optional*, defaults to [64, 8, 8]):
        The number of output groups for each stage, 0 means no group.
    assign_eps (`float`, *optional*, defaults to `1.0`):
        Epsilon used in layer norm
    assign_mlp_ratio (`list[int]`, *optional*, defaults to `[0.5, 4]`):
        Ratio used to infer hidden size of MLP layers.

    Example:

    ```python
    >>> from transformers import GroupViTVisionConfig, GroupViTVisionModel

    >>> # Initializing a GroupViTVisionModel with nvidia/groupvit-gcc-yfcc style configuration
    >>> configuration = GroupViTVisionConfig()

    >>> model = GroupViTVisionModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úgroupvit_vision_modelÚvision_configi€  r   i   r   r   r   )é   r   r   .Údepths)é@   é   r   Únum_group_tokens)r:   r;   r;   Únum_output_groupsr8   r   éà   Ú
image_sizeé   Ú
patch_sizer   Únum_channelsÚgelur   r   r   r   r   r   r   r   r    r!   Ú
assign_eps)g      à?r   Úassign_mlp_ratioc                 ó²   — | j         t          | j        ¦  «        k    r9t                               d| j         › dt          | j        ¦  «        › �¦  «         dS dS )zOPart of `@strict`-powered validation. Validates the architecture of the config.z&Manually setting num_hidden_layers to z1, but we expect num_hidden_layers = sum(depth) = N)r   Úsumr9   ÚloggerÚwarning)Úselfs    r3   Úvalidate_architecturez*GroupViTVisionConfig.validate_architecturer   sm   € àÔ!¥S¨¬Ñ%5Ô%5Ò5Ð5Ý�NŠNð4¸Ô9Oð 4ð 4Ý!$ T¤[Ñ!1Ô!1ð4ð 4ñô ð ð ð ð 6Ð5r2   N)r&   r'   r(   r)   r*   r+   r   r,   r-   r   r   r9   r0   Útupler<   r=   r   r?   rA   rB   r   r.   r   r/   r   r   r   r!   rD   rE   rK   r1   r2   r3   r5   r5   ?   så  € € € € € € ðð ð4 )€JØ%€Oà€K�ÐÐÑØ!Ð�sÐ!Ð!Ñ!ØÐ�sÐÐÑØ*3€FˆD�ŒI˜˜c 3˜hœÑ'Ð3Ð3Ñ3Ø4>Ð�d˜3”i %¨¨S¨¤/Ñ1Ð>Ð>Ñ>Ø5?Ð�t˜C”y 5¨¨c¨¤?Ñ2Ð?Ð?Ñ?Ø Ð˜Ð Ð Ñ Ø47€J��d˜3”i‘ %¨¨S¨¤/Ñ1Ð7Ð7Ñ7Ø46€J��d˜3”i‘ %¨¨S¨¤/Ñ1Ð6Ð6Ñ6Ø€L�#ÐÐÑØ€J�ÐÐÑØ €N�EÐ Ð Ñ Ø€GˆU�S‰[ÐÐÑØ%(Ð�u˜s‘{Ð(Ð(Ñ(Ø#Ð�uÐ#Ð#Ñ#Ø #Ð˜Ð#Ð#Ñ#Ø€J�ÐÐÑØDLÐ�d˜5 3™;Ô'¨%°¸±¸SÐ0@Ô*AÑAÐLÐLÑLðð ð ð ð r2   r5   c                   óº   ‡ — e Zd ZU dZdZeedœZdZe	e
z  dz  ed<   dZe	e
z  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<   ˆ fd„Zˆ xZS )ÚGroupViTConfiga  
    projection_intermediate_dim (`int`, *optional*, defaults to 4096):
        Dimensionality of intermediate layer of text and vision projection layers.
    output_segmentation (`bool`, *optional*, defaults to False):
        Whether or not to return the segmentation logits.
    Úgroupvit)r   r7   Nr   r7   r   Úprojection_dimi   Úprojection_intermediate_dimgƒ/L¦
F@Úlogit_scale_init_valuer   r   r    r!   FÚoutput_segmentationc                 óô  •— | j         €i }t                               d¦  «         n;t          | j         t          ¦  «        r| j                              ¦   «         }n| j         }| j        €i }t                               d¦  «         n;t          | j        t          ¦  «        r| j                             ¦   «         }n| j        }|                     dd ¦  «        }|                     dd ¦  «        }|�‘t	          di |¤Ž                     ¦   «         }| 	                    ¦   «         D ]I\  }}||v r@|||         k    r4|dk    r.||v r
d|› d|› d�}	nd	|› d
�}	t                               |	¦  «         ŒJ| 
                    |¦  «         |�¼t          di |¤Ž                     ¦   «         }
d|
v r'd„ |
d          	                    ¦   «         D ¦   «         |
d<   |
 	                    ¦   «         D ]I\  }}||v r@|||         k    r4|dk    r.||v r
d|› d|› d�}	nd|› d
�}	t                               |	¦  «         ŒJ| 
                    |
¦  «         t	          di |¤Ž| _         t          di |¤Ž| _         t          ¦   «         j        di |¤Ž d S )NzS`text_config` is `None`. Initializing the `GroupViTTextConfig` with default values.zW`vision_config` is `None`. initializing the `GroupViTVisionConfig` with default values.Útext_config_dictÚvision_config_dictÚtransformers_versionú`zp` is found in both `text_config_dict` and `text_config` but with different values. The value `text_config_dict["z"]` will be used instead.zn`text_config_dict` is provided which will be used to initialize `GroupViTTextConfig`. The value `text_config["z"]` will be overridden.Úid2labelc                 ó4   — i | ]\  }}t          |¦  «        |“ŒS r1   )r.   )Ú.0ÚkeyÚvalues      r3   ú
<dictcomp>z0GroupViTConfig.__post_init__.<locals>.<dictcomp>Æ   s1   € ð 3ð 3ð 3Ù(2¨¨U•C˜‘H”H˜eð3ð 3ð 3r2   zv` is found in both `vision_config_dict` and `vision_config` but with different values. The value `vision_config_dict["zt`vision_config_dict` is provided which will be used to initialize `GroupViTVisionConfig`. The value `vision_config["r1   )r   rH   ÚinfoÚ
isinstancer
   Úto_dictr7   r5   ÚpopÚitemsÚupdateÚsuperÚ__post_init__)rJ   Úkwargsr   r7   rU   rV   Ú_text_config_dictr\   r]   ÚmessageÚ_vision_config_dictÚ	__class__s              €r3   rf   zGroupViTConfig.__post_init__‘   s[  ø€ ØÔÐ#ØˆKÝ�KŠKÐmÑnÔnÐnÐnÝ˜Ô(Õ*<Ñ=Ô=ð 	+ØÔ*×2Ò2Ñ4Ô4ˆKˆKàÔ*ˆKàÔÐ%ØˆMÝ�KŠKÐqÑrÔrÐrÐrÝ˜Ô*Õ,@ÑAÔAð 	/Ø Ô.×6Ò6Ñ8Ô8ˆMˆMà Ô.ˆMð "Ÿ:š:Ð&8¸$Ñ?Ô?ÐØ#ŸZšZÐ(<¸dÑCÔCÐàÐ'å 2Ð FÐ FÐ5EÐ FÐ F× NÒ NÑ PÔ PÐð 0×5Ò5Ñ7Ô7ð )ð )‘
��UØ˜+Ð%Ð%¨%°;¸sÔ3CÒ*CÐ*CÈÐOeÒHeÐHeàÐ.Ð.Ð.ð[ ð [ð [Ø<?ð[ð [ð [ð  ˜ðPØ36ðPð Pð Pð  õ —K’K Ñ(Ô(Ð(øð ×ÒÐ0Ñ1Ô1Ð1àÐ)å"6Ð"LÐ"LÐ9KÐ"LÐ"L×"TÒ"TÑ"VÔ"VÐàÐ0Ð0Ð0ð3ð 3Ø6IÈ*Ô6U×6[Ò6[Ñ6]Ô6]ð3ñ 3ô 3Ð# JÑ/ð
 2×7Ò7Ñ9Ô9ð )ð )‘
��UØ˜-Ð'Ð'¨E°]À3Ô5GÒ,GÐ,GÈCÐSiÒLiÐLiàÐ0Ð0Ð0ðe ð eð eØFIðeð eð eð  ˜ðVØ9<ðVð Vð Vð  õ —K’K Ñ(Ô(Ð(øð × Ò Ð!4Ñ5Ô5Ð5õ .Ð<Ð<°Ð<Ð<ˆÔÝ1ÐBÐB°MÐBÐBˆÔà�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'r2   )r&   r'   r(   r)   r*   r
   r5   Úsub_configsr   Údictr   r-   r7   rP   r,   rQ   rR   r/   r   r!   rS   Úboolrf   Ú__classcell__)rk   s   @r3   rN   rN   {   sý   ø€ € € € € € ðð ð €JØ"4ÐG[Ð\Ð\€Kà26€K�Ð(Ñ(¨4Ñ/Ð6Ð6Ñ6Ø48€M�4Ð*Ñ*¨TÑ1Ð8Ð8Ñ8Ø€N�CÐÐÑØ'+Ð Ð+Ð+Ñ+Ø$*Ð˜EÐ*Ð*Ñ*Ø#Ð�uÐ#Ð#Ñ#Ø #Ð˜Ð#Ð#Ñ#Ø %Ð˜Ð%Ð%Ñ%ðQ(ð Q(ð Q(ð Q(ð Q(ð Q(ð Q(ð Q(ð Q(r2   rN   )rN   r
   r5   N)r)   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   Ú
get_loggerr&   rH   r
   r5   rN   Ú__all__r1   r2   r3   ú<module>ru      sj  ðð #Ð "à .Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,ð 
ˆÔ	˜HÑ	%Ô	%€ð €Ð5Ð6Ñ6Ô6Øð!1ð !1ð !1ð !1ð !1Ð)ñ !1ô !1ñ „ñ 7Ô6ð!1ðH €Ð5Ð6Ñ6Ô6Øð7ð 7ð 7ð 7ð 7Ð+ñ 7ô 7ñ „ñ 7Ô6ð7ðt €Ð5Ð6Ñ6Ô6Øðe(ð e(ð e(ð e(ð e(Ð%ñ e(ô e(ñ „ñ 7Ô6ðe(ðP KÐ
JÐ
J€€€r2   