
    fTh%                     l    S SK Jr  S SKJr  SSKJrJr  \R                  " \5      r	 " S S\5      r
S/rg)   )PretrainedConfig)logging   )CONFIG_MAPPING
AutoConfigc                   p   ^  \ rS rSrSrSrSSSS.r\\S.r       SS	\	S\	S\	S\	S
\
4
U 4S jjjrSrU =r$ )ShieldGemma2Config   aU  
This is the configuration class to store the configuration of a [`ShieldGemma2ForImageClassification`]. It is used to instantiate an
ShieldGemma2ForImageClassification according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the shieldgemma-2-4b-it.

e.g. [google/gemma-3-4b](https://huggingface.co/google/gemma-3-4b)

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[ShieldGemma2TextConfig, dict]`, *optional*):
        The config object of the text backbone.
    vision_config (`Union[AutoConfig, dict]`,  *optional*):
        Custom vision config or dict.
    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.
    image_token_index (`int`, *optional*, defaults to 262144):
        The image token index to encode the image prompt.
    initializer_range (`float`, *optional*, defaults to 0.02):
        The standard deviation of the truncated_normal_initializer for initializing all weight matrices.


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_configmm_tokens_per_imageinitializer_rangec                   > [        U[        5      (       a#  SU;   a  US   OSUS'   [        US      " S0 UD6nOUc  [        S   " 5       nX l        [        U[        5      (       a#  SU;   a  US   OSUS'   [        US      " S0 UD6nOUc  [        S   " 5       nXl        X l        X0l        X@l        XPl        X`l        Xpl	        [        T	U ],  " S0 UD6  g )N
model_typesiglip_vision_modelgemma3_text )
isinstancedictr   r   r   r   r   r   r   r   super__init__)
selfr   r   r   r   r   r   r   kwargs	__class__s
            s/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/shieldgemma2/configuration_shieldgemma2.pyr   ShieldGemma2Config.__init__R   s     mT**/;}/Ll+Rg ,' +=+FGX-XM"*+@ACM*k4((EQU`E`L(AfsK%(\)BCRkRK (79K&*#6 ..!2!2"6"    )r   r   r   r   r   r   r   )NN   i i  i   g{Gz?)__name__
__module____qualname____firstlineno____doc__r   attribute_mapr   sub_configsintfloatr   __static_attributes____classcell__)r!   s   @r"   r	   r	      s    .`  J-))M
 #-zJK #&&&!(#'## !	##
 ## ## ## !## ##r$   r	   N)configuration_utilsr   utilsr   autor   r   
get_loggerr&   loggerr	   __all__r   r$   r"   <module>r7      s<   " 4  - 
		H	%\#) \#~  
 r$   