# SDNQ

A cross-platform quantization engine for PyTorch models that reduces memory use and increases inference and training speed on GPUs, NPUs, CPUs and ARM devices.

SDNQ is a PyTorch-native quantization engine that runs on any device through an Eager-mode fallback, while using faster Inductor or OpenVINO-compiled paths on CUDA, ROCm, XPU, CPU and ARM hardware when available. It supports 176 storage types from 1 to 16 bits, including int, uint, floating point and unsigned floating point formats, and techniques such as Hadamard rotation, SVD quantization and Lloyd-Max codebook quantization on both weights and quantized matrix multiplication.

Beyond inference, SDNQ supports full-parameter quantized training, including quantized optimizers and direct updates to quantized weights, and it is natively supported by the upstream Diffusers library from version 0.40.0.

It is written in Python, installed with pip, and licensed under GPL-3.0.

Website: https://github.com/Disty0/sdnq
