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:
model_args (AbsRerankerModelArguments) – Model arguments
data_args (AbsRerankerDataArguments) – Data arguments.
training_args (AbsRerankerTrainingArguments) – Training arguments.
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:
- AbsRerankerRunner.load_train_dataset() AbsRerankerTrainDataset [source]#
Loads the training dataset based on data arguments.
- Returns:
The loaded dataset instance.
- Return type:
- AbsRerankerRunner.load_data_collator() AbsRerankerCollator [source]#
Loads the appropriate data collator.
- Returns:
Loaded data collator.
- Return type: