Distributed

FSDP, DTensor, c10d, and distributed training

Recent

Making torch_remat work in TorchTitan

Animesh Jain (@anijain2305) · November 19, 2026
torchtitandistributedactivation-checkpointingrematmemory

TL;DR – TorchTitan now uses torch_remat for activation checkpointing. Named regions in model code replace aten-level SAC policies, but distributed training made it trickier than “replay forward”: collectives needed their own regions, side effects and nondeterministic routing had to be pinned down during replay, and the missing early-stop optimization led to a case where recomputing used more memory than stashing. TorchTitan now uses torch_remat for activation checkpointing. The idea behind activation checkpointing is simple. Drop some tensors during forward, then recompute them when backward needs them. You save memory by doing more work. But in distributed training, running forward again …

Continue reading →

Making MXFP8 Work in TorchTitan

Animesh Jain (@anijain2305) · November 12, 2026
torchtitandistributedmxfp8quantizationfsdppipeline-parallelismtensor-parallelism

TL;DR – The kernels were the easy part of bringing MXFP8 to TorchTitan. The hard part was making it compose with distributed training. We moved quantized-weight lifetime into FSDP’s lifecycle so each weight is quantized once per step under PP. We picked a stacked [2, F, D] layout for fused MoE gate/up weights so it works with both 32x32 quantization tiles and TP sharding. And we changed FSDP’s gradient-dtype contract so weight-gradient accumulation can be fused into the wgrad matmul in fp32. This post covers MXFP8 training support in TorchTitan, developed as part of a broader effort to improve TorchTitan’s DeepSeek-V3 performance. I had spent the past few years working on Dynamo, the …

Continue reading →

Olmo3 reproduction in TorchTitan

Ruisi Zhang (@ruisizhang123) · September 2, 2026
torchtitandistributedmodel factory

TL;DR – I have reproduced 23% of Olmo3’s pre-training loss curve with TorchTitan. The training takes 4 days running on 512H100 GPUs. The on-the-fly downstream task evaluations further confirm TorchTitan’s ability to train capable LLMs. This marks the first step in our model factory efforts, which aims to enable agents to use TorchTitan to hillclimb scaling ladders, explore new research ideas, and validate them across increasing model scales. Stay tuned for more updates. Olmo3 is Ai2’s fully open family of language models (link), with training data, code, checkpoints, and recipes spanning pretraining, mid-training, long-context training, and post-training. This transparency provides a …

Continue reading →

SPMD types in TorchTitan

Pian Pawakapan (@pianpwk) · August 26, 2026
torchtitandistributeddtensorspmdsharding

TL;DR TorchTitan now uses spmd_types as its default backend for distributed model computation. Authors specify sharding contracts and collectives explicitly, with optional typechecking to catch distributed-correctness errors during development. At runtime, the typechecking machinery can be erased so forward and backward execute on plain tensors. Coupled FWD-BWD typing and support for both global and local SPMD also make distributed behavior easier to express and reason about. Across our repeated debug-model benchmarks, spmd_types improved eager throughput by up to 46% and Inductor throughput by 5-9% over partial_dtensor, without a meaningful peak-memory increase. FSDP2 continues to use …

Continue reading →

Config-Based Sharding and Full DTensor Adoption in TorchTitan

Chien-Chin Huang (@fegin) · August 17, 2026
torchtitandistributeddtensorshardingspmdmoe

TL;DR TorchTitan now adopts a declarative approach: ALL sharding (SPMD parallelization) is expressed in configuration. We created a full DTensor mode where every tensor is a DTensor that shards on all activated mesh axes (DP, CP, TP; EP for MoE experts). Full DTensor removes the ambiguity where a tensor could be a plain local tensor or a DTensor sharded on only some axes - the source of correctness bugs. Available via --parallelism.spmd_backend=full_dtensor, verified bit-identical to the legacy path across FSDP/HSDP/CP/TP/EP, at performance parity. TorchTitan is transitioning to spmd_types; the work here (config-based sharding and full DTensor) is the foundation that makes it possible. …

Continue reading →

All Distributed Logs