o
    ¾e¦i*  ã                   @   s6   d dl mZ ddlmZmZ G dd„ deƒZdgZdS )é   )ÚPreTrainedConfigé   )ÚCONFIG_MAPPINGÚ
AutoConfigc                       sH   e Zd ZdZdZeedœZdgZ								
		d‡ fdd„	Z‡  Z	S )ÚGlm46VConfigaÖ  
    This is the configuration class to store the configuration of a [`Glm4vModel`]. It is used to instantiate a
    GLM-4.6V model according to the specified arguments, defining the model architecture. Instantiating a
    configuration with the defaults will yield a similar configuration to that of
    GLM-4.1V-9B-Thinking [zai-org/GLM-4.1V-9B-Thinking](https://huggingface.co/zai-org/GLM-4.1V-9B-Thinking).

    Configuration objects inherit from [`PreTrainedConfig`] and can be used to control the model outputs. Read the
    documentation from [`PreTrainedConfig`] for more information.

    Args:
        text_config (`Union[PreTrainedConfig, dict]`, *optional*, defaults to `Glm4vTextConfig`):
            The config object or dictionary of the text backbone.
        vision_config (`Union[PreTrainedConfig, dict]`,  *optional*, defaults to `Glm4vVisionConfig`):
            The config object or dictionary of the vision backbone.
        image_token_id (`int`, *optional*, defaults to 151343):
            The image token index to encode the image prompt.
        video_token_id (`int`, *optional*, defaults to 151344):
            The video token index to encode the image prompt.
        image_start_token_id (`int`, *optional*, defaults to 151339):
            The image start token index to encode the start of image.
        image_end_token_id (`int`, *optional*, defaults to 151340):
            The image end token index to encode the end of image.
        video_start_token_id (`int`, *optional*, defaults to 151361):
            The video start token index to encode the start of video.
        video_end_token_id (`int`, *optional*, defaults to 151362):
            The video end token index to encode the end of video.
        tie_word_embeddings (`bool`, *optional*, defaults to `False`):
            Whether to tie weight embeddings

    ```python
    >>> from transformers import Glm46VForConditionalGeneration, Glm46VConfig

    >>> # Initializing a GLM-4.6V style configuration
    >>> configuration = Glm46VConfig()

    >>> # Initializing a model from the GLM-4.6V style configuration
    >>> model = Glm4vForConditionalGeneration(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úglm46v)Útext_configÚvision_configÚpast_key_valuesNé/O é0O é+O é,O éAO éBO Fc
                    sÐ   t |tƒr| dd¡|d< t|d  di |¤Ž| _n
|d u r$td ƒ | _t |tƒr>| dd¡|d< t|d  di |¤Ž| _n
|d u rHtd ƒ | _|| _|| _|| _|| _	|| _
|| _|	| _tƒ jdi |
¤Ž d S )NÚ
model_typeÚglm4v_visionÚ
glm4v_text© )Ú
isinstanceÚdictÚgetr   r	   r   Úimage_token_idÚvideo_token_idÚvideo_start_token_idÚvideo_end_token_idÚimage_start_token_idÚimage_end_token_idÚtie_word_embeddingsÚsuperÚ__init__)Úselfr   r	   r   r   r   r   r   r   r   Úkwargs©Ú	__class__r   úm/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/transformers/models/glm46v/configuration_glm46v.pyr    I   s$   

zGlm46VConfig.__init__)	NNr   r   r   r   r   r   F)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úsub_configsÚkeys_to_ignore_at_inferencer    Ú__classcell__r   r   r#   r%   r      s    *
ör   N)Úconfiguration_utilsr   Úautor   r   r   Ú__all__r   r   r   r%   Ú<module>   s   
S