Skip to content

Fix GPTQ Hessian coordinates after AWQ smoothing. - #2401

Draft
sarahpardo wants to merge 1 commit into
NVIDIA:mainfrom
sarahpardo:fix/gptq-awq-hessian-coordinates
Draft

Fix GPTQ Hessian coordinates after AWQ smoothing.#2401
sarahpardo wants to merge 1 commit into
NVIDIA:mainfrom
sarahpardo:fix/gptq-awq-hessian-coordinates

Conversation

@sarahpardo

Copy link
Copy Markdown

What does this PR do?

Type of change: Bug fix

GPTQ previously bypassed disabled input quantizers while collecting
Hessians. Weight-only AWQ disables input quantization but retains a
pre-quant scale that transforms inputs before the linear operation.
Consequently, an AWQ→GPTQ chain collected the Hessian in the original
input coordinates while GPTQ operated on AWQ-smoothed weights.

This change always passes Hessian inputs through the input quantizer when
one exists. A disabled quantizer without transforms remains an identity,
while AWQ pre-quant scaling is now correctly represented.

Usage

No API changes.

Testing

Added an end-to-end AWQ→GPTQ regression test that verifies the Hessian
matches the transformed input coordinates and differs from the raw-input
Hessian.

Tested with:
pytest tests/gpu/torch/quantization/test_gptq.py

Before your PR is "Ready for review"

Make sure you read and follow Contributor guidelines and your commits are signed (git commit -s -S).

Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded trust_remote_code=True, torch.load(..., weights_only=False), pickle, etc.).

  • Is this change backward compatible?: ✅
  • If you copied code from any other sources or added a new PIP dependency, did you follow guidance in CONTRIBUTING.md: N/A
  • Did you write any new necessary tests?: ✅
  • Did you update Changelog?: N/A
  • Did you get Claude approval on this PR?: N/A

Signed-off-by: Sarah Pardo <spardo@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant