We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1218e5a commit 74a6aeeCopy full SHA for 74a6aee
examples/models/llama/source_transformation/quantize.py
@@ -107,6 +107,12 @@ def quantize( # noqa C901
107
print("quantized model:", model)
108
return model
109
elif qmode.startswith("torchao:8da"):
110
+ # Check for required args
111
+ if group_size is None:
112
+ raise Exception(
113
+ "For torchao:8daxw quantization, group size must be specified."
114
+ )
115
+
116
pattern = r"torchao:8da(\d+)w"
117
matches = re.findall(pattern, qmode)
118
assert len(matches) == 1, f"Expected 1 match for pattern but got {len(matches)}"
0 commit comments