
    <h|                         S SK Jr  S SKJr  SSKJr  SSKJr  SSKJ	r	  \R                  " \5      r " S S	\5      rS	/rg
)    )deepcopy)Any   )PretrainedConfig)logging   )CONFIG_MAPPINGc                   v   ^  \ rS rSr% SrSrS\0r\\	\
4   \S'      SS\S\4U 4S jjjrSS	\4S
 jjrSrU =r$ )ColQwen2Config   a  
Configuration class to store the configuration of a [`ColQ2en2ForRetrieval`]. It is used to instantiate an instance
of `ColQwen2ForRetrieval` according to the specified arguments, defining the model architecture following the methodology
from the "ColPali: Efficient Document Retrieval with Vision Language Models" paper.

Instantiating a configuration with the defaults will yield a similar configuration to the vision encoder used by the pre-trained
ColQwen2-v1.0 model, e.g. [vidore/colqwen2-v1.0-hf](https://huggingface.co/vidore/colqwen2-v1.0-hf).

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

Args:
    vlm_config (`PretrainedConfig`, *optional*):
        Configuration of the VLM backbone model.
    embedding_dim (`int`, *optional*, defaults to 128):
        Dimension of the multi-vector embeddings produced by the model.
    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.models.colqwen2 import ColQwen2Config, ColQwen2ForRetrieval

config = ColQwen2Config()
model = ColQwen2ForRetrieval(config)
```
colqwen2
vlm_configsub_configsembedding_diminitializer_rangec                   > Uc$  [         S   " 5       n[        R                  S5        Ot[        U[        5      (       a/  [        U5      nSU;  a  [        S5      e[         US      " S0 UD6nO0[        U[        5      (       a  UnO[        S[        U5       S35      eXl
        X l        X0l        [        TU ]8  " S0 UD6  g )Nqwen2_vlz_`vlm_config` is `None`. Initializing `vlm_config` with the `Qwen2VLConfig` with default values.
model_typez^The `model_type` key is missing in the `vlm_config` dictionary. Please provide the model type.zWInvalid type for `vlm_config`. Expected `PretrainedConfig`, `dict`, or `None`, but got . )r	   loggerinfo
isinstancedictr   KeyErrorr   	TypeErrortyper   r   r   super__init__)selfr   r   r   kwargs	__class__s        k/var/www/html/shao/venv/lib/python3.13/site-packages/transformers/models/colqwen2/configuration_colqwen2.pyr   ColQwen2Config.__init__;   s     '
35JKKq 
D))!*-J:-t  (
<(@AOJOJ
$455#Jijnoyjzi{{|}  %*!2"6"    returnc                 4    U R                   R                  US9$ )N)decoder)r   get_text_config)r    r(   s     r#   r)   ColQwen2Config.get_text_configZ   s    ..w.??r%   )r   r   r   )N   g{Gz?)F)__name__
__module____qualname____firstlineno____doc__r   r   r   r   strr   __annotations__intfloatr   r)   __static_attributes____classcell__)r"   s   @r#   r   r      se    8 J#/1A"BKc3hB  #'	# # !	# #>@0@ @ @r%   r   N)copyr   typingr   configuration_utilsr   utilsr   autor	   
get_loggerr,   r   r   __all__r   r%   r#   <module>r>      sD       3  ! 
		H	%@@% @@F 
r%   