torchao
Package for applying ao techniques to GPU models
Decision gist · record as of 2026-08-14
Yes, if you are optimizing models for inference speed or training efficiency and can tolerate the license ambiguity. The package is actively maintained, has no external runtime dependencies, and is widely adopted in production serving. Verify the license terms in the repository before use in proprietary contexts; otherwise, install friction is minimal and performance gains are substantial.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a compatible PyTorch installation and GPU or CPU setup; optional accelerated kernels improve performance for specific workflows but are not required for basic quantization.
- Low install friction; ships as a pure Python wheel.
- Active maintenance with a recent release (11 days old) and steady commit history.
License · maintenance · safety
(unclear) — License status is unclear from the package metadata—no SPDX identifier or raw license text is recorded. Verify the actual license terms in the repository before adopting in proprietary or restricted contexts.
last release 2026-08-03 (11 days) · last repo commit 2026-08-14 · 2,948 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,707,418 downloads/mo, #2,522 on PyPI
Alternatives
Verify before relying
pip install torchao
from torchao.quantization import Int4WeightOnlyConfig, quantize_
quantize_(model, Int4WeightOnlyConfig(group_size=32))- Exact Python version compatibility and minimum PyTorch version requirements
- Whether the package is suitable for production deployment or remains research-focused
- Specific hardware platforms beyond NVIDIA GPUs where quantization techniques are validated
What it is and what it does
TorchAO is a quantization and sparsity library that reduces model size and accelerates both training and inference by converting weights and activations to lower-precision formats (int4, float8, etc.) and applying structured sparsity patterns. It integrates directly into compilation and distributed training pipelines, allowing you to apply these optimizations to large language models and other neural networks with minimal code changes.
The library supports multiple quantization strategies—weight-only quantization for inference, dynamic quantization for both training and serving, and quantization-aware training (QAT) to recover accuracy lost during quantization. It is designed to work out-of-the-box with HuggingFace Transformers models and has been validated on large-scale training runs, achieving reported speedups with acceptable accuracy trade-offs.
Use it for
- Reduce inference latency and memory footprint of large language models by quantizing weights to int4 or float8 for deployment on resource-constrained hardware.
- Accelerate multi-GPU pre-training of large models by applying float8 training with FSDP2 to reduce communication overhead and memory pressure.
- Fine-tune quantized models using quantization-aware training (QAT) to recover accuracy degradation from aggressive quantization.
- Apply semi-structured 2:4 sparsity patterns to transformer models to achieve training and inference speedups with minimal accuracy loss.
- Integrate quantization into existing HuggingFace Transformers workflows via the TorchAoConfig API without rewriting model loading code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are optimizing models for inference speed or training efficiency and can tolerate the license ambiguity.
The package is actively maintained, has no external runtime dependencies, and is widely adopted in production serving. Verify the license terms in the repository before use in proprietary contexts; otherwise, install friction is minimal and performance gains are substantial.
Install
torchao on PyPI
Before you install
Low install friction; ships as a pure Python wheel. Active maintenance with a recent release (11 days old) and steady commit history. No runtime dependencies to manage.
Requires a compatible PyTorch installation and GPU or CPU setup; optional accelerated kernels improve performance for specific workflows but are not required for basic quantization.
License in practice
License status is unclear from the package metadata—no SPDX identifier or raw license text is recorded. Verify the actual license terms in the repository before adopting in proprietary or restricted contexts.
Quickstart
pip install torchao
from torchao.quantization import Int4WeightOnlyConfig, quantize_
quantize_(model, Int4WeightOnlyConfig(group_size=32))
Verify before relying
- Exact Python version compatibility and minimum PyTorch version requirements
- Whether the package is suitable for production deployment or remains research-focused
- Specific hardware platforms beyond NVIDIA GPUs where quantization techniques are validated
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,707,418 / month, #2,522 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: torchao-0.18.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “int4 weight quantization”
- torchaoTorchAO applies quantization and sparsity techniques to PyTorch…
- optimum-quantoA PyTorch quantization backend that reduces model size and memory by…
- humming-kernelsHumming is a JIT-compiled GEMM kernel library for quantized matrix…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also llmcompressor · optimum-quanto · torchtitan · torch-npu · torchtune · nvidia-modelopt · nncf · compressed-tensors · unsloth-zoo · liger-kernel