Base Trainer¶
Base trainer classes for RAG system components.
BaseTrainer
¶
Bases: BaseModel
, ABC
Base Trainer Class.
This abstract class provides the interface for creating Trainer objects that implement different training strategies.
Attributes:
Name | Type | Description |
---|---|---|
rag_system |
RAGSystem
|
The RAG system to be trained. |
train_dataset |
Any
|
Dataset used for training. |
Source code in src/fed_rag/base/trainer.py
BaseRetrieverTrainer
¶
Bases: BaseTrainer
, ABC
Base trainer for retriever components of RAG systems.
This trainer focuses specifically on training the retriever's encoder components, either the full encoder or just the query encoder depending on the retriever configuration.
Source code in src/fed_rag/base/trainer.py
BaseGeneratorTrainer
¶
Bases: BaseTrainer
, ABC
Base trainer for generator component of RAG systems.
This trainer focuses specifically on training the generator model.
Attributes:
Name | Type | Description |
---|---|---|
rag_system |
RAGSystem | NoEncodeRAGSystem
|
The RAG system to be trained. Can also be a |