AbsRunner#
AbsEmbedderTrainer#
- class FlagEmbedding.abc.finetune.embedder.AbsEmbedderRunner(model_args: AbsEmbedderModelArguments, data_args: AbsEmbedderDataArguments, training_args: AbsEmbedderTrainingArguments)[source]#
Abstract class to run embedding model fine-tuning.
- Parameters:
model_args (AbsEmbedderModelArguments) – Model arguments
data_args (AbsEmbedderDataArguments) – Data arguments.
training_args (AbsEmbedderTrainingArguments) – Training arguments.
Methods#
- abstract AbsEmbedderRunner.load_tokenizer_and_model() Tuple[PreTrainedTokenizer, AbsEmbedderModel] [source]#
Abstract method to load the tokenizer and model.
- Returns:
Loaded tokenizer and model instances.
- Return type:
Tuple[PreTrainedTokenizer, AbsEmbedderModel]
- abstract AbsEmbedderRunner.load_trainer() AbsEmbedderTrainer [source]#
Abstract method to load the trainer.
- Returns:
The loaded trainer instance.
- Return type:
- AbsEmbedderRunner.load_train_dataset() AbsEmbedderTrainDataset [source]#
Loads the training dataset based on data arguments.
- Returns:
The loaded dataset instance.
- Return type:
- AbsEmbedderRunner.load_data_collator() AbsEmbedderCollator [source]#
Loads the appropriate data collator.
- Returns:
Loaded data collator.
- Return type: