Skip to content

Commit b50a5ca

Browse files
MekkCyberzucchini-nlp
authored andcommitted
Fix Compressed tensors to_dict_diff (huggingface#36922)
fix
1 parent 7dab4ff commit b50a5ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/utils/quantization_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ def to_diff_dict(self) -> Dict[str, Any]:
13601360

13611361
# only serialize values that differ from the default config
13621362
for key, value in config_dict.items():
1363-
if value != default_config_dict[key]:
1363+
if key not in default_config_dict or value != default_config_dict[key]:
13641364
serializable_config_dict[key] = value
13651365

13661366
return serializable_config_dict

0 commit comments

Comments
 (0)