FairScale is a collection of PyTorch performance and scaling primitives that pioneered many of the ideas now used for large-model training. It introduced Fully Sharded Data Parallel (FSDP) style techniques that shard model parameters, gradients, and optimizer states across ranks to fit bigger models into the same memory budget. The library also provides pipeline parallelism, activation checkpointing, mixed precision, optimizer state sharding (OSS), and auto-wrapping policies that reduce boilerplate in complex distributed setups. Its components are modular, so teams can adopt just the sharding optimizer or the pipeline engine without rewriting their training loop. FairScale puts emphasis on correctness and debuggability, offering hook points, logging, and reference examples for common trainer patterns. Although many ideas have since landed in core PyTorch, FairScale remains a valuable reference and a practical toolbox for squeezing more performance out of multi-GPU and multi-node jobs.

Features

  • Fully Sharded Data Parallel style parameter, grad, and optimizer sharding
  • Pipeline parallelism utilities with schedule control
  • Activation checkpointing to trade compute for memory
  • Optimizer State Sharding (OSS) drop-in optimizers
  • Mixed precision and auto-wrap policies for easy adoption
  • Examples and hooks for production-grade distributed training

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow FairScale

FairScale Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of FairScale!

Additional Project Details

Programming Language

Python

Related Categories

Python Libraries

Registered

2025-10-07