Skip to content

[Bug Fix] Fix Aggregator For HAWQ Sensitivity Metric#4106

Open
anzr299 wants to merge 5 commits into
openvinotoolkit:developfrom
anzr299:an/hawq_fix
Open

[Bug Fix] Fix Aggregator For HAWQ Sensitivity Metric#4106
anzr299 wants to merge 5 commits into
openvinotoolkit:developfrom
anzr299:an/hawq_fix

Conversation

@anzr299

@anzr299 anzr299 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Changes

Change the formula for HAWQ aggregator

Reason for changes

Possibly not the right method.

Related tickets

186588

Tests

Ratio: 0.5; INT4_ASYM; GS128

Model Variant Strict Flexible Size
Qwen3-8B buggy 84.91% 85.22% 6.665 GB
Qwen3-8B fixed 85.82% 86.28% 6.663 GB
Qwen3-0.6B buggy 29.57% 29.64% 0.500 GB
Qwen3-0.6B fixed 31.84% 31.84% 0.500 GB
Llama-3.1-8B buggy 72.10% 73.09% 6.503 GB
Llama-3.1-8B fixed 72.63% 73.46% 6.503 GB
Llama-3.2-3B buggy 57.62% 63.61% 2.594 GB
Llama-3.2-3B fixed 57.62% 63.61% 2.594 GB
Gemma4-E4B buggy 61.79% 60.96% 6.650 GB
Gemma4-E4B fixed 61.94% 61.18% 6.650 GB

@github-actions github-actions Bot added the NNCF Common Pull request that updates NNCF Common label Jun 18, 2026
@anzr299 anzr299 marked this pull request as ready for review June 18, 2026 07:06
@anzr299 anzr299 requested a review from a team as a code owner June 18, 2026 07:06
Copilot AI review requested due to automatic review settings June 18, 2026 07:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the HAWQ sensitivity metric aggregator in NNCF to use a corrected accumulation formula, and adjusts the unit test reference values accordingly.

Changes:

  • Fix HAWQ aggregation to accumulate a per-tensor normalized squared-sum instead of repeatedly renormalizing the running container.
  • Update unit test reference outputs for the HAWQ aggregator to match the new formula.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/nncf/common/tensor_statistics/collectors.py Adjusts HAWQAggregator accumulation logic (but needs a reset() override to avoid breaking reuse after TensorCollector.reset()).
tests/common/test_reducers_and_aggregators.py Updates expected HAWQ aggregator outputs (and should add reset/reuse coverage).

Comment thread src/nncf/common/tensor_statistics/collectors.py
Comment thread tests/common/test_reducers_and_aggregators.py
Comment thread src/nncf/common/tensor_statistics/collectors.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NNCF Common Pull request that updates NNCF Common

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants