Support activation-only scale search for PyTorch AWQ calibration
メンテナーはふだん 2 日以内に返信
評価
この issue はまだ評価されていません。
説明
Detailed description of the requested feature
Please add an activation-only scale-search option to the PyTorch PTQ AWQ calibration algorithms (at least awq_lite, and therefore awq_full).
The current get_scale implementation searches per-input-channel scales proportional to act_scale ** alpha / weight_scale ** (1 - alpha):
https://github.com/NVIDIA/Model-Optimizer/blob/9f902aefd/modelopt/torch/quantization/model_calib.py#L1481-L1494
Equation (5) of the AWQ paper instead defines the search space as s = s_X ** alpha, where s_X is the mean activation magnitude per input channel:
https://arxiv.org/html/2306.00978v6
The paper authors' current implementation also uses activation-only scaling:
https://github.com/mit-han-lab/llm-awq/blob/main/awq/quantize/auto_scale.py#L119-L125
For historical context, the authors' initial repository commit included a weight term, which was removed in a later commit:
https://github.com/mit-han-lab/llm-awq/commit/02c1dd657d1e
AutoAWQ subsequently added activation-only scaling as an optional mode (duo_scaling=False) in PR #216 while retaining its existing weight-and-activation mode as the default:
https://github.com/casper-hansen/AutoAWQ/pull/216
That PR reported lower WikiText perplexity for Qwen 7B Chat with activation-only scaling (10.224 to 9.949), while the results for Mistral 7B Instruct and Llama 2 7B Chat were approximately unchanged or slightly mixed. This is evidence that the choice can matter by model, not a claim that activation-only scaling is universally better.
Could ModelOpt expose a configuration option for the paper's activation-only search space, alongside the current formula? A backward-compatible default would preserve existing quantization behavior. It would help users reproduce the paper's scale search and compare both methods on their target models.
Timeline
No fixed deadline. This would enable paper-aligned AWQ experiments and model-specific accuracy comparisons.
Describe alternatives you've considered
AutoAWQ exposes duo_scaling=False, but using a separate quantization library does not provide this option within ModelOpt's existing PTQ and export workflows. Replacing ModelOpt's current formula unconditionally could change existing results, so a configurable choice seems preferable.
Target hardware/use case
PyTorch PTQ for LLM weight-only INT4 AWQ (W4A16), including INT4_AWQ_CFG; the same option may also be relevant to other ModelOpt AWQ formats that use the shared scale search.
- 主要言語
- Python
- スター
- 5.3k
- フォーク
- 745
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 160
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/Model-Optimizer のほかの issue
-
[Bug] modelopt-mcp: all launcher subprocesses hang when the server runs as a stdio MCP server — missing stdin=DEVNULL対応中かも @ChenhanYu が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NVIDIA/Model-Optimizer#2551 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Puzzletron Progress 6/8 (calculating one block scores) takes 10 to 20 times more than in tutorial再び着手できるかも @tejasng053 が 20 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NVIDIA/Model-Optimizer#1667 ·
メンテナーはふだん 2 日以内に返信
-
fp4_kernel_hopper.py uses tl.make_block_ptr, which is removed in Triton main (breaks NVFP4 fake quant)対応中かも @kinjalpatel27 が今日担当しました。 オープン
難易度 3/5 半日 初心者へのやさしさ 72/100
NVIDIA/Model-Optimizer#2810 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
test_cast_fp4_impl_gpu_mem is flaky on Jetson Thor: mem_get_info reports system-wide memory on integrated GPUs対応中かも @LinCanNerd が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
NVIDIA/Model-Optimizer#2706 ·
メンテナーはふだん 2 日以内に返信
-
test_cuda_pack_reconstruction_matches_pytorch_at_scale[iq1_m] fails on Jetson Thor: exact ties exceed the blocks // 1000 bound対応中かも @LinCanNerd が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
NVIDIA/Model-Optimizer#2705 ·
メンテナーはふだん 2 日以内に返信
NVIDIA/Model-Optimizer の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
huggingface/sentence-transformers#4186 ·
メンテナーはふだん 5 日以内に返信
-
documentation good first issue
難易度 2/5 半日 初心者へのやさしさ 72/100
sujithputta02/Esapay#13 ·
-
bot-triaged module: correctness (silent) module: mps module: NaNs and Infs triage review
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
SCIInstitute/SCIRun#2842 ·
メンテナーはふだん 3 日以内に返信