Skip to content

Commit

Permalink
do not export config.key is value is None (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qubitium authored Jan 31, 2025
1 parent 9c59a1c commit a4cb9bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gptqmodel/quantization/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ def to_dict(self):
PACK_DTYPE_FIELD: str(self.pack_dtype).split(".")[-1],
META_FIELD: self.meta,
}

# simplify: clean keys where the value is None
out = {k: v for k, v in out.items() if v is not None}

dict_scale_dtype_to_str(out)
return out

Expand Down

0 comments on commit a4cb9bc

Please sign in to comment.