pypi / nncf
nncf
What changed in nncf 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
36 breaking7 deprecations27 new APIs and options4 performance8 behavior and defaults1 tooling21 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initnncf 359 changes
Breaking changes 22
Removed the unused PyTorch CompressionParameter class.
Removed the unused NNCFDataLoader class.
Removed the unused PyTorch patch_torch_operators function.
Removed the unused PyTorch PTInitializingDataLoader.
Removed the unused QuantizationStatistics class.
Removed the unused QuantizersCounter class.
Removed the unused PyTorch register_module function.
Removed the unused Statistics class.
The deprecated INT8 mode has been removed; use INT8_SYM or INT8_ASYM instead.
PyTorch PTQ and Weight Compression algorithms remove no-op operations such as to and dropout from the inference graph.
The unused example_input parameter has been removed.
OVQuantizer has been removed from NNCF; use it from the executorch package instead.
The unused ProgressBar class has been removed.
pandas is now an optional dependency.
The unused pillow dependency was removed.
PyTorch support migrated to torchao instead of deprecated torch.ao.
The legacy PyTorch API, previously marked as deprecated, has been removed.
Hardware configuration now uses Python-style definitions instead of JSON files.
Removed legacy PyTorch algorithms based on NNCFNetwork: NAS, Structural Pruning, AutoML, Knowledge Distillation, Mixed-Precision Quantization, and Movement Sparsity.
The compression mode previously named CB4_F8E4M3 is now named CB4.
This mode option was renamed to CB4.
Support for the TensorFlow backend has been removed.
New APIs and options 15
AWQ and Scale Estimation support GroupedMatMul, enabling data-aware weight compression of grouped_mm-based MoE models.
Added OpenVINO GroupedMatMul operation support for data-free weight compression.
Added INT2 symmetric compression type support for OpenVINO.
Added INT3 symmetric compression type support for OpenVINO.
Can now ignore specific weight nodes by constant node name in nncf.compress_weights and nncf.prune.
The Scale Estimation algorithm supports the transpose_a attribute in ONNX and OpenVINO backends.
FP compression formats can use a backup FP format for first and last layers instead of INT8.
Weight Compression adds NVFP4 as a compression data type, using group size 16 and scales compressed to f8e4m3.
TorchFX backend graph building supports TopK operations, enabling correct graph building for models such as YOLO26.
AWQ, Scale Estimation, and GPTQ now support compression of 3D weights, enabling data-aware compression of models with MoE.
OpenVINO adds an experimental compression data type that calculates a unique codebook for each MatMul or block of identical MatMuls, reducing quality degradation with per-channel weight compression.
Preview support enables quantization of torch.fx.GraphModule models with OpenVINOQuantizer, including ExecuTorch models for the OpenVINO backend using Scale Estimation and AWQ.
The PyTorch algorithm now supports linear functions to improve model accuracy after quantization.
Builds an NNCFGraph from a model, allowing developers to inspect and define the ignored scope.
A unified API for pruning algorithms is available for the PyTorch backend and currently supports Magnitude Pruning.
Performance 1
The nncf.torch module is imported lazily to reduce startup import time.
Behavior and default changes 4
The ignored pattern recognizes the matmul → transpose → cos/sin structure used by models such as GPT-OSS.
AWQ, GPTQ, Scale Estimation, and LoRA Correction are enabled for all bit widths below 4, including INT2 and INT3.
Added FP8 support for the ONNX backend.
Data-free Weight Compression and data-aware AWQ now support models containing MatMul operations with transposed activation inputs.
Tooling 1
An OpenVINO tool is available to collect and visualize tensor statistics.
Fixes and other changes 16
Fixes a KeyError when resolving a bias attribute for a tensor that is a model input and has no parent node.
The node following split-like operations such as chunk is removed from the TorchFX inference graph, fixing statistic collection errors for models such as YOLO11.
Fixes squeeze axis determination for ONNXEmbeddingMetatype nodes.
Fixed the compression range when all weight values are positive or all are negative.
Fixed the aggregator formula used in mixed-precision weight compression.
Weight serialization supports safetensors >= 0.8.0 by converting NumPy scalars to arrays before saving.
Scale Estimation now properly handles zero initial_steps and scale_steps.
Serialized config now saves the module path, improving load_from_config reliability.
Fixed unexpected behavior when loading quantization constraints from a config dictionary.
Prevents capture of nodes that do not affect target outputs.
Scale estimation for Adaptive Codebook weight compression is fixed.
Fixed an ONNX error reporting that there is no tensor with the specified name.
NNCFGraph supports models with parallel or multi-edges, enabling correct quantization of complex graph structures.
The ignored pattern handles RoPe operations without a preceding transpose, including the pattern in Phi-3.5-MoE-instruct.
The transformation no longer leaves names of deleted initializers in graph inputs.
Fixed incorrect insertion of MatMulNBits nodes in ONNX.
nncf 245 changes
Breaking changes 14
Weight compression now raises an error when a layer's channel size is not divisible by group size; users can choose another group size or use GroupSizeFallbackMode.ADJUST.
The OpenVINO compression mode previously named E2M1 is now named MXFP4.
The ONNX backend parameter now defaults to True, enabling folding QuantizeLinear nodes with constant inputs into precomputed quantized initializers.
Support for Python 3.9 has been dropped.
The updated PyTorch requirement is 2.9.0.
The updated Torchvision requirement is 0.24.0.
CompressionLevel has been renamed to CompressionStage.
ignored_scopes no longer supports prefix matching; use regular expressions when matching beyond exact names.
The batchnorm adaptation forgetting step and its num_bn_forget_steps configuration parameter have been removed because the step was observed to degrade accuracy.
Installing nncf no longer installs framework-specific requirements; install them with pip extras such as nncf[tf] or nncf[torch].
Installing with setup.py no longer installs framework-specific requirements; these are assumed to be present in the environment.
The quantizable_subgraph_patterns NNCF configuration option has been removed.
PyTorch configs can no longer use the version-agnostic all-caps RELU operation name; specify an exact function name such as relu or relu_.
target_scopes no longer supports prefix matching; use regular expressions when matching beyond exact names.
Deprecations 7
The experimental AutoML method is deprecated and will be removed in future releases.
The experimental Knowledge Distillation method is deprecated and will be removed in future releases.
The experimental Mixed-Precision Quantization method is deprecated and will be removed in future releases.
The experimental Movement Sparsity method is deprecated and will be removed in future releases.
The experimental NAS method is deprecated and will be removed in future releases.
The experimental Structural Pruning method is deprecated and will be removed in future releases.
The TensorFlow backend is deprecated and will be removed in future releases; the notes recommend PyTorch, OpenVINO IR, and ONNX alternatives for the specified optimization methods.
New APIs and options 12
Adds experimental OpenVINO compression modes for MXFP8, FP8, and FP4 precisions.
Activates a histogram-based range estimator that minimizes L2 error of histogram bin quantization.
The ONNX backend now supports SmoothQuant for INT8 quantization.
Accuracy-aware training is available for filter pruning and sparsity to automate compression within a specified accuracy-drop threshold.
Compression methods now have a common interface across the PyTorch and TensorFlow backends.
PyTorch NNCF configuration can specify an effective learning-rate multiplier for trainable compression-algorithm parameters, controlling their tuning rate relative to FP32 model weights.
Compressed TensorFlow models can be exported in Frozen Graph format for use with OpenVINO.
Experimental PyTorch knowledge distillation can be combined with any compression algorithm to add a loss source against the uncompressed model.
An experimental PyTorch filter-pruning mechanism aims for better pruning ratios with less accuracy drop across a broad range of models.
Compressed TensorFlow models can be exported in SavedModel format for use with OpenVINO.
NNCF can now compress supported Keras Sequential and Functional models with quantization, sparsity, and filter pruning, and transform their graphs automatically.
TensorFlow compression supports distributed training across multiple GPUs on one machine using MirroredStrategy.
Performance 3
Peak memory footprint has been reduced.
OpenVINO model compression to MXFP4 is up to 3x faster and uses up to 1.5x less memory.
Maximum memory consumption is reduced by releasing model output memory before the next statistic collection inference call.
Behavior and default changes 4
The ONNX algorithm now applies to MatMul + Add subgraphs when one Add input is constant.
For StripFormat.IN_PLACE, example_input is no longer required.
The table now displays the group size for each compression data type.
NNCF checkpoints now include compression state, allowing the exact compressed model state to be restored without the original NNCF config file.
Fixes and other changes 5
Fixed ONNX INT4 weight compression when transB=1.
Fixed incorrect ONNX input handling that could cause graph breaks.
Fixed a hang when applying batchnorm adaptation in PyTorch DDP mode.
PyTorch per-tensor quantizers affecting concat operations now use identical scales, allowing concatenated tensors to represent their subcomponents without accuracy loss.
Fixed tracing of operations that return NotImplemented in PyTorch.