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:
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:

DecoderOnlyEmbedderICLSameDatasetTrainDataset

load_trainer() DecoderOnlyEmbedderICLTrainer[source]#

Load the trainer.

Returns:

Loaded trainer instance.

Return type:

DecoderOnlyEmbedderICLTrainer

run()[source]#

Run the finetune.