vllm-project/compressed-tensors
A safetensors extension to efficiently store sparse quantized tensors on disk
What it solves
compressed-tensors is a library designed to solve the fragmentation of model compression formats. Different quantization and compression techniques (like GPTQ, AWQ, and SmoothQuant) often use proprietary or inconsistent storage formats, making it difficult for developers to and switch between them or deploy models across different inference engines.
How it works
It extends the safetensors format to create a unified, extensible checkpoint format. This allows it to represent a wide variety of compression schemes—including mixed precision, low-bit quantization, and sparsity patterns—within a single consistent structure. It also provides tools for checkpoint conversion and transparent offloading of models that exceed available VRAM to CPU or disk.
Who it’s for
AI researchers and developers who need to compress LLMs for efficient deployment, experiment with different quantization methods, and simplify their model deployment pipelines.
Highlights
- Unified Format: Supports multiple compression schemes (GPTQ, AWQ, SmoothQuant, SparseGPT, etc.) in one consistent format.
- Broad Quantization Support: Handles activation quantization, mixed precision, KV cache quantization, and non-uniform schemes where different layers are quantized differently.
- Sparsity and Transforms: Supports both unstructured and semi-structured (2:4) sparsity and rotation-based quantization transforms (e.g., Hadamard).
- Ecosystem Integration: Designed for seamless use with Hugging Face, PyTorch, vLLM, and SGLang.
- Checkpoint Conversion: Ability to convert between various formats like AutoAWQ and ModelOpt NVFP4.
Related
- Project
- Project
- Project
- Project
- Project