We suggest to install or use the package in the Python virtual environment.
NNCF supports multiple backends. Follow the corresponding installation guides and ensure your system meets the required specifications for your chosen backend:
- OpenVINO™: Install Guide, System Requirements
- ONNX: Install Guide
- PyTorch: Install Guide
NNCF can be installed as a regular PyPI package via pip:
pip install nncfInstall the package and its dependencies by running the following command in the repository root directory:
pip install .NB: For launching example scripts in this repository, we recommend setting the PYTHONPATH variable to the root of the checked-out repository once the installation is completed.
NNCF is also available via conda:
conda install -c conda-forge nncfpip install git+https://github.com/openvinotoolkit/nncf@bd189e2#egg=nncfNote that in order for this to work for pip versions >= 21.3, your Git version must be at least 2.22.
The following table lists the recommended corresponding versions of backend packages as well as the supported versions of Python:
| NNCF | OpenVINO | PyTorch | ONNX | TensorFlow | Python |
|---|---|---|---|---|---|
develop |
2026.0.0 |
2.9.0 |
1.20.1 |
3.10 |
|
3.0.0 |
2026.0.0 |
2.9.0 |
1.17.0 |
3.10 |
|
2.19.0 |
2025.4.0 |
2.8.0 |
1.17.0 |
2.15.1 |
3.10 |
2.18.0 |
2025.3.0 |
2.8.0 |
1.17.0 |
2.15.1 |
3.10 |
2.17.0 |
2025.2.0 |
2.7.1 |
1.17.0 |
2.15.1 |
3.10 |
2.16.0 |
2025.1.0 |
2.6.0 |
1.17.0 |
2.15.1 |
3.10 |
2.15.0 |
2025.0.0 |
2.5.1 |
1.17.0 |
2.15.1 |
3.10 |
2.14.1 |
2024.6.0 |
2.5.1 |
1.17.0 |
2.15.1 |
3.10 |
2.14.0 |
2024.5.0 |
2.5.1 |
1.17.0 |
2.15.1 |
3.10 |
2.13.0 |
2024.4.0 |
2.4.0 |
1.16.0 |
2.15.1 |
3.8* |
2.12.0 |
2024.3.0 |
2.3.0 |
1.16.0 |
2.15.1 |
3.8* |
2.11.0 |
2024.2.0 |
2.3.0 |
1.16.0 |
2.12.0 |
3.8 |
2.10.0 |
2024.1.0 |
2.2.1 |
1.16.0 |
2.12.0 |
3.8 |
2.9.0 |
2024.0.0 |
2.1.2 |
1.13.1 |
2.12.0 |
3.8 |
2.8.1 |
2023.3.0 |
2.1.2 |
1.13.1 |
2.12.0 |
3.8 |
2.8.0 |
2023.3.0 |
2.1.2 |
1.13.1 |
2.12.0 |
3.8 |
2.7.0 |
2023.2.0 |
2.1 |
1.13.1 |
2.12.0 |
3.8 |
2.6.0 |
2023.1.0 |
2.0.1 |
1.13.1 |
2.12.0 |
3.8 |
2.5.0 |
2023.0.0 |
1.13.1 |
1.13.1 |
2.11.1 |
3.8 |
2.4.0 |
2022.1.0 |
1.12.1 |
1.12.0 |
2.8.2 |
3.8 |
(*) Python 3.9 or higher is required for TensorFlow 2.15.1
This repository is tested on Python* 3.10.14, PyTorch* 2.9.0 (NVidia CUDA* Toolkit 12.6).