bugfix: propage weight key_mapping to peft to fix 3.52 VLM renaming (#38627)

* propage key mapping to peft

* propage key mapping to peft

* make requested changes

* revert
This commit is contained in:
Manuel Faysse
2025-06-16 10:10:23 +02:00
committed by GitHub
parent 925da8ac56
commit ce6ac53ac1
2 changed files with 10 additions and 0 deletions

View File

@@ -4778,6 +4778,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, PushToHubMixin, PeftAdapterMi
model.hf_quantizer = hf_quantizer
if _adapter_model_path is not None:
adapter_kwargs["key_mapping"] = key_mapping
model.load_adapter(
_adapter_model_path,
adapter_name=adapter_name,