+
    œ°³jH  ã                   óx   € R t ^ RIHt ^RIHt ^RIHt ^RIHt ]! RR7      ] ! R R]4      4       4       t	R.t
R	# )
zRAG model configuration)Ústrict©ÚPreTrainedConfig)Úauto_docstring)Ú
AutoConfigÚ )Ú
checkpointc                   óÒ   a a€ ] tR t^t oRtRtRtRtRtRt	Rt
RtRtRtRtRt^tRtRt^tR	tR
tRtRtRtRtRtRtRtRtRtRtRt Rt!V 3R lt"]#V3R lR l4       t$V3R lt%Rt&Vt'V ;t(# )Ú	RagConfiga]  
prefix (`str`, *optional*):
    A string prefix prepended to every input before passing to the generator model.
title_sep (`str`, *optional*, defaults to  `" / "`):
    Separator inserted between the title and the text of the retrieved document when calling [`RagRetriever`].
doc_sep (`str`, *optional*, defaults to  `" // "`):
    Separator inserted between the text of the retrieved document and the original input when calling
    [`RagRetriever`].
n_docs (`int`, *optional*, defaults to 5):
    Number of documents to retrieve.
max_combined_length (`int`, *optional*, defaults to 300):
    Max length of contextualized input returned by [`~RagRetriever.__call__`].
retrieval_vector_size (`int`, *optional*, defaults to 768):
    Dimensionality of the document embeddings indexed by [`RagRetriever`].
retrieval_batch_size (`int`, *optional*, defaults to 8):
    Retrieval batch size, defined as the number of queries issues concurrently to the faiss index encapsulated
    [`RagRetriever`].
dataset (`str`, *optional*, defaults to `"wiki_dpr"`):
    A dataset identifier of the indexed dataset in HuggingFace Datasets (list all available datasets and ids
    using `datasets.list_datasets()`).
dataset_split (`str`, *optional*, defaults to `"train"`):
    Which split of the `dataset` to load.
index_name (`str`, *optional*, defaults to `"compressed"`):
    The index name of the index associated with the `dataset`. One can choose between `"legacy"`, `"exact"` and
    `"compressed"`.
index_path (`str`, *optional*):
    The path to the serialized faiss index on disk.
passages_path (`str`, *optional*):
    A path to text passages compatible with the faiss index. Required if using
    [`~models.rag.retrieval_rag.LegacyIndex`]
use_dummy_dataset (`bool`, *optional*, defaults to `False`):
    Whether to load a "dummy" variant of the dataset specified by `dataset`.
reduce_loss (`bool`, *optional*, defaults to `False`):
    Whether or not to reduce the NLL loss using the `torch.Tensor.sum` operation.
label_smoothing (`float`, *optional*, defaults to 0.0):
    Only relevant if `return_loss` is set to `True`. Controls the `epsilon` parameter value for label smoothing
    in the loss calculation. If set to 0, no label smoothing is performed.
do_deduplication (`bool`, *optional*, defaults to `True`):
    Whether or not to deduplicate the generations from different context documents for a given input. Has to be
    set to `False` if used while training with distributed backend.
exclude_bos_score (`bool`, *optional*, defaults to `False`):
    Whether or not to disregard the BOS token when computing the loss.
do_marginalize (`bool`, *optional*, defaults to `False`):
    If `True`, the logits are marginalized over all documents by making use of
    `torch.nn.functional.log_softmax`.
output_retrieved (`bool`, *optional*, defaults to `False`):
    If set to `True`, `retrieved_doc_embeds`, `retrieved_doc_ids`, `context_input_ids` and
    `context_attention_mask` are returned. See returned tensors for more detail.
dataset_revision (`str`, *optional*,):
    The revision (commit hash, tag, or branch) of the Hugging Face dataset used for retrieval.
ÚragTNz / z // i,  i   Úwiki_dprÚtrainÚ
compressedFg        c                ór  <€ R V9  g   RV9  d   \        RV P                   RV 24      hVP                  R 4      pVP                  R4      pVP                  R4      pVP                  R4      p\        P                  ! V3/ VB V n        \        P                  ! V3/ VB V n        \        SV `   ! R/ VB  R# )Úquestion_encoderÚ	generatorzA configuration of type zt cannot be instantiated because not both `question_encoder` and `generator` sub-configurations are passed, but only Ú
model_typeN© )	Ú
ValueErrorr   Úpopr   Ú	for_modelr   r   ÚsuperÚ__post_init__)ÚselfÚkwargsÚquestion_encoder_configÚquestion_encoder_model_typeÚdecoder_configÚdecoder_model_typeÚ	__class__s   &,    €Új/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/rag/configuration_rag.pyr   ÚRagConfig.__post_init__m   sÀ   ø€ Ø VÔ+¨{À&Ô/HÜØ*¨4¯?©?Ð*;ð <HØHNÀxðQóð ð
 #)§*¡*Ð-?Ó"@ÐØ&=×&AÑ&AÀ,Ó&OÐ#ØŸ™ KÓ0ˆØ+×/Ñ/°Ó=Ðä *× 4Ò 4Ð5PÑ lÐTkÑ lˆÔÜ#×-Ò-Ð.@ÑSÀNÑSˆŒä‰ÒÑ' Ô'ó    c                ó,   <€ V ^8„  d   QhRS[ RS[ RS[ /# )é   r   Úgenerator_configÚreturnr   )ÚformatÚ__classdict__s   "€r    Ú__annotate__ÚRagConfig.__annotate__   s*   ø€ ÷ 
wñ 
wÙ&6ð
wÙJZð
wá	ñ
wr"   c                óR   € V ! RRVP                  4       RVP                  4       /VB # )zÛ
Instantiate a [`EncoderDecoderConfig`] (or a derived class) from a pre-trained encoder model configuration and
decoder model configuration.

Returns:
    [`EncoderDecoderConfig`]: An instance of a configuration object
r   r   r   )Úto_dict)Úclsr   r%   r   s   &&&,r    Ú'from_question_encoder_generator_configsÚ1RagConfig.from_question_encoder_generator_configs~   s1   € ñ ÑvÐ$;×$CÑ$CÓ$EÐvÐQa×QiÑQiÓQkÐvÐouÑvÐvr"   c                óü  <€ V ^8„  d   Qh/ S[ R,          ;R&   S[;R&   S[R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ S[S[ ,          ,          R,          ;R&   S[ R,          ;R&   S[;R	&   S[;R
&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[;R&   S[R,          ;R&   S[R,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[R,          ;R&   # )r$   NÚ
vocab_sizeÚis_encoder_decoderÚprefixÚbos_token_idÚpad_token_idÚeos_token_idÚdecoder_start_token_idÚ	title_sepÚdoc_sepÚn_docsÚmax_combined_lengthÚretrieval_vector_sizeÚretrieval_batch_sizeÚdatasetÚdataset_splitÚ
index_nameÚ
index_pathÚpassages_pathÚuse_dummy_datasetÚreduce_lossÚlabel_smoothingÚdo_deduplicationÚexclude_bos_scoreÚdo_marginalizeÚoutput_retrievedÚ	use_cacheÚdataset_revision)ÚintÚboolÚstrÚlistÚfloat)r'   r(   s   "€r    r)   r*      sÆ  ø‡ ‚ ñt �d•
Ñ!ñu ñv Ñ#ñw ñx �$�JÑñy ñz ˜•*Ñ#ñ{ ñ| ˜•*Ñ#ñ} ñ~ ™™S�	•/ DÕ(Ñ/ñ ñ@   $�JÑ-ñA ñB ÑñC ñD ÑñE ñF �OñG ñH Ñ"ñI ñJ Ñ$ñK ñL Ñ!ñM ñN ÑñO ñP Ñ ñQ ñR Ñ"ñS ñT �d•
Ñ!ñU ñV ˜•:Ñ$ñW ñX Ñ#ñY ñZ Ññ[ ñ\ Ñ ñ] ñ^ Ñ!ñ_ ñ` Ñ#ña ñb Ñ ñc ñd Ñ"ñe ñf Ññg ñh ˜D•jÑ'òi r"   )r   r   ))Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Úhas_no_defaults_at_initr1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   r   Úclassmethodr.   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r   r(   s   @@r    r
   r
      sÌ   ù‡ € ñ2ðh €JØ"Ðà!€JØ#ÐØ€FØ#€LØ#€LØ+/€LØ)-ÐØ€IØ€GØ€FØ"ÐØ!$ÐØ !ÐØ€GØ €MØ"€JØ!€JØ $€MØ#ÐØ€KØ €OØ!ÐØ#ÐØ €NØ"ÐØ€IØ#'Ðõ(ð" ÷
wó ð
w÷Q … r"   r
   N)rU   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   Úauto.configuration_autor   r
   Ú__all__r   r"   r    Ú<module>ra      sO   ðñ å .å 3Ý #Ý 0ñ ˜2ÔØôpwÐ ó pwó ó ðpwðf ˆ-‚r"   