lmflow.pipeline.rm_tuner#

Attributes#

Classes#

RewardModelTuner

Initializes the RewardModelTuner class.

Module Contents#

lmflow.pipeline.rm_tuner.logger[source]#
class lmflow.pipeline.rm_tuner.RewardModelTuner(model_args, data_args, finetuner_args, *args, **kwargs)[source]#

Bases: lmflow.pipeline.finetuner.Finetuner

Initializes the RewardModelTuner class.

Parameters:
model_argsModelArguments object.

Contains the arguments required to load the model.

data_argsDatasetArguments object.

Contains the arguments required to load the dataset.

finetuner_argsRewardModelTunerArguments object.

Contains the arguments required to perform finetuning.

argsOptional.

Positional arguments.

kwargsOptional.

Keyword arguments.

tune(model: lmflow.models.hf_text_regression_model.HFTextRegressionModel, dataset, transform_dataset_in_place=True, data_collator=None, **kwargs)[source]#

Perform tuning for a model

Parameters:
modelTunableModel object.

TunableModel to perform tuning.

dataset:

dataset to train model.