Installation

  1. Installation

    1.1. Prerequisites

    1.2. Install from Binary

    1.3. Install from Source

  2. System Requirements

    2.1. Validated Hardware Environment

    2.2. Validated Software Environment

Installation

Prerequisites

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:

Install Framework

Install torch for CPU

pip install torch --index-url https://download.pytorch.org/whl/cpu

Use Docker Image with torch installed for HPU

https://docs.habana.ai/en/latest/Installation_Guide/Bare_Metal_Fresh_OS.html#bare-metal-fresh-os-single-click

Install torch/intel_extension_for_pytorch for Intel GPU

https://intel.github.io/intel-extension-for-pytorch/index.html#installation

Install torch for other platform

https://pytorch.org/get-started/locally

Install tensorflow

pip install tensorflow

Install from Binary

  • Install from Pypi

# Framework extension API for PyTorch/Tensorflow
pip install neural-compressor
# Framework extension API + specific dependency
pip install neural-compressor[pt]
pip install neural-compressor[tf]
# Framework extension API + PyTorch dependency
pip install neural-compressor-pt
# Framework extension API + TensorFlow dependency
pip install neural-compressor-tf

Install from Source

The latest code on master branch may not be stable. Feel free to open an issue if you encounter an error.

git clone https://github.com/intel/neural-compressor.git
cd neural-compressor
# 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
INC_JAX_ONLY=1 pip install .

System Requirements

Validated Hardware Environment

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 Core Ultra Processors (Meteor Lake, Lunar Lake)

Intel® Neural Compressor supports GPUs built on Intel’s Xe architecture:

  • Intel Data Center GPU Flex Series (Arctic Sound-M)

  • Intel Data Center GPU Max Series (Ponte Vecchio)

  • Intel® Arc™ B-Series Graphics (Battlemage)

Validated Software Environment

  • OS version: CentOS 8.4, Ubuntu 24.04, MacOS Ventura 13.5, Windows 11

  • Python version: 3.10, 3.11, 3.12, 3.13

Framework TensorFlow PyTorch Intel®
Extension for
PyTorch*
Version 2.16.1
2.15.0
2.14.1
2.8.0
2.7.1
2.6.0
2.8.0
2.7.0
2.6.0