Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Support activation-only scale search for PyTorch AWQ calibration

オープン
#2,674 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@meenchen がすでに取り組んでいます。

2026年10月6日 から。

  • #2675 @thuiaaa による — オープン

評価

この 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/Model-Optimizer のほかの issue

NVIDIA/Model-Optimizer の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。