Skip to content

Commit 586766f

Browse files
committed
Bug fix for AutoQuantize: Add None quantization by default
Signed-off-by: realAsma <[email protected]>
1 parent 682bf6d commit 586766f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

modelopt/torch/quantization/algorithms.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,13 @@ def _is_auto_quantize_module(module):
302302
@staticmethod
303303
def _get_search_recipes(quantization_formats):
304304
return sorted(
305-
[
306-
QuantRecipe(quant_cfg=q, quant_format_idx=i)
307-
for i, q in enumerate(quantization_formats)
308-
]
305+
set(
306+
[
307+
QuantRecipe(quant_cfg=q, quant_format_idx=i)
308+
for i, q in enumerate(quantization_formats)
309+
]
310+
+ [QuantRecipe(quant_cfg=None, quant_format_idx=None)]
311+
)
309312
)
310313

311314
@classmethod

0 commit comments

Comments
 (0)