Torchao is a library for PyTorch focused on custom data types and optimization, supporting the quantization and sparsification of weights, gradients, optimizers, and activation functions for both inference and training. It is compatible with torch.compile() and FSDP2, enabling acceleration for most PyTorch models. Torchao aims to enhance model inference speed and memory efficiency while minimizing accuracy loss through techniques such as Quantization Aware Training (QAT) and Post Training Quantization (PTQ).