lmflow.pipeline.utils.peft_trainer#
Trainer for Peft models
Classes#
Correctly save PEFT model and not full model |
Module Contents#
- class lmflow.pipeline.utils.peft_trainer.PeftSavingCallback[source]#
Bases:
transformers.trainer_callback.TrainerCallback
Correctly save PEFT model and not full model
- on_train_end(args: transformers.training_args.TrainingArguments, state: transformers.trainer_callback.TrainerState, control: transformers.trainer_callback.TrainerControl, **kwargs)[source]#
Save final best model adapter