# huggingface/optimum-quanto

A pytorch quantization backend for optimum

Repository: https://github.com/huggingface/optimum-quanto
Canonical: https://ross.abutalabs.com/products/optimum-quanto
Language: Python
License: Apache-2.0
License Family: permissive
Topics: pytorch, quantization, optimum
Last push: 2026-08-25T17:54:57+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 28, longevity 77
- inputs: {"age_days": 1079, "days_push": 8, "days_rel": 545, "gap_med": 77.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1053, forks 91 (observed 2026-08-28T04:03:23.814513+00:00)

## What it is
Optimum Quanto is a PyTorch quantization backend for Hugging Face Optimum that quantizes model weights (int2/int4/int8/float8) and activations (int8/float8) with support for CUDA and MPS devices. It provides a seamless workflow from float to dynamic to static quantization, with serialization compatible with PyTorch weight_only and safetensors.

## Use cases
- quantize a huggingface llm to int8 or int4
- reduce gpu memory usage of a pytorch model
- quantize pytorch models with float8 weights and activations
- run quantized inference on mps or cuda
- save and reload quantized models with safetensors
- speed up matrix multiplications with int8 int4 kernels

## When to choose
- you need versatile eager-mode quantization for non-traceable PyTorch models
- you want to quantize Hugging Face models and serialize them with safetensors
- you need quantization on MPS (Apple Silicon) as well as CUDA

## When to avoid
- you need production-ready quantization with active development - use bitsandbytes or torchAO instead
- you need torch.compile (dynamo) compatibility
- you need optimized kernels for all mixed matrix multiplications on all devices

## Facets
- artifact type: library
- maturity: maintenance
- function: llm-inference, machine-learning, sdk
- domain: large-language-models, machine-learning, deep-learning
- platform: python, cross-platform
- tags: pytorch, quantization, huggingface, model-compression, int8, int4, float8, safetensors, gpu

## Member repositories
- huggingface/optimum-quanto (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:23.814513+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:59:21.386034+00:00, confidence not recorded.
  - readme: https://github.com/huggingface/optimum-quanto (fetched 2026-08-28T04:03:23.814513+00:00, sha cf9b11b5cefe)
  - registry_pypi: https://pypi.org/pypi/optimum-quanto/json (fetched 2026-08-29T13:01:00.748299+00:00, sha 6ee854039d33)
- Data as of 2026-08-30T08:39:29.467469+00:00.
