• Learn
    Get Started Tutorials Learn the Basics PyTorch Recipes Intro to PyTorch - YouTube Series Webinars
  • Community
    Landscape Join the Ecosystem Community Hub Forums Developer Resources Contributor Awards Community Events PyTorch Ambassadors
  • Projects
    PyTorch vLLM DeepSpeed Host Your Project RAY
  • Docs
    PyTorch Domains
  • Blogs & News
    Blog Announcements Case Studies Events Newsletter
  • About
    PyTorch Foundation Members Governing Board Technical Advisory Council Cloud Credit Program Staff Contact Brand Guidelines
  • JOIN
  • Learn
    • Get Started
    • Tutorials
    • Learn the Basics
    • PyTorch Recipes
    • Introduction to PyTorch - YouTube Series
    • Webinars
  • Community
    • Landscape
    • Join the Ecosystem
    • Community Hub
    • Forums
    • Developer Resources
    • Contributor Awards
    • Community Events
    • PyTorch Ambassadors
  • Projects
    • PyTorch
    • vLLM
    • DeepSpeed
    • Host Your Project
  • Docs
    • PyTorch
    • Domains
  • Blog & News
    • Blog
    • Announcements
    • Case Studies
    • Events
    • Newsletter
  • About
    • PyTorch Foundation
    • Members
    • Governing Board
    • Technical Advisory Council
    • Cloud Credit Program
    • Staff
    • Contact
Skip to main content
Ctrl+K
main
  • Quick Start Guide
  • Quantization Overview
  • Contributor Guide
  • Sparsity Overview
  • Benchmarking API Guide
    • Benchmarking User Guide
    • torchao.dtypes
    • torchao.quantization
    • torchao.quantization.qat
    • torchao.sparsity
    • torchao.float8
    • torchao.utils
    • (Part 1) Pre-training with float8
    • (Part 2) Fine-tuning with QAT, QLoRA, and float8
    • (Part 3) Serving on vLLM, SGLang, ExecuTorch
    • Integration with VLLM: Architecture and Usage Guide
    • Hugging Face Integration
    • Serialization
    • Static Quantization
    • Writing Your Own Quantized Tensor
    • Writing Your Own Quantized Tensor (advanced)
    • PyTorch 2 Export Post Training Quantization
    • PyTorch 2 Export Quantization-Aware Training (QAT)
    • PyTorch 2 Export Quantization with X86 Backend through Inductor
    • PyTorch 2 Export Quantization with Intel GPU Backend through Inductor
    • PyTorch 2 Export Quantization for OpenVINO torch.compile Backend
    • How to Write a Quantizer for PyTorch 2 Export Quantization
Ctrl+K
  • X
  • GitHub
  • Discourse
  • PyPi
  • Quick Start Guide
  • Quantization Overview
  • Contributor Guide
  • Sparsity Overview
  • Benchmarking API Guide
  • Benchmarking User Guide
  • torchao.dtypes
  • torchao.quantization
  • torchao.quantization.qat
  • torchao.sparsity
  • torchao.float8
  • torchao.utils
  • (Part 1) Pre-training with float8
  • (Part 2) Fine-tuning with QAT, QLoRA, and float8
  • (Part 3) Serving on vLLM, SGLang, ExecuTorch
  • Integration with VLLM: Architecture and Usage Guide
  • Hugging Face Integration
  • Serialization
  • Static Quantization
  • Writing Your Own Quantized Tensor
  • Writing Your Own Quantized Tensor (advanced)
  • PyTorch 2 Export Post Training Quantization
  • PyTorch 2 Export Quantization-Aware Training (QAT)
  • PyTorch 2 Export Quantization with X86 Backend through Inductor
  • PyTorch 2 Export Quantization with Intel GPU Backend through Inductor
  • PyTorch 2 Export Quantization for OpenVINO torch.compile Backend
  • How to Write a Quantizer for PyTorch 2 Export Quantization
Ctrl+K
  • X
  • GitHub
  • Discourse
  • PyPi

Welcome to the torchao Documentation#

Created On: Dec 15, 2025 | Last Updated On: Dec 15, 2025

torchao is a library for custom data types and optimizations. Quantize and sparsify weights, gradients, optimizers, and activations for inference and training using native PyTorch. Please checkout torchao README for an overall introduction to the library and recent highlight and updates.

Getting Started

  • Quick Start Guide

Developer Notes

  • Quantization Overview
  • Contributor Guide
  • Sparsity Overview
  • Benchmarking API Guide
  • Benchmarking User Guide

API Reference

  • torchao.dtypes
  • torchao.quantization
  • torchao.quantization.qat
  • torchao.sparsity
  • torchao.float8
  • torchao.utils
  • torchao.quantization.quantize_.common

Eager Quantization Tutorials

  • (Part 1) Pre-training with float8
  • (Part 2) Fine-tuning with QAT, QLoRA, and float8
  • (Part 3) Serving on vLLM, SGLang, ExecuTorch
  • Integration with VLLM: Architecture and Usage Guide
  • Hugging Face Integration
  • Serialization
  • Static Quantization
  • Writing Your Own Quantized Tensor
  • Writing Your Own Quantized Tensor (advanced)

PT2E Quantization Tutorials

  • PyTorch 2 Export Post Training Quantization
  • PyTorch 2 Export Quantization-Aware Training (QAT)
  • PyTorch 2 Export Quantization with X86 Backend through Inductor
  • PyTorch 2 Export Quantization with Intel GPU Backend through Inductor
  • PyTorch 2 Export Quantization for OpenVINO torch.compile Backend
  • How to Write a Quantizer for PyTorch 2 Export Quantization

next

Quick Start Guide

Edit on GitHub
Show Source

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources

Stay in touch for updates, event info, and the latest news

By submitting this form, I consent to receive marketing emails from the LF and its projects regarding their events, training, research, developments, and related announcements. I understand that I can unsubscribe at any time using the links in the footers of the emails I receive. Privacy Policy.

© PyTorch. Copyright © The Linux Foundation®. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For more information, including terms of use, privacy policy, and trademark usage, please see our Policies page. Trademark Usage. Privacy Policy.

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.

Image

© Copyright 2024-present, torchao Contributors.

Created using Sphinx 5.3.0.

Built with the PyData Sphinx Theme 0.15.4.

Advertisement
Advertisement