Skip to content

Enabled data-aware methods for int2-3.#4131

Open
andreyanufr wants to merge 1 commit into
openvinotoolkit:developfrom
andreyanufr:aanuf/enable_data_aware_methods_for_int2_int3
Open

Enabled data-aware methods for int2-3.#4131
andreyanufr wants to merge 1 commit into
openvinotoolkit:developfrom
andreyanufr:aanuf/enable_data_aware_methods_for_int2_int3

Conversation

@andreyanufr

Copy link
Copy Markdown
Collaborator

Changes

Enabled data-aware methods for all bits <= 4.

@andreyanufr andreyanufr requested a review from a team as a code owner July 10, 2026 11:04
Copilot AI review requested due to automatic review settings July 10, 2026 11:04

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

Enables data-aware weight compression helpers (scale estimation, AWQ data collection, GPTQ scale estimation path, and LoRA correction applicability) for low-bitwidth modes below INT4 (INT2/INT3), aligning behavior with the intent of supporting all modes with bitwidth <= 4.

Changes:

  • Broadened scale-estimation gating from INT4-only to num_bits <= 4 in Scale Estimation, AWQ, and GPTQ paths.
  • Enabled LoRA correction for INT2/INT3 and extended integer dequantization handling for these modes.
  • Updated mode checks to include INT2/INT3 where needed.

Reviewed changes

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

File Description
src/nncf/quantization/algorithms/weight_compression/scale_estimation.py Allows scale estimation to run for integer modes with num_bits <= 4 instead of INT4-only.
src/nncf/quantization/algorithms/weight_compression/lora_correction.py Enables LoRA correction for INT2/INT3 and expands supported integer modes in the low-rank computation path.
src/nncf/quantization/algorithms/weight_compression/gptq.py Extends GPTQ’s optional scale-estimation path to run for num_bits <= 4.
src/nncf/quantization/algorithms/weight_compression/awq.py Extends AWQ data collection to include modes with num_bits <= 4 (instead of INT4-only).

Comment on lines 105 to +106
def is_applicable(self, wc_params: WeightCompressionParameters):
return wc_params.compression_config.num_bits == 4
return wc_params.compression_config.num_bits <= 4
Comment on lines 169 to +173
mode = compression_config.mode
assert len(reduction_axes) == 1, "Assumed a single reduction axis"
reduction_axis = reduction_axes[0] if compression_config.group_size != -1 else -1
if mode in (CompressWeightsMode.INT4_SYM, CompressWeightsMode.INT4_ASYM):
if mode in (
CompressWeightsMode.INT4_SYM,
Comment on lines 105 to +106
def is_applicable(self, wc_params: WeightCompressionParameters):
return wc_params.compression_config.num_bits == 4
return wc_params.compression_config.num_bits <= 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants