Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 304308d

Browse files
committed
Bug fix: Enable fast to override quantize json
1 parent 4697764 commit 304308d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torchchat/cli/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,15 +533,16 @@ def arg_init(args):
533533
# Localized import to minimize expensive imports
534534
from torchchat.utils.build_utils import get_device_str
535535

536-
if args.device is None or args.device == "fast":
536+
if args.device is None:
537537
args.device = get_device_str(
538538
args.quantize.get("executor", {}).get("accelerator", default_device)
539539
)
540540
else:
541+
args.device = get_device_str(args.device)
541542
executor_handler = args.quantize.get("executor", None)
542543
if executor_handler:
543544
if executor_handler["accelerator"] != args.device:
544-
print('overriding json-specified device {executor_handler["accelerator"]} with cli device {args.device}')
545+
print(f'overriding json-specified device {executor_handler["accelerator"]} with cli device {args.device}')
545546
executor_handler["accelerator"] = args.device
546547

547548
if "mps" in args.device:

0 commit comments

Comments
 (0)