§
    ‚Štj­   ã                   ób  — d dl mZ ddlmZ ddlmZ ddlmZ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 )é    )Ústricté   )ÚPreTrainedConfig)Ú!MODEL_FOR_CAUSAL_LM_MAPPING_NAMES)Úauto_docstringÚloggingé   )ÚCONFIG_MAPPINGÚ
AutoConfigz"Salesforce/instructblip-flan-t5-xl)Ú
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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z  ed<   dZeed<   dZeed<   dS )ÚInstructBlipVideoVisionConfigaH  
    Example:

    ```python
    >>> from transformers import InstructBlipVideoVisionConfig, InstructBlipVideoVisionModel

    >>> # Initializing a InstructBlipVideoVisionConfig with Salesforce/instructblip-flan-t5-xl style configuration
    >>> configuration = InstructBlipVideoVisionConfig()

    >>> # Initializing a InstructBlipVideoVisionModel (with random weights) from the Salesforce/instructblip-flan-t5-xl style configuration
    >>> model = InstructBlipVideoVisionModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úinstructblipvideo_vision_modelÚvision_configé€  Úhidden_sizei   Úintermediate_sizeé'   Únum_hidden_layersé   Únum_attention_headséà   Ú
image_sizeé   Ú
patch_sizeÚgeluÚ
hidden_actg�íµ ÷Æ°>Úlayer_norm_epsg        Úattention_dropoutg»½×Ùß|Û=Úinitializer_rangeTÚqkv_biasN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚbase_config_keyr   ÚintÚ__annotations__r   r   r   r   ÚlistÚtupler   r   Ústrr   Úfloatr   r    r!   Úbool© ó    úƒ/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/instructblipvideo/configuration_instructblipvideo.pyr   r   !   s  € € € € € € ðð ð  2€JØ%€Oà€K�ÐÐÑØ!Ð�sÐ!Ð!Ñ!ØÐ�sÐÐÑØ!Ð˜Ð!Ð!Ñ!Ø47€J��d˜3”i‘ %¨¨S¨¤/Ñ1Ð7Ð7Ñ7Ø46€J��d˜3”i‘ %¨¨S¨¤/Ñ1Ð6Ð6Ñ6Ø€J�ÐÐÑØ €N�EÐ Ð Ñ Ø%(Ð�u˜s‘{Ð(Ð(Ñ(Ø$Ð�uÐ$Ð$Ñ$Ø€HˆdÐÐÑÐÐr0   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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dz  ed<   dZeed<   dZeed<   dS )ÚInstructBlipVideoQFormerConfiga3  
    cross_attention_frequency (`int`, *optional*, defaults to 2):
        The frequency of adding cross-attention to the Transformer layers.
    encoder_hidden_size (`int`, *optional*, defaults to 1408):
        The hidden size of the hidden states for cross-attention.

    Examples:

    ```python
    >>> from transformers import InstructBlipVideoQFormerConfig, InstructBlipVideoQFormerModel

    >>> # Initializing a InstructBlipVideo Salesforce/instructblip-flan-t5-xl style configuration
    >>> configuration = InstructBlipVideoQFormerConfig()

    >>> # Initializing a model (with random weights) from the Salesforce/instructblip-flan-t5-xl style configuration
    >>> model = InstructBlipVideoQFormerModel(configuration)
    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úinstructblipvideo_qformerÚqformer_configi:w  Ú
vocab_sizei   r   é   r   r   i   r   r   r   gš™™™™™¹?Úhidden_dropout_probÚattention_probs_dropout_probi   Úmax_position_embeddingsç{®Gáz”?r    gê-�™—q=r   r   NÚpad_token_idr	   Úcross_attention_frequencyr   Úencoder_hidden_size)r"   r#   r$   r%   r&   r'   r6   r(   r)   r   r   r   r   r   r,   r8   r-   r9   r:   r    r   r<   r=   r>   r/   r0   r1   r3   r3   D   s  € € € € € € ðð ð( -€JØ&€Oà€J�ÐÐÑØ€K�ÐÐÑØÐ�sÐÐÑØ!Ð˜Ð!Ð!Ñ!Ø!Ð�sÐ!Ð!Ñ!Ø€J�ÐÐÑØ'*Ð˜ ™Ð*Ð*Ñ*Ø03Ð  %¨#¡+Ð3Ð3Ñ3Ø#&Ð˜SÐ&Ð&Ñ&Ø#Ð�uÐ#Ð#Ñ#Ø!€N�EÐ!Ð!Ñ!Ø €L�#˜‘*Ð Ð Ñ Ø%&Ð˜sÐ&Ð&Ñ&Ø#Ð˜Ð#Ð#Ñ#Ð#Ð#r0   r3   c                   óÈ   ‡ — e Zd ZU dZdZddiZe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z  dz  ed	<   d
Zeed<   dZeed<   dZeed<   dZedz  ed<   ˆ fd„Zˆ xZS )ÚInstructBlipVideoConfiga  
    qformer_config (`dict`, *optional*):
        Dictionary of configuration options used to initialize [`InstructBlipVideoQFormerConfig`].
    num_query_tokens (`int`, *optional*, defaults to 32):
        The number of query tokens passed through the Transformer.

    Example:

    ```python
    >>> from transformers import (
    ...     InstructBlipVideoVisionConfig,
    ...     InstructBlipVideoQFormerConfig,
    ...     OPTConfig,
    ...     InstructBlipVideoConfig,
    ...     InstructBlipVideoForConditionalGeneration,
    ... )

    >>> # Initializing a InstructBlipVideoConfig with Salesforce/instructblip-flan-t5-xl style configuration
    >>> configuration = InstructBlipVideoConfig()

    >>> # Initializing a InstructBlipVideoForConditionalGeneration (with random weights) from the Salesforce/instructblip-flan-t5-xl style configuration
    >>> model = InstructBlipVideoForConditionalGeneration(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config

    >>> # We can also initialize a InstructBlipVideoConfig from a InstructBlipVideoVisionConfig, InstructBlipVideoQFormerConfig and any PreTrainedConfig

    >>> # Initializing Instructblipvideo vision, Instructblipvideo Q-Former and language model configurations
    >>> vision_config = InstructBlipVideoVisionConfig()
    >>> qformer_config = InstructBlipVideoQFormerConfig()
    >>> text_config = OPTConfig()

    >>> config = InstructBlipVideoConfig(vision_config=vision_config, qformer_config=qformer_config, text_config=text_config)
    ```ÚinstructblipvideoÚvideo_token_idÚvideo_token_index)Útext_configr5   r   Nr   r5   rD   é    Únum_query_tokensg      ð?Úinitializer_factorr;   r    c                 óB  •— | j         €4t          d         ¦   «         | _         t                               d¦  «         nQt	          | j         t
          ¦  «        r7| j                              dd¦  «        }t          |         di | j         ¤Ž| _         | j        €.t          ¦   «         | _        t                               d¦  «         n0t	          | j        t
          ¦  «        rt          di | j        ¤Ž| _        | j	        €.t          ¦   «         | _	        t                               d¦  «         n0t	          | j	        t
          ¦  «        rt          di | j	        ¤Ž| _	        | j	        j        | j        _        | j         j        t          v | _         t!          ¦   «         j        di |¤Ž d S )NÚoptzTtext_config is None. Initializing the text config with default values (`OPTConfig`).r&   z\qformer_config is None. Initializing the InstructBlipVideoQFormerConfig with default values.z``vision_config` is `None`. initializing the `InstructBlipVideoVisionConfig` with default values.r/   )rD   r
   ÚloggerÚinfoÚ
isinstanceÚdictÚgetr5   r3   r   r   r   r>   r&   r   Úuse_decoder_only_language_modelÚsuperÚ__post_init__)ÚselfÚkwargsÚtext_model_typeÚ	__class__s      €r1   rQ   z%InstructBlipVideoConfig.__post_init__¦   s‹  ø€ ØÔÐ#Ý-¨eÔ4Ñ6Ô6ˆDÔÝ�KŠKÐnÑoÔoÐoÐoÝ˜Ô(­$Ñ/Ô/ð 	SØ"Ô.×2Ò2°<ÀÑGÔGˆOÝ-¨oÔ>ÐRÐRÀÔAQÐRÐRˆDÔàÔÐ&Ý"@Ñ"BÔ"BˆDÔÝ�KŠKÐvÑwÔwÐwÐwÝ˜Ô+­TÑ2Ô2ð 	XÝ"@Ð"WÐ"WÀ4ÔCVÐ"WÐ"WˆDÔàÔÐ%Ý!>Ñ!@Ô!@ˆDÔÝ�KŠKØrñô ð ð õ ˜Ô*­DÑ1Ô1ð 	UÝ!>Ð!TÐ!TÀÔASÐ!TÐ!TˆDÔà26Ô2DÔ2PˆÔÔ/Ø/3Ô/?Ô/JÕNoÐ/oˆÔ,Ø�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'r0   )r"   r#   r$   r%   r&   Úattribute_mapr   r3   r   Úsub_configsr   rM   r   r)   r5   rD   rF   r(   rG   r-   r    rC   rQ   Ú__classcell__)rU   s   @r1   r@   r@   n   s  ø€ € € € € € ð"ð "ðH %€Jà%Ð':Ð;€Mà!Ø8Ø6ðð €Kð 59€M�4Ð*Ñ*¨TÑ1Ð8Ð8Ñ8Ø59€N�DÐ+Ñ+¨dÑ2Ð9Ð9Ñ9Ø26€K�Ð(Ñ(¨4Ñ/Ð6Ð6Ñ6ØÐ�cÐÐÑØ #Ð˜Ð#Ð#Ñ#Ø#Ð�uÐ#Ð#Ñ#Ø$(Ð�s˜T‘zÐ(Ð(Ñ(ð(ð (ð (ð (ð (ð (ð (ð (ð (r0   r@   )r@   r3   r   N)Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úmodels.auto.modeling_autor   Úutilsr   r   Úautor
   r   Ú
get_loggerr"   rJ   r   r3   r@   Ú__all__r/   r0   r1   ú<module>r`      s‘  ðð, /Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø JÐ JÐ JÐ JÐ JÐ JØ ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -ð 
ˆÔ	˜HÑ	%Ô	%€ð €Ð?Ð@Ñ@Ô@Øðð ð ð ð Ð$4ñ ô ñ „ñ AÔ@ððB €Ð?Ð@Ñ@Ô@Øð%$ð %$ð %$ð %$ð %$Ð%5ñ %$ô %$ñ „ñ AÔ@ð%$ðP €Ð?Ð@Ñ@Ô@ØðN(ð N(ð N(ð N(ð N(Ð.ñ N(ô N(ñ „ñ AÔ@ðN(ðb iÐ
hÐ
h€€€r0   