$ the-wire · showcase
Torchtitan trims MLP backward memory, Inductor splits reduction grids
By RepoJournal · Filed · About PyTorch · Composed from the cited sources · methodology
Torchtitan's memory work dominates the day: fused SwiGLU now overwrites its saved gate_up output in place, context-parallel linear attention runs in head chunks, and checkpoints land on fsspec URIs without a FUSE mount.
[fused_swiglu] Overwrite gate_up with its gradient in backward to save memory (#6348) pytorch/torchtitan
FusedSwiGLU used to allocate a fresh [T, 2, F] gradient while w13's saved [T, 2, F] output was still live; backward now overwrites that output with its own gradient, since nothing reads it after the activation backward.
[CP][linear attn] Run context-parallel GDN and KDA in head chunks to reduce peak memory (#6340) pytorch/torchtitan
Context-parallel GDN and KDA now run in head chunks at long context, opted into rather than default. The cost is a per-chunk all-gather of state information, which the author reports is relatively small against the peak memory saved.
[checkpoint] TorchCheckpointingManager: checkpoints on fsspec URIs such as gs:// (#6169) pytorch/torchtitan
TorchCheckpointingManager rejected any remote checkpointer.folder or initial_load_path, forcing a bucket mount that containers without FUSE and managed platforms can't do; a gs:// style folder now works through an fsspec-backed Storage, matching what DCP already supported.
Record entry-point failures to the torchelastic error file (#6336) pytorch/torchtitan
Config errors in train.py's main() used to surface as error_file: <N/A> with no traceback in the torchrun summary, because loading ran outside the @record-decorated Trainer methods. @record now sits on train.main, flux inference main, and rl generate.
[dsv3/4] MTP: share MTPDecoder between DeepSeek-V3 and V4 (#6289) pytorch/torchtitan
DeepSeek-V4 with MTP failed on the first loss computation because it inherited Decoder.preprocess_inputs, which does not handle MTP; MTPDecoder is now generic and shared with DeepSeek-V3.
[pytree] Refuse a namedtuple node whose name points to a class that is not a namedtuple (#205993) pytorch/pytorch
treespec_loads accepted whatever class a saved namedtuple node's serialized name resolved to, so a stale or edited spec could fail late or silently build a wrong value via unflatten's one-argument-per-field call; it now refuses names that don't point at a namedtuple.
Action items