System Info To train a model with gradient checkpointing and DDP, the model should have no unused parameters and the HF trainer's ddp_find_unused_parameters argument should be set to False. However, peft's modules_to_save functionality c...
class SavePeftModelCallback(transformers.TrainerCallback): def save_model(self, args, state, kwargs): if state.best_model_checkpoint is not None: checkpoint_folder = os.path.join(state.best_model_checkpoint, "pt_lora_model") else: checkpoint_folder = os.path.join(args.output_dir, f"{PRE...
Currently when using the low-level API of PEFT, themodules_to_savegets silently ignored. The PR addressed that. cc@BenjaminBossan@pacman100 Will also test the integration tests and add corresponding tests on transformers once we release a PEFT version with it...