Intel Neural Compressor: a quantization layer that sits on PyTorch, TensorFlow and JAX
SOTA low-bit LLM quantization (INT8/FP8/MXFP8/INT4/MXFP4/NVFP4) & sparsity; leading model compression techniques on PyTorch, TensorFlow, and ONNX Runtime
At a glance
- What is it?
- Intel Neural Compressor wraps post-training quantization, quantization-aware training, sparsity and low-precision formats behind one Python API, with the deepest hardware support reserved for Intel silicon. It is a compression toolkit, not a serving stack, and the docs make the experimental surface easy to identify.
- Who is it for?
- Adopt it if you are quantizing a PyTorch, TensorFlow or JAX model for Intel CPU, Intel GPU or Gaudi and you want INT8, FP8, MXFP8, MXFP4, INT4 or NVFP4 behind one API. Do not adopt it as a portable cross-vendor runtime: the README states that AMD CPU, ARM CPU and NVidia GPU get limited testing, and several formats are still marked experimental.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The problem: one compression API across three frameworks and a pile of numeric formats
Model compression in Python is fragmented by framework and by format. A team that wants INT8 static quantization on PyTorch, weight-only INT4 on a language model, and a sparse checkpoint usually ends up gluing together separate tools with separate config schemas. Intel Neural Compressor's stated aim is to collapse that into one library that supports Static Quantization, Dynamic Quantization, SmoothQuant, Weight-Only Quantization, Quantization-Aware Training and Mixed Precision, on PyTorch, TensorFlow and JAX. The audience is whoever owns the step between a trained checkpoint and a deployable artifact: an inference engineer, a model optimization engineer, or a platform team standardizing a quantization recipe. The repository description lists INT8, FP8, MXFP8, INT4, MXFP4 and NVFP4 as the target precisions, alongside sparsity. The project is Apache-2.0 licensed and requires Python 3.11 or newer.
prepare and convert: the mechanism behind the quantization API
The README's FP8 example shows the shape of the API. You import FP8Config, prepare and convert from neural_compressor.torch.quantization, build a model, construct a qconfig such as FP8Config(fp8_config="E4M3"), then call prepare(model, qconfig). After prepare, you run calibration data through the model, which in the example is a single dummy tensor of shape (1, 3, 224, 224). Then convert(model) returns the quantized model, and inference runs on the target device. That two-phase split is the core mechanism: prepare inserts the observers or conversion hooks, the calibration pass supplies the statistics those hooks need, and convert freezes them into the final graph. It is a standard post-training quantization flow, and the value here is that the same prepare/convert pair is reused across the format-specific config classes. The load path is separate. The README shows loading an already quantized checkpoint with load(model_name_or_path="TheBloke/Llama-2-7B-GPTQ", format="huggingface", device="hpu", torch_dtype=torch.bfloat16), which means the library can consume externally produced quantized weights rather than only producing them.
Installation is split by framework, and the PyTorch path needs its own extension
There is no single install. The README gives three: pip install neural-compressor-pt, pip install neural-compressor-tf, and pip install neural-compressor-jax, each pairing the framework extension API with that framework's dependency. For PyTorch the README pushes you to install the matching Intel extension first: intel_extension_for_pytorch for CPU, a separate build for Intel GPU, and a Habana Docker image for HPU. On Gaudi the README recommends the Habana container, with a run command that sets --runtime=habana, passes HABANA_VISIBLE_DEVICES=all, and disables the vader single-copy mechanism. One environment variable matters more than the rest. The README states that since Habana software 1.21.0, PT_HPU_LAZY_MODE=0 is the default, but that most low-precision functions such as convert_from_uint4 do not support that setting, so PT_HPU_LAZY_MODE=1 is recommended for compatibility. That is a concrete constraint you hit at runtime, not a footnote. There is also a version mapping between Intel Neural Compressor and the Gaudi software stack in docs/source/gaudi_version_map.md, and the README tells you to use a matched combination.
The format matrix is wide, and a good part of it is labelled experimental
The What's New list is the most honest part of the README, because it dates each capability and marks its status. FP8 quantization for Keras and JAX arrived in 2026/03 and is experimental. FP8 KV cache and attention static quantization with AutoRound also arrived in 2026/03 and is experimental. NVFP4 quantization landed in 2025/12 as experimental support. MXFP8 and MXFP4 quantization landed in 2025/10, also experimental. Against that, FP8 dynamic quantization for Linear and FusedMoE on Gaudi (2025/09), FP8 static quantization of DeepSeek V3/R1 on Gaudi (2025/05), and VLM quantization in a transformers-like API on Intel CPU and GPU (2025/03) are listed without the experimental tag. Read that split as a deployment signal: MX and NV formats are the newest and least settled, while FP8 on Gaudi has had more time in the tree. Advanced quantization of LLMs and VLMs such as LLaMA, Qwen, DeepSeek, Flux and FramePack is delivered through integration with the separate AutoRound project, so part of your dependency surface lives outside this repository.
Hardware support is not symmetric, and the README says so
The README distinguishes two tiers. Intel Gaudi AI Accelerators, Intel Core Ultra, Intel Xeon Scalable, Intel Xeon CPU Max Series, Intel Data Center GPU Flex Series and Intel Data Center GPU Max Series get what it calls extensive testing. AMD CPU, ARM CPU and NVidia GPU get limited testing. That sentence should drive your evaluation more than any feature list. If you are quantizing for an Intel target, the tested path and the format matrix line up. If you are quantizing a model to run on an NVidia GPU, the library may still work, but the README does not claim the same coverage, and NVFP4 support is marked experimental on top of that. The same asymmetry shows up in the getting-started material: the FP8 example is explicitly described as supported by Intel Gaudi2, and the weight-only LLM loading example targets device="hpu". The first-run experience the README curates is a Gaudi experience.
First-load conversion and the cost of staying current
The weight-only loading example carries a note worth reading twice: Intel Neural Compressor converts the model format from auto-gptq to hpu format on the first load and saves hpu_model.safetensors to the local cache directory for subsequent loads, so the first load may take a while. That is a real operational cost if your deployment pattern pulls a fresh container or clears cache on every start, because the conversion runs again each time. On the maintenance side, the release cadence is visible in the supplied data: v3.9 on 2026-07-02, v3.8 on 2026-06-02, v3.7 on 2025-12-25, with the last push to main on 2026-09-10. Monthly minor releases through mid-2026 mean the API surface and the hardware compatibility matrix move together, and the README's own instruction to check the Gaudi version map implies that upgrading one side without the other is a known failure mode. The Apache-2.0 license permits commercial use and modification; redistribution carries the usual obligations around notices and attribution, and this is not legal advice, so have counsel read the LICENSE file if you are shipping it inside a product.
Where it fits against a serving-first runtime
The clearest alternative in this space is a serving-first runtime such as NVIDIA TensorRT-LLM, which treats quantization as one stage inside an inference engine that also owns kernels, batching and scheduling. The difference in approach is where the work happens. Neural Compressor produces a quantized model artifact and hands it off; it does not own the serving loop. That makes it composable, since the output can go to whatever runtime you already use, and it also means the library cannot promise end-to-end latency, because it does not control the kernels that execute the quantized graph. If your question is which engine serves tokens fastest, this is the wrong layer to ask. If your question is how to get a checkpoint into INT4 or FP8 with a consistent API across PyTorch, TensorFlow and JAX, that is the layer this project occupies. The same split applies to AutoRound: the README routes advanced LLM and VLM quantization through that integration rather than claiming it is all in-tree.
Who should pick this up, and what to check before committing
The fit is narrow and identifiable. You are quantizing a model for Intel CPU, Intel GPU or Gaudi, you want INT8, FP8, MXFP8, MXFP4, INT4 or NVFP4 behind one prepare/convert interface, and you are willing to track a monthly release train and a hardware version map. The mismatch is equally identifiable. You are targeting NVidia or ARM hardware as a first-class platform, or you need a format the README still tags experimental, or you expect the library to serve the model. Before wiring it into a pipeline, confirm three things from the repository itself: that your format and hardware pair appears in the tested tier rather than the limited-testing tier, that your stack combination matches docs/source/gaudi_version_map.md if Gaudi is involved, and that PT_HPU_LAZY_MODE=1 is set in any Gaudi environment where you call low-precision conversion functions such as convert_from_uint4. If the first load of a GPTQ checkpoint is on your critical path, measure the hpu_model.safetensors cache behaviour in your own container lifecycle, because the README's note about first-load conversion is the only guidance it gives.
Editorial conclusion
Adopt it if you are quantizing a PyTorch, TensorFlow or JAX model for Intel CPU, Intel GPU or Gaudi and you want INT8, FP8, MXFP8, MXFP4, INT4 or NVFP4 behind one API. Do not adopt it as a portable cross-vendor runtime: the README states that AMD CPU, ARM CPU and NVidia GPU get limited testing, and several formats are still marked experimental. Verify your exact format and hardware pair against the version map in docs/source/gaudi_version_map.md before you commit a pipeline to it.
Community notes