Skip to content

Commit d115625

Browse files
authored
TypeHint Optional/Union should accept type vars and not actual type values. Breaks Python 3.10 but not Python 3.12. (#1213)
1 parent c0a0af1 commit d115625

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gptqmodel/quantization/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class QuantizeConfig():
176176
# gptq was originally designed to pack quantized weights inside INT32 dtypes
177177
# allowing using different dtypes used for packing quantized weights
178178
# affects [`qweights`, `qzeros`]
179-
pack_dtype: Optional[Union[str, torch.int64, torch.int32, torch.int16, torch.int8]] = field(default=torch.int32)
179+
pack_dtype: Optional[Union[str, torch.dtype]] = field(default=torch.int32)
180180

181181
def __post_init__(self):
182182
fields_info = fields(self)

0 commit comments

Comments
 (0)