§
    ‚Štj9  ã                   ó’   — d Z ddlmZ ddlmZ ddlmZ ddlmZ  ed¬¦  «        e G d	„ d
ee¦  «        ¦   «         ¦   «         Z	d
gZ
dS )zDINOv2 model configurationé    )Ústricté   )ÚBackboneConfigMixin)ÚPreTrainedConfig)Úauto_docstringzfacebook/dinov2-base)Ú
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z  ed<   dZeez  ed<   dZe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d<   d Zee         d z  ed!<   d Zee         d z  ed"<   dZeed#<   dZeed$<   dZ eed%<   ˆ fd&„Z!ˆ xZ"S )'ÚDinov2Configaç  
    layerscale_value (`float`, *optional*, defaults to 1.0):
        Initial value to use for layer scale.
    use_swiglu_ffn (`bool`, *optional*, defaults to `False`):
        Whether to use the SwiGLU feedforward neural network.
    apply_layernorm (`bool`, *optional*, defaults to `True`):
        Whether to apply layer normalization to the feature maps in case the model is used as backbone.
    reshape_hidden_states (`bool`, *optional*, defaults to `True`):
        Whether to reshape the feature maps to 4D tensors of shape `(batch_size, hidden_size, height, width)` in
        case the model is used as backbone. If `False`, the feature maps will be 3D tensors of shape `(batch_size,
        seq_len, hidden_size)`.
    use_mask_token (`bool`, *optional*, defaults to `True`):
        Whether to use mask_token in embeddings.

    Example:

    ```python
    >>> from transformers import Dinov2Config, Dinov2Model

    >>> # Initializing a Dinov2 dinov2-base style configuration
    >>> configuration = Dinov2Config()

    >>> # Initializing a model (with random weights) from the dinov2-base style configuration
    >>> model = Dinov2Model(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Údinov2i   Úhidden_sizeé   Únum_hidden_layersÚnum_attention_headsé   Ú	mlp_ratioÚgeluÚ
hidden_actg        Úhidden_dropout_probÚattention_probs_dropout_probg{®Gáz”?Úinitializer_rangeg�íµ ÷Æ°>Úlayer_norm_epséà   Ú
image_sizeé   Ú
patch_sizer   Únum_channelsTÚqkv_biasg      ð?Úlayerscale_valueÚdrop_path_rateFÚuse_swiglu_ffnNÚ_out_featuresÚ_out_indicesÚapply_layernormÚreshape_hidden_statesÚuse_mask_tokenc                 ó  •— dgd„ t          d| j        dz   ¦  «        D ¦   «         z   | _        |                      |                     dd ¦  «        |                     dd ¦  «        ¬¦  «          t          ¦   «         j        di |¤Ž d S )NÚstemc                 ó   — g | ]}d |› �‘ŒS )Ústage© )Ú.0Úidxs     úm/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/dinov2/configuration_dinov2.pyú
<listcomp>z.Dinov2Config.__post_init__.<locals>.<listcomp>P   s   € Ð&eÐ&eÐ&e¸ }¨s } }Ð&eÐ&eÐ&eó    é   Úout_indicesÚout_features)r1   r2   r*   )Úranger   Ústage_namesÚ"set_output_features_output_indicesÚpopÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €r-   r8   zDinov2Config.__post_init__O   s™   ø€ Ø"˜8Ð&eÐ&eÅÀaÈÔI_ÐbcÑIcÑ@dÔ@dÐ&eÑ&eÔ&eÑeˆÔØ×/Ò/ØŸ
š
 =°$Ñ7Ô7ÀfÇjÂjÐQ_ÐaeÑFfÔFfð 	0ñ 	
ô 	
ð 	
ð 	�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'r/   )#Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   ÚintÚ__annotations__r   r   r   r   Ústrr   Úfloatr   r   r   r   ÚlistÚtupler   r   r   Úboolr   r   r    r!   r"   r#   r$   r%   r8   Ú__classcell__)r;   s   @r-   r
   r
      sê  ø€ € € € € € ðð ð: €Jà€K�ÐÐÑØÐ�sÐÐÑØ!Ð˜Ð!Ð!Ñ!Ø€IˆsÐÐÑØ€J�ÐÐÑØ'*Ð˜ ™Ð*Ð*Ñ*Ø03Ð  %¨#¡+Ð3Ð3Ñ3Ø#Ð�uÐ#Ð#Ñ#Ø €N�EÐ Ð Ñ Ø47€J��d˜3”i‘ %¨¨S¨¤/Ñ1Ð7Ð7Ñ7Ø46€J��d˜3”i‘ %¨¨S¨¤/Ñ1Ð6Ð6Ñ6Ø€L�#ÐÐÑØ€HˆdÐÐÑØ!Ð�eÐ!Ð!Ñ!Ø"%€N�E˜C‘KÐ%Ð%Ñ%Ø €N�DÐ Ð Ñ Ø&*€M�4˜”9˜tÑ#Ð*Ð*Ñ*Ø%)€L�$�s”)˜dÑ"Ð)Ð)Ñ)Ø €O�TÐ Ð Ñ Ø"&Ð˜4Ð&Ð&Ñ&Ø€N�DÐÐÑð(ð (ð (ð (ð (ð (ð (ð (ð (r/   r
   N)r?   Úhuggingface_hub.dataclassesr   Úbackbone_utilsr   Úconfiguration_utilsr   Úutilsr   r
   Ú__all__r*   r/   r-   ú<module>rN      s·   ðð !Ð  à .Ð .Ð .Ð .Ð .Ð .à 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø #Ð #Ð #Ð #Ð #Ð #ð €Ð1Ð2Ñ2Ô2Øð;(ð ;(ð ;(ð ;(ð ;(Ð&Ð(8ñ ;(ô ;(ñ „ñ 3Ô2ð;(ð| Ð
€€€r/   