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:

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:

AbsEmbedderTrainer

AbsEmbedderRunner.load_train_dataset() AbsEmbedderTrainDataset[source]#

Loads the training dataset based on data arguments.

Returns:

The loaded dataset instance.

Return type:

AbsEmbedderTrainDataset

AbsEmbedderRunner.load_data_collator() AbsEmbedderCollator[source]#

Loads the appropriate data collator.

Returns:

Loaded data collator.

Return type:

AbsEmbedderCollator

AbsEmbedderRunner.run()[source]#

Executes the training process.