Skip to content

[OpenVINO] NNCF Data-Aware Compression Algorithms Support for OVQuantizer#16002

Merged
mergennachin merged 25 commits intopytorch:mainfrom
anzr299:an/openvino/nncf_compress_pt2e
Feb 25, 2026
Merged

[OpenVINO] NNCF Data-Aware Compression Algorithms Support for OVQuantizer#16002
mergennachin merged 25 commits intopytorch:mainfrom
anzr299:an/openvino/nncf_compress_pt2e

Conversation

@anzr299
Copy link
Contributor

@anzr299 anzr299 commented Nov 27, 2025

Summary

This PR introduces the use of nncf.compress_pt2e() API which allows users to pass a quantizer object which is compatible with the Torch AO Quantizers API and the Torch FX model. It then returns the model with weights only compression applied to it along with additional algorithms that can be applied from NNCF like AWQ, Scale Estimation, etc.

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 27, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16002

Note: Links to docs will display an error until the docs builds have been completed.

❌ 6 New Failures

As of commit 0c82495 with merge base 1550f0c (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 27, 2025
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@anzr299 anzr299 marked this pull request as ready for review January 8, 2026 14:44
@anzr299 anzr299 requested a review from larryliu0820 as a code owner January 8, 2026 14:44
Copilot AI review requested due to automatic review settings January 8, 2026 14:44
@anzr299 anzr299 marked this pull request as draft January 8, 2026 14:45
Copy link
Contributor

Copilot AI left a comment

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 adds support for NNCF data-aware compression algorithms (AWQ and Scale Estimation) to the OpenVINO quantizer. It refactors the quantizer configuration to enable more flexible compression options and introduces a new compression module for LLM calibration.

Key changes:

  • Replaces the boolean nncf_compression field with two specific algorithm flags: openvino_awq and openvino_scale_estimation
  • Refactors WEIGHTS_ONLY_COMPRESSION_MODES from a tuple to a dictionary for cleaner mode mapping
  • Adds new methods to expose weight compression configuration and parameters
  • Introduces apply_nncf_data_aware_compression function for data-aware LLM compression
  • Updates NNCF dependency to use the latest version instead of a specific commit

Reviewed changes

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

Show a summary per file
File Description
extension/llm/export/config/llm_config.py Replaces nncf_compression with openvino_awq and openvino_scale_estimation configuration fields
examples/models/llama/export_llama_lib.py Adds CLI arguments for AWQ and scale estimation, integrates new compression function
backends/openvino/requirements.txt Updates NNCF dependency to use latest version from main branch
backends/openvino/quantizer/quantizer.py Refactors compression modes mapping, adds new methods for weight compression config exposure, adds check for null compression configs
backends/openvino/quantizer/llm_compression.py New file implementing data-aware compression with calibration data generation
backends/openvino/quantizer/init.py Exports new apply_nncf_data_aware_compression function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@anzr299 anzr299 marked this pull request as ready for review January 13, 2026 12:49
Copilot AI review requested due to automatic review settings January 13, 2026 12:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 13, 2026 13:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 13, 2026 13:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 15, 2026 08:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

extension/llm/export/config/llm_config.py:459

  • The docstring incorrectly states 'Configures the QNN backend' when this is the OpenvinoConfig class. It should say 'Configures the OpenVINO backend.'
    """
    Configures the QNN backend.
    """

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 16, 2026 16:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 16, 2026 17:50
Copilot AI review requested due to automatic review settings January 22, 2026 12:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 4, 2026 07:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 6, 2026 13:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 24, 2026 14:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@anzr299
Copy link
Contributor Author

anzr299 commented Feb 24, 2026

@mergennachin the new version of nncf is released and I have updated the requirements.txt accordingly

@mergennachin mergennachin merged commit b9c3217 into pytorch:main Feb 25, 2026
238 of 249 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants