Runner#
- class FlagEmbedding.finetune.embedder.decoder_only.icl.DecoderOnlyEmbedderICLRunner(model_args: DecoderOnlyEmbedderICLModelArguments, data_args: DecoderOnlyEmbedderICLDataArguments, training_args: AbsEmbedderTrainingArguments)[source]#
Runner class for decoder only icl model.
- Parameters:
model_args (DecoderOnlyEmbedderICLModelArguments) – Model arguments instance.
data_args (DecoderOnlyEmbedderICLDataArguments) – Data arguments instance.
training_args (AbsEmbedderTrainingArguments) – Trainer arguments.
- load_tokenizer_and_model() Tuple[PreTrainedTokenizer, AbsEmbedderModel] [source]#
Load tokenizer and model.
- Returns:
Tokenizer and model instances.
- Return type:
Tuple[PreTrainedTokenizer, AbsEmbedderModel]
- load_train_dataset() DecoderOnlyEmbedderICLSameDatasetTrainDataset [source]#
Load the dataset instance for training.
- Raises:
NotImplementedError – Only support same_dataset_within_batch for DecoderOnlyEmbedderICLRunner.
- Returns:
The dataset instance.
- Return type:
- load_trainer() DecoderOnlyEmbedderICLTrainer [source]#
Load the trainer.
- Returns:
Loaded trainer instance.
- Return type: