
    ^j                     v    d dl mZ ddlmZ ddlmZ ddlmZmZ  ed      e G d	 d
e                    Z	d
gZ
y)    )strict   )PreTrainedConfig)auto_docstring   )CONFIG_MAPPING
AutoConfigzzai-org/GLM-4.1V-9B-Thinking)
checkpointc                        e Zd ZU dZdZeedZdg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<   dZeed<    fdZ xZS )GlmgaConfiga  
    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.

    ```python
    >>> from transformers import AutoModelForImageTextToText, GlmgaConfig

    >>> # Initializing a Glmga style configuration
    >>> configuration = GlmgaConfig()

    >>> # Initializing a model (reusing the GLM-4.6V implementation) from that configuration
    >>> model = AutoModelForImageTextToText.from_config(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```glmga)text_configvision_configpast_key_valuesNr   r   i/O image_token_idi0O video_token_idi+O image_start_token_idi,O image_end_token_idiAO video_start_token_idiBO video_end_token_idFtie_word_embeddingsc                 T   t        | j                  t              rT| j                  j                  dd      | j                  d<   t	        | j                  d      di | j                  | _        n| j                  t	        d          | _        t        | j
                  t              rT| j
                  j                  dd      | j
                  d<   t	        | j
                  d      di | j
                  | _        n| j
                  t	        d          | _        t        |   di | y )N
model_typeglm4v_vision
glm4v_text )
isinstancer   dictgetr   r   super__post_init__)selfkwargs	__class__s     x/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/glmga/configuration_glmga.pyr!   zGlmgaConfig.__post_init__D   s   d(($//3/A/A/E/ElTb/cD|,!/0B0B<0P!Q!gTXTfTf!gD'!/!?!ADd&&--1-=-=-A-A,P\-]D\*-d.>.>|.LMaPTP`P`aD%-l;=D''    )__name__
__module____qualname____doc__r   r	   sub_configskeys_to_ignore_at_inferencer   r   r   __annotations__r   r   intr   r   r   r   r   r   boolr!   __classcell__)r$   s   @r%   r   r      s    . J",zJK#4"526K((4/648M4**T18 NC  NC  &#&$$ &#&$$ %%( (r&   r   N)huggingface_hub.dataclassesr   configuration_utilsr   utilsr   autor   r	   r   __all__r   r&   r%   <module>r6      sG   * / 3 # - 9:3(" 3(  ;3(l /r&   