
    ^j                         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y)    )strict   )PreTrainedConfig)auto_docstringloggingzgoogle/videoprism-base-f16r288)
checkpointc                   T   e Zd ZU dZdZdZeee   z  eeef   z  e	d<   dZ
ee	d<   dZee   eedf   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z  e	d<   dZee	d<   dZee	d<   dZee	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%<   y&)'VideoPrismVisionConfiga  
    num_frames (`int`, *optional*, defaults to 16):
        The number of frames in the input video.
    tubelet_size (`List[int]`, *optional*, defaults to `[1, 18, 18]`):
        The size of the tubelet patch.
    num_spatial_layers (`int`, *optional*, defaults to 12):
        Number of spatial transformer blocks.
    num_temporal_layers (`int`, *optional*, defaults to 4):
        Number of temporal transformer blocks.
    attn_logit_softcapping (`float`, *optional*, defaults to 50.0):
        Softcapping constant for attention logits.
    num_auxiliary_layers (`int`, *optional*, defaults to 2):
        Number of auxiliary layers. This is used in the VideoPrismVideoModel that is a part of VideoPrismClipModel.
    apply_l2norm (`bool`, *optional*, defaults to `True`):
        Whether to apply L2 normalization to the output. This is used in the VideoPrismVideoModel that is a part of VideoPrismClipModel.
    videoprism_vision_modeli   
image_size   
num_frames)      r   .tubelet_sizer   num_channels   hidden_size   num_attention_heads   intermediate_sizegelu_python
hidden_act        hidden_dropout_probattention_probs_dropout_prob{Gz?initializer_rangeư>layer_norm_epsTqkv_biasvision_confignum_spatial_layers   num_temporal_layers      I@attn_logit_softcapping   num_auxiliary_layersapply_l2normN)__name__
__module____qualname____doc__
model_typer   intlisttuple__annotations__r   r   r   r   r   r   r   strr   floatr   r   r!   r"   boolbase_config_keyr$   r&   r(   r*   r+        /var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/videoprism/configuration_videoprism.pyr
   r
      s    " +J47Jd3i%S/17J0;L$s)eCHo-;L#K!!!s!#J#'**03 %#+3#u#!NE!Hd%O    $(E( !#!L$r:   r
   z"google/videoprism-lvt-base-f16r288c                   ,   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dz  ed<   dZedz  ed<   dZeee   z  d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d<   d Zeed!<   y)"VideoPrismTextConfiga	  
    apply_l2norm (`bool`, *optional*, defaults to `True`):
        Whether to apply L2 normalization to the output of VideoPrismTextEncoder.
    attn_logit_softcapping (`float`, *optional*, defaults to 50.0):
        Softcapping constant for attention logits.
    videoprism_text_modeltext_configi }  
vocab_sizer   r   r   r   r   num_hidden_layersr   @   max_position_embeddingsrelur   r    r!   r   Npad_token_idbos_token_ideos_token_idr   r   Tr+   r"   r   r   r   r'   r(   )r,   r-   r.   r/   r0   r8   r@   r1   r4   r   r   rA   r   rC   r   r5   r!   r6   rE   rF   rG   r2   r   r+   r7   r"   r   r   r(   r9   r:   r;   r=   r=   I   s     )J#OJK!s!s!!#%S%J NE  L#* #L#*#+/L#S	/D(/03 %#+3L$Hd!$$#u#$(E(r:   r=   c                   f     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<    fdZ xZS )VideoPrismConfiga  
    Example:

    ```python
    >>> from transformers import VideoPrismClipModel, VideoPrismConfig

    >>> # Initializing a VideoPrismConfig with default values
    >>> configuration = VideoPrismConfig()

    >>> # Initializing a VideoPrismClipModel with the configuration
    >>> model = VideoPrismClipModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
    
videoprism)r?   r#   Nr?   r#   c                    | j                   %t               | _         t        j                  d       n4t	        | j                   t
              rt        di | j                   | _         | j                  %t               | _        t        j                  d       n4t	        | j                  t
              rt        di | j                  | _        t        | $  di | y )NzU`text_config` is `None`. Initializing the `VideoPrismTextConfig` with default values.zY`vision_config` is `None`. initializing the `VideoPrismVisionConfig` with default values.r9   )
r?   r=   loggerinfo
isinstancedictr#   r
   super__post_init__)selfkwargs	__class__s     r;   rQ   zVideoPrismConfig.__post_init__   s    #35DKKop(($/3Gd6F6FGD%!7!9DKKst**D1!7!M$:L:L!MD''r:   )r,   r-   r.   r/   r0   r=   r
   sub_configsr?   rO   r   r4   r#   rQ   __classcell__)rT   s   @r;   rI   rI   j   sN    " J"6I_`K26K((4/648M4**T18( (r:   rI   )r
   r=   rI   N)huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   
get_loggerr,   rL   r
   r=   rI   __all__r9   r:   r;   <module>r\      s   , / 3 , 
		H	% ;<%- %  =%P ?@)+ )  A)> ?@%(' %(  A%(P Qr:   