
    fTh                     x    S r SSKr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)
zColPali model configuration    N)deepcopy   )PretrainedConfig   )CONFIG_MAPPING
AutoConfigc                   L   ^  \ rS rSrSrSr\\S.r   SS\	4U 4S jjjr
SrU =r$ )	ColPaliConfig   a  
Configuration class to store the configuration of a [`ColPaliForRetrieval`]. It is used to instantiate an instance
of `ColPaliForRetrieval` according to the specified arguments, defining the model architecture following the methodology
from the "ColPali: Efficient Document Retrieval with Vision Language Models" paper.

Creating a configuration with the default settings will result in a configuration where the VLM backbone is set to the
default PaliGemma configuration, i.e the one from [vidore/colpali-v1.2](https://huggingface.co/vidore/colpali-v1.2).

The ColPali config is very similar to [`PaligemmaConfig`], but with an extra attribute defining the embedding dimension.

Note that contrarily to what the class name suggests (actually the name refers to the ColPali **methodology**), you can
use a different VLM backbone model than PaliGemma by passing the corresponding VLM configuration to the class constructor.

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.
    text_config (`PretrainedConfig`, *optional*):
        Configuration of the text backbone model. Overrides the `text_config` attribute of the `vlm_config` if provided.
    embedding_dim (`int`, *optional*, defaults to 128):
        Dimension of the multi-vector embeddings produced by the model.

Example:

```python
from transformers.models.colpali import ColPaliConfig, ColPaliForRetrieval

config = ColPaliConfig()
model = ColPaliForRetrieval(config)
```
colpali)
vlm_configtext_configembedding_dimc                 n  > Uc$  [         S   " 5       n[        R                  S5        O[        U[        5      (       aN  [        U5      nSU;  a  [        S5      eUS   [         ;  a  [        SUS    S3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        Ub  UOUR                  =U l        n[        U R                  [        5      (       a'  SU;   a  US   OS	US'   [         US      " S
0 UD6U l        X0l        [        TU ]<  " S
0 UD6  g )N	paligemmaza`vlm_config` is `None`. Initializing `vlm_config` with the `PaliGemmaConfig` with default values.
model_typez^The `model_type` key is missing in the `vlm_config` dictionary. Please provide the model type.zThe model type `z6` is not supported. Please provide a valid model type.zWInvalid type for `vlm_config`. Expected `PretrainedConfig`, `dict`, or `None`, but got .gemma )r   loggerinfo
isinstancedictr   KeyError
ValueErrorr   	TypeErrortyper   r   r   super__init__)selfr   r   r   kwargs	__class__s        i/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/colpali/configuration_colpali.pyr   ColPaliConfig.__init__A   sT    '46JKKs 
D))!*-J:-t  L)? &z,'?&@@vw  (
<(@AOJOJ
$455#Jijnoyjzi{{|}  %8C8OU_UkUkk;d&&--EQU`E`L(AfmK%-k,.GHW;WD*"6"    )r   r   r   )NN   )__name__
__module____qualname____firstlineno____doc__r   r   r   sub_configsintr   __static_attributes____classcell__)r"   s   @r#   r
   r
      s9     D J!1*MK  	&# 	&# &#r%   r
   )r+   loggingcopyr   configuration_utilsr   autor   r   	getLoggerr'   r   r
   __all__r   r%   r#   <module>r6      sB    "   3 - 
		8	$L#$ L#^ 
r%   