openvinotoolkit/nncf

Neural Network Compression Framework for enhanced OpenVINO™ inference

What it solves

NNCF optimizes the inference of neural networks by reducing their size and complexity, allowing them to run faster and use fewer resources with minimal loss in accuracy. It provides tools to compress models from PyTorch, ONNX, and OpenVINO backends.

How it works

NNCF uses a variety of compression algorithms categorized into two main types:

  • Post-Training Compression: These algorithms are applied after a model has been trained, requiring only a small calibration dataset to optimize the model. This includes Post-Training Quantization (PTQ) and Weights Compression.
  • Training-Time Compression: These algorithms are integrated into the training or fine-tuning process. This includes Quantization Aware Training (QAT), Pruning, and Weight-Only Quantization Aware Training using LoRA and NLS.

Who it’s for

It is designed for developers and ML engineers who need to deploy neural networks to production environments where inference speed and memory efficiency are critical, particularly when using the OpenVINO toolkit.

Highlights

  • Multi-backend support: Works with PyTorch, TorchFX, ONNX, and OpenVINO.
  • Comprehensive toolset: Offers both post-training and quantization-aware training methods.
  • GPU acceleration: Includes GPU-accelerated layers for faster fine-tuning of compressed models.
  • Integration: Provides a common interface for compression methods and supports distributed training.

Related

  • Project
  • Project
  • Project
  • Project
  • Project