Pass state dict (#35234)

* Pass state_dict argument to get_peft_model_state_dict

* Style fix

* Change arguments order
This commit is contained in:
Artem Kudisov
2025-03-20 13:54:59 +03:00
committed by GitHub
parent 957b05b413
commit 63380b77d4
2 changed files with 7 additions and 3 deletions

View File

@@ -3359,7 +3359,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
logger.info(
"Detected adapters on the model, saving the model in the PEFT format, only adapter weights will be saved."
)
state_dict = model_to_save.get_adapter_state_dict()
state_dict = model_to_save.get_adapter_state_dict(state_dict=state_dict)
if save_peft_format:
logger.info(