You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Quantized model.save(**kwargs) silently drops every extra keyword (max_shard_sise typo, safe_serialization=False, push_to_hub=True all 'succeed'); embeddings save path also drops eora_path/split_by #4686
BaseQModel.save(save_dir, ..., split_by=None, **kwargs) (gptqmodel/models/base.py:3330-3338) forwards **kwargs only on the non-quantized branch (self.save_pretrained(save_dir=save_dir, **kwargs), base.py:3378). For a quantized model, the normal case, every extra keyword is silently discarded (base.py:3361-3367). That covers typos of real parameters and HF-style options that callers reasonably expect to work. Nothing raises and nothing is logged.
The model-free weight-only replacement branch (save_quantized_embeddings, base.py:3353-3359) also silently drops two of save()'s own named parameters, eora_path and split_by.
{'max_shard_sise': '20MB'} OK files: ['model.safetensors']
{'push_to_hub': True, 'repo_id': 'nonexistent/xyz'} OK files: ['model.safetensors']
{'safe_serialization': False} OK files: ['model.safetensors']
{'max_shard_size': '20MB'} OK files: ['model-00001-of-00002.safetensors', 'model-00002-of-00002.safetensors', 'model.safetensors.index.json']
push_to_hub=True returning successfully without uploading anything is the worst case. A CI job that "publishes" the checkpoint reports success.
This is the save-side counterpart of #4052 / #4057, which made QuantizeConfig(...) reject unknown kwargs with a close-match hint because silently dropped typos were treated as bugs.
Suggested fix
On the quantized branch, raise TypeError for any key left in kwargs, with a difflib close-match hint as in _validate_quantize_config_factory_kwargs. Alternatively, give save() an explicit signature and keep **kwargs only for the dense save_pretrained path. Forward eora_path/split_by to save_quantized_embeddings, or reject them there.
Severity
Low to medium: silent no-op options on the main save API, including a silent no-op push_to_hub.
Claimed. Will reject leftover **kwargs on the quantized save branch with a difflib close-match hint (same treatment as QuantizeConfig kwargs in #4057), and forward eora_path/split_by to save_quantized_embeddings instead of dropping them. Fix PR to follow.
Activity
Qubitium commentedon Nov 17, 2026
Claimed. Will reject leftover
**kwargson the quantized save branch with a difflib close-match hint (same treatment asQuantizeConfigkwargs in #4057), and forwardeora_path/split_bytosave_quantized_embeddingsinstead of dropping them. Fix PR to follow.fix(save): reject unknown `save()` keywords on the quantized path (Mo…
fix(load): reject unknown kwargs and a dropped quantize_config on qua…