nncf
Neural Networks Compression Framework
Decision gist · record as of 2026-08-14
Yes. NNCF is actively maintained, has no known vulnerabilities, installs with low friction, and is widely adopted in production ecosystems (HuggingFace, Ultralytics, ExecuTorch, torch.compile). Choose it if you need to compress models for inference optimization across PyTorch, ONNX, or OpenVINO. Requires Python 3.10+; verify backend-specific system requirements for your target framework.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; backend-specific system requirements depend on whether you use PyTorch, ONNX, or OpenVINO models.
- Low friction install as a pure Python wheel.
- Active maintenance with a recent release (9 days old) and steady repository activity.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
last release 2026-08-05 (9 days) · last repo commit 2026-08-14 · 1,189 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,297,270 downloads/mo, #4,091 on PyPI
Alternatives
Verify before relying
pip install nncf
import nncf
from nncf import compress_model
# Compress a model loaded from PyTorch, ONNX, or OpenVINO- Specific accuracy drop ranges for different compression algorithms and model types.
- Performance benchmarks (inference speedup, model size reduction) for representative models.
- GPU memory requirements for training-time compression with distributed training.
- Compatibility matrix details between NNCF version 3.3.0 and specific PyTorch/ONNX/OpenVINO versions.
What it is and what it does
NNCF is a framework for compressing neural networks to reduce inference latency and model size. It implements post-training algorithms (quantization, weight compression, activation sparsity) and training-time methods (quantization-aware training, pruning, weight-only quantization with LoRA). The framework works with PyTorch, TorchFX, ONNX, and OpenVINO models, offering a unified Python API for model graph transformation and compression.
The package is designed for practitioners who need to optimize models for deployment on resource-constrained devices or edge hardware. It integrates into third-party ecosystems including HuggingFace Optimum Intel, Ultralytics, ExecuTorch, and torch.compile, making it accessible within existing training and export pipelines. Runtime dependencies include networkx, numpy, scikit-learn, scipy, and visualization tools like pydot and rich.
Use it for
- Quantize large language models (e.g., Llama) to INT4 weights for efficient OpenVINO deployment via HuggingFace Optimum.
- Apply post-training quantization to ONNX models without retraining to reduce inference latency.
- Fine-tune PyTorch models with quantization-aware training to maintain accuracy while reducing model size.
- Prune and sparsify neural networks during training to accelerate inference on edge devices.
- Export PyTorch models to OpenVINO format with INT4-quantized weights for production deployment.
- Integrate compression into custom training pipelines via the unified NNCF API and Git patch examples.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
NNCF is actively maintained, has no known vulnerabilities, installs with low friction, and is widely adopted in production ecosystems (HuggingFace, Ultralytics, ExecuTorch, torch.compile). Choose it if you need to compress models for inference optimization across PyTorch, ONNX, or OpenVINO. Requires Python 3.10+; verify backend-specific system requirements for your target framework.
Install
nncf on PyPI
Before you install
Low friction install as a pure Python wheel. Active maintenance with a recent release (9 days old) and steady repository activity. Requires Python 3.10 or later and pulls in 12 runtime dependencies including numpy, scikit-learn, and scipy.
Requires Python 3.10 or later; backend-specific system requirements depend on whether you use PyTorch, ONNX, or OpenVINO models.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
Quickstart
pip install nncf
import nncf
from nncf import compress_model
# Compress a model loaded from PyTorch, ONNX, or OpenVINO
Verify before relying
- Specific accuracy drop ranges for different compression algorithms and model types.
- Performance benchmarks (inference speedup, model size reduction) for representative models.
- GPU memory requirements for training-time compression with distributed training.
- Compatibility matrix details between NNCF version 3.3.0 and specific PyTorch/ONNX/OpenVINO versions.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 12 packagesnetworkxninjanumpyopenvino-telemetrypackagingpsutilpydotrichsafetensorsscikit-learnscipytabulate |
| Maintenance | Actively maintained 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,297,270 / month, #4,091 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Operating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: nncf-3.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “neural network compression”
- nncfNNCF provides post-training and training-time compression algorithms…
- model-compression-toolkitCompresses and optimizes neural networks through quantization,…
- compressed-tensorsProvides a unified format for storing and loading compressed neural…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also model-compression-toolkit · openvino · nvidia-modelopt · onnx-tool · openvino-dev · compressed-tensors · torchao · qonnx · tensorflow-model-optimization · optimum-intel