Skip to content

Commit be62d32

Browse files
committed
Fix name parsing for int8 smoothquant model detection
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
1 parent 04d84fe commit be62d32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ def select_int8_module(
394394

395395
if args.int8_smoothquant:
396396
# TODO: consider saving this info into config during quantization
397-
if any("granite" in p for p in [args.model_path, args.architecture]):
397+
if any("granite" in p.lower() for p in [args.model_path, args.architecture]):
398398
smoothquant_layers = ["key", "value", "w1", "wg"]
399-
elif any("roberta" in p for p in [args.model_path, args.architecture]):
399+
elif any("roberta" in p.lower() for p in [args.model_path, args.architecture]):
400400
smoothquant_layers = ["query", "key", "value", "w1"]
401401
else:
402402
raise NotImplementedError(

0 commit comments

Comments
 (0)