
    i{                     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google/shieldgemma-2-4b-it)
checkpointc                        e Zd ZU dZdZddddZ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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 )ShieldGemma2Configa  
    tie_word_embeddings (`bool`, *optional*):
        Whether to tie the word embeddings. Defaults to the value of `text_config.tie_word_embeddings` if not set.
    mm_tokens_per_image (`int`, *optional*, defaults to 256):
        The number of tokens per image embedding.
    boi_token_index (`int`, *optional*, defaults to 255999):
        The begin-of-image token index to wrap the image prompt.
    eoi_token_index (`int`, *optional*, defaults to 256000):
        The end-of-image token index to wrap the image prompt.

    Example:

    ```python
    >>> from transformers import ShieldGemma2ForConditionalGeneration, ShieldGemma2Config, SiglipVisionConfig, ShieldGemma2TextConfig

    >>> # Initializing a Siglip-like vision config
    >>> vision_config = SiglipVisionConfig()

    >>> # Initializing a ShieldGemma2 Text config
    >>> text_config = ShieldGemma2TextConfig()

    >>> # Initializing a ShieldGemma2 gemma-3-4b style configuration
    >>> configuration = ShieldGemma2Config(vision_config, text_config)

    >>> # Initializing a model from the gemma-3-4b style configuration
    >>> model = ShieldGemma2TextConfig(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```shieldgemma2image_token_indexboi_token_indexeoi_token_index)image_token_idboi_token_ideoi_token_id)text_configvision_configNr   r      mm_tokens_per_imagei i  i   g{Gz?initializer_rangec                    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          | _        |j                  d      t        | j
                  dd      | _        t        | $  di | y )N
model_typesiglip_vision_modelgemma3_texttie_word_embeddingsT )

isinstancer   dictgetr   r   getattrr   super__post_init__)selfkwargs	__class__s     /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/shieldgemma2/configuration_shieldgemma2.pyr$   z ShieldGemma2Config.__post_init__J   s+   d(($//3/A/A/E/ElTi/jD|,!/0B0B<0P!Q!gTXTfTf!gD'!/0E!F!HDd&&--1-=-=-A-A,P]-^D\*-d.>.>|.LMaPTP`P`aD%-m<>D::+,4'.t/?/?AVX\']D$''    )__name__
__module____qualname____doc__r   attribute_mapr	   sub_configsr   r    r   __annotations__r   r   intr   r   r   r   floatr$   __classcell__)r'   s   @r(   r   r      s    >  J-))M
 #-zJK26K((4/648M4**T18"""OS""OS"$s$#u#( (r)   r   N)huggingface_hub.dataclassesr   configuration_utilsr   utilsr   autor   r	   r   __all__r   r)   r(   <module>r9      sH   " / 3 # - 78?() ?(  9?(D  
 r)   