-
1.1. Prerequisites
1.2. Install from Binary
1.3. Install from Source
The following prerequisites and requirements must be satisfied for a successful installation:
- Python version: 3.10 or 3.11 or 3.12 or 3.13
Notes:
- If you get some build issues, please check frequently asked questions at first.
Intel Neural Compressor supports PyTorch with CPU, GPU and HPU. Please install the corresponding PyTorch version based on your hardware environment.
pip install torch --index-url https://download.pytorch.org/whl/cpuhttps://intel.github.io/intel-extension-for-pytorch/index.html#installation
https://pytorch.org/get-started/locally
- Install from Pypi
# Framework extension API for PyTorch/Tensorflow/JAX
pip install neural-compressor
# Framework extension API + corresponding framework dependency
pip install neural-compressor[pt]
pip install neural-compressor[tf]
pip install neural-compressor[jax]# Framework extension API + PyTorch dependency
pip install neural-compressor-pt# Framework extension API + TensorFlow dependency
pip install neural-compressor-tf# Framework extension API + JAX dependency, available since v3.9
pip install neural-compressor-jaxThe latest code on main branch may not be stable. Please switch to the latest release tag for better stability. Feel free to open an issue if you encounter an error.
git clone https://github.com/intel/neural-compressor.git
cd neural-compressor
git fetch --tags && git checkout "$(git tag -l 'v*' --sort=-v:refname | head -n 1)"# PyTorch framework extension API + PyTorch dependency
INC_PT_ONLY=1 pip install .# TensorFlow framework extension API + TensorFlow dependency
INC_TF_ONLY=1 pip install .# JAX framework extension API + JAX dependency, available since v3.8
INC_JAX_ONLY=1 pip install .Intel® Neural Compressor supports HPUs based on heterogeneous architecture with two compute engines (MME and TPC):
- Intel Gaudi Al Accelerators (Gaudi2, Gaudi3)
Intel® Neural Compressor supports CPUs based on Intel 64 architecture or compatible processors:
- Intel Xeon Scalable processor (Sapphire Rapids, Emerald Rapids, Granite Rapids)
- Intel Xeon CPU Max Series (Sapphire Rapids HBM)
- Intel® Arc™ B-Series Graphics (Battlemage)
- OS version: Ubuntu 24.04, MacOS Ventura 13.5, Windows 11
- Python version: 3.11, 3.12, 3.13
| Framework | TensorFlow | PyTorch | JAX |
|---|---|---|---|
| Version |
2.19 |
2.12 2.11 2.10 |
0.10 |