Back to directory

pi-quant: Prime Intellect Fast Quantization Library

A fast, multithreaded CPU library of SIMD-optimized quantization and dequantization kernels for machine learning, more than twice as fast as PyTorch's built-in routines on tested hardware.

pi-quant: Prime Intellect Fast Quantization Library

pi-quant's kernels use architecture-specific SIMD intrinsics -- SSE4.2, AVX2 and AVX512F on AMD64, and Neon on ARM64 -- with the fastest available kernel chosen automatically at runtime through CPU feature detection. They convert 32- and 64-bit floats to and from 4-, 8-, 16-, 32- and 64-bit integers with a choice of nearest or stochastic rounding, and support both set and add store modes during dequantization, which is useful for ring-reduction operations.

A reusable thread pool keeps multithreading overhead low, and a C99 API makes the library usable from C projects or other languages through foreign-function bindings, alongside a Python API that works directly with PyTorch or NumPy. It installs from PyPI as pypiquant, and its own benchmarks measure it against PyTorch's built-in per-tensor quantization routines on several CPU architectures.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.