
    Z j-                         S r SSKJr  SSKJr  SSKJrJr  \R                  " \	5      r
\" SS9\ " S S	\5      5       5       r\" SS9\ " S
 S\5      5       5       r\" SS9\ " S S\5      5       5       r/ SQrg)zKOSMOS-2 model configuration    )strict   )PreTrainedConfig)auto_docstringloggingzmicrosoft/kosmos-2-patch14-224)
checkpointc                   ~   \ rS rSr% SrSrS/rSSSS.rS	r\	\
S
'   Sr\	\
S'   Sr\	\
S'   Sr\	\
S'   Sr\	\
S'   Sr\	\
S'   Sr\\
S'   Sr\\	-  \
S'   Sr\\	-  \
S'   Sr\\	-  \
S'   Sr\\	-  \
S'   Sr\\
S'   Sr\\
S'   Sr\\
S'   Sr\\
S'   Sr\\
S '   S!r\	S"-  \
S#'   S$r\	S"-  \
S%'   S&r\	\ \	   -  S"-  \
S''   S(r!\\
S)'   S*r"g")+Kosmos2TextConfig   kosmos_2_text_modeltext_configpast_key_valuesattention_heads	embed_dimlayers)num_attention_headshidden_sizenum_hidden_layersi  
vocab_sizei   max_position_embeddings   i    ffn_dim    geluactivation_functiong?dropoutattention_dropout        activation_dropout	layerdroph㈵>layer_norm_eps{Gz?init_stdTscale_embedding	use_cachetie_word_embeddings   Npad_token_idr   bos_token_id   eos_token_idFadd_cross_attention )#__name__
__module____qualname____firstlineno__
model_typebase_config_keykeys_to_ignore_at_inferenceattribute_mapr   int__annotations__r   r   r   r   r   r   strr   floatr   r   r    r"   r$   r%   boolr&   r'   r)   r*   r,   listr-   __static_attributes__r.       ڂ/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/kosmos2/configuration_kosmos2.pyr
   r
      s    'J#O#4"50"%M J#'S'IsFCGSOS%%GUS[%(us{(&)) Ius{  NE He OT It $$ L#*  L#* +,L#S	/D(, %%r>   r
   c                      \ rS rSr% SrSrSr\\S'   Sr	\\S'   Sr
\\S	'   S
r\\S'   Sr\\S'   Sr\\\   -  \\\4   -  \S'   Sr\\\   -  \\\4   -  \S'   Sr\\S'   Sr\\S'   Sr\\-  \S'   Sr\\S'   Sr\\S'   Srg)Kosmos2VisionConfig;   kosmos_2_vision_modelvision_configi   r   i   intermediate_sizer   r      r   r   num_channels   
image_size   
patch_size
quick_gelu
hidden_actr!   r"   r   r   r#   initializer_rangeg      ?initializer_factorr.   N)r/   r0   r1   r2   r3   r4   r   r7   r8   rE   r   r   rG   rI   r<   tuplerK   rM   r9   r"   r:   r   rN   rO   r=   r.   r>   r?   rA   rA   ;   s     )J%OK!s!s!!L#47Jd3i%S/1746Jd3i%S/16"J" NE %(us{(#u# ##r>   rA   c                      ^  \ rS rSr% SrSr\\S.rSr	\
\-  S-  \S'   Sr\
\-  S-  \S'   Sr\\S	'   S
r\\S'   U 4S jrSrU =r$ )Kosmos2ConfigO   a6  
latent_query_num (`int`, *optional*, defaults to 64):
    The number of latent query tokens that represent the image features used in the text decoder component.

Example:

```python
>>> from transformers import Kosmos2Config, Kosmos2Model

>>> # Initializing a Kosmos-2 kosmos-2-patch14-224 style configuration
>>> configuration = Kosmos2Config()

>>> # Initializing a model (with random weights) from the kosmos-2-patch14-224 style configuration
>>> model = Kosmos2Model(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```zkosmos-2)r   rD   Nr   rD   @   latent_query_numTr'   c                   > U R                   c%  [        5       U l         [        R                  S5        O9[	        U R                   [
        5      (       a  [        S0 U R                   D6U l         U R                  c%  [        5       U l        [        R                  S5        O9[	        U R                  [
        5      (       a  [        S0 U R                  D6U l        [        TU ]$  " S0 UD6  g )NzR`text_config` is `None`. initializing the `Kosmos2TextConfig` with default values.zV`vision_config` is `None`. initializing the `Kosmos2VisionConfig` with default values.r.   )
r   r
   loggerinfo
isinstancedictrD   rA   super__post_init__)selfkwargs	__class__s     r?   r\   Kosmos2Config.__post_init__m   s    #02DKKlm(($//0D43C3CDD%!4!6DKKpq**D11!4!Jt7I7I!JD''r>   )r/   r0   r1   r2   __doc__r3   r
   rA   sub_configsr   rZ   r   r8   rD   rU   r7   r'   r;   r\   r=   __classcell__)r_   s   @r?   rR   rR   O   sd    & J"3FYZK26K((4/648M4**T18c $$( (r>   rR   )rR   r
   rA   N)ra   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   
get_loggerr/   rW   r
   rA   rR   __all__r.   r>   r?   <module>ri      s    # . 3 , 
		H	% ;<&( &  =&@ ;<$* $  =$$ ;<)($ )(  =)(X Hr>   