AbsRunner#

AbsRerankerTrainer#

class FlagEmbedding.abc.finetune.reranker.AbsRerankerRunner(model_args: AbsRerankerModelArguments, data_args: AbsRerankerDataArguments, training_args: AbsRerankerTrainingArguments)[source]#

Abstract class to run reranker model fine-tuning.

Parameters:

Methods#

abstract AbsRerankerRunner.load_tokenizer_and_model() Tuple[PreTrainedTokenizer, AbsRerankerModel][source]#

Abstract method to load the tokenizer and model.

Returns:

Loaded tokenizer and model instances.

Return type:

Tuple[PreTrainedTokenizer, AbsRerankerModel]

abstract AbsRerankerRunner.load_trainer() AbsRerankerTrainer[source]#

Abstract method to load the trainer.

Returns:

The loaded trainer instance.

Return type:

AbsRerankerTrainer

AbsRerankerRunner.load_train_dataset() AbsRerankerTrainDataset[source]#

Loads the training dataset based on data arguments.

Returns:

The loaded dataset instance.

Return type:

AbsRerankerTrainDataset

AbsRerankerRunner.load_data_collator() AbsRerankerCollator[source]#

Loads the appropriate data collator.

Returns:

Loaded data collator.

Return type:

AbsRerankerCollator

AbsRerankerRunner.run()[source]#

Executes the training process.