Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

hf_ptq.py: deprecated --auto_quantize_bits CLI flag silently no-ops instead of enabling AutoQuantize

Đang mở
#2,230 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@meenchen đang làm issue này rồi.

Từ ngày 24/8/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Description

examples/hf_ptq/hf_ptq.py's deprecated --auto_quantize_bits CLI flag (and its siblings --auto_quantize_method, --auto_quantize_score_size, --auto_quantize_cost_model, --auto_quantize_active_moe_expert_ratio) is documented as still enabling the AutoQuantize CLI path via a conversion shim:

# Deprecated AutoQuantize CLI flags: kept as a backward-compat shim that converts them into an
# AutoQuantizeConfig on the fly (see _auto_quantize_config_from_cli). Prefer --recipe. The old
# CLI also lives on the 0.45 branch.
parser.add_argument(
    "--auto_quantize_bits",
    ...
)

_auto_quantize_config_from_cli does not exist anywhere in the file (or the repo). quantize_main() only enables AutoQuantize by checking whether --recipe resolves to a ModelOptAutoQuantizeRecipe; args.auto_quantize_bits is never read in the actual quantization path.

Effect: a legacy command still relying on --auto_quantize_bits (e.g. carried over from the 0.45 branch's CLI) silently runs plain PTQ instead of AutoQuantize, with no warning or error pointing back at the cause.

Fix

Fixed in #2129 by rejecting --auto_quantize_bits at parse_args() instead of letting it silently no-op, pointing users at an AutoQuantize --recipe.

Found via a CodeRabbit review comment on that PR.

Ngôn ngữ chính
Python
Star
5.3k
Fork
745
Merge trung bình
4 ngày 2 giờ
Pull request đã merge (30 ngày)
160

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/Model-Optimizer

Tất cả issue của NVIDIA/Model-Optimizer

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.