Update modeling_utils.py

This commit is contained in:
Cyril Vallez 2025-02-05 13:53:54 +01:00
parent 11e378024d
commit a6ffd7b4d2
No known key found for this signature in database

View file

@ -4757,7 +4757,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
# they are not in the loaded state dict)
if low_cpu_mem_usage:
model = move_missing_keys_back_to_cpu(
model, missing_keys, unexpected_keys, dtype, keep_in_fp32_modules, is_quantized, hf_quantizer
model, missing_keys, unexpected_keys, dtype, keep_in_fp32_modules, hf_quantizer
)
# correctly initialize the missing keys