I thought I understood activation checkpointing reasonably well. Integrating torch_remat into TorchTitan gave me a few more things to think about :)
Wrote about collectives, replay side effects, MoE routing, and some surprising memory behavior.
https://t.co/z2NmoUymcc
Excited to release UMA Nitro! WAY faster than the previous UMA default. For this 153 atom peptide the raw inference speed is 32 ns/day on a single H200
Getting closer to watching biology happen from atoms up with a reactive DFT level potential is incredible!!
The TorchTitan team landed massive improvements in the past year without losing its minimal, extensible ethos. Enhancements include support for SOTA models, dramatic improvements of out-the-box performance at scale, RL support, and new communication features.
Read our latest blog to learn more and to get started: https://t.co/KkVeEWmiND
We’re sharing Dist-MoE, open-source library from Meta SuperIntelligence Labs (MSL @AIatMeta ). Dist-MoE provides fused communication and compute kernels for BF16/MXFP8 training and inference, plus NVFP4 inference.
✅ Fused communication and compute kernels
✅ Full CUDA graph support
✅ Dynamic activation packing across layers into a bounded buffer
✅ Dynamic, capacity-driven recompute
✅ Forward and backward kernels for BF16/MXFP8
✅ No shared-expert branch required
Some highlights from our GB300 NVL72 benchmarks:
• Up to 1.40× speedup over Mixture-of-Kittens (MoK) in our imbalanced, ten-layer MXFP8 training workload across 64 GPUs. Dist-MoE packed activation state across all ten layers with zero capacity-induced recompute.
• 3.09 useful PFLOP/s per GPU (3,090 TFLOP/s) for NVFP4 Mega inference across 16 GPUs.
• 1.86 useful PFLOP/s per GPU (1,856 TFLOP/s) for MXFP8 Staged training across 64 GPUs.
• 1.27 useful PFLOP/s per GPU (1,271 TFLOP/s) for BF16 training across 64 GPUs.
• Sub-linear scaling under imbalance: in NVFP4 inference across 16 GPUs, 8× the received rows on the busiest GPU required 4.82× the iteration time; about 40% lower iteration time per received row.
Full configurations, raw results, and measurement definitions are in the blog.
@levendlee and I also put together an interactive visual explainer covering token dispatch and combine, quantization, forward/backward kernels, activation packing, dynamic recompute, and memory planning.
Blog:
https://t.co/PRSXlOML6O
Repository:
https://t.co/t0iAijeFQU
TorchTitan (@PyTorch ) integration:
https://t.co/zMjeUGDFVH
If you work on MoE training, inference, or GPU kernels, take a look. We welcome feedback and contributions.
#PyTorch #MixtureOfExperts #MoE #OpenSource #TorchTitan #DistMoE
Learning GPU GEMM kernels. TIL `torch.nn.Linear` stores weights as (N, K), not the pedagogical (K, N) layout, so forward is
A @ weight.T
This makes K contiguous, resulting in nice coalesced memory accesses.
But it took me surprisingly long to break the (K, N) mental model :)
How can you maximize performance with torch.compile when working with Diffusers across different use cases?
This blog shows how torch.compile can deliver significant speedups—even when using offloading and LoRAs.
🔗 Read here: https://t.co/DaTeRwfpvy
From: @RisingSayak@anijain2305@BenjaminBossan
#PyTorch #OpenSourceAI #Diffusers #Diffusion
Users of `torch.compile`. Some small performance tips:
1. Default to `fullgraph=True` to catch graph breaks as early as possible.
2. Check for recompilation triggers. Put your code under `torch._dynamo.config.patch(error_on_recompile=True)` context.
3. Use regional compilation almost always to cut down cold-start timing significantly.
Graph-breaks and frequent recompilations can easily come in the way of performance. Eliminate them as much as possible.
In Diffusers, we have a dedicated test suite for checking these things. Reference:
https://t.co/TqXwMwC86c
Immense thanks to @anijain2305 for always helping out!
Episode 5 of the #PyTorch Compiler Series (bookmark: https://t.co/Oy1PMpmx6D)
Guards are key to how torch.compile and torch.export guarantee soundness. (In torch.export, we focus on tensor-shape guards, but because torch.compile does not make any assumptions about code, it also has to track Python-level guards.)
There's a lot of work that goes behind the scenes in optimizing how guards are represented at compile time and executed at run time to dispatch already optimized code or recompile previously untraced paths.
@anijain2305 is a great speaker, and does a tremendous job distilling down this topic in this talk and linked blog post—along the way, giving useful tips on how users can control the automatic soundness provided with guards with their own knowledge of ambient conditions in order to identify redundant checks / optimize execution of models.
Eager mode was what made PyTorch successful. So why did we feel the need to depart from eager mode in PyTorch 2.0?
Answer: it's the damn hardware!
Let's tell a story about how the assumptions PyTorch were based off of became untrue, and why PyTorch needed to evolve. (1/10)
🎯 Goal: Use @PyTorch 2.0 with @huggingface Transformers
✏️ Content: Getting started with Pytorch 2.0 and Hugging Face Transformers
✅ Result: Use Hugging Face Trainer to speed up fine-tuning by up to 2x
📔Blog: https://t.co/3zxWgZ9uE7
https://t.co/3zxWgZ9uE7
I'm giving a talk about debugging and profiling the code generated by our new PyTorch 2.0 compiler stack. What specific topics or examples would you like to see covered?
The talk will be Dec. 15 @ 10 a.m. PT. Looking forward to seeing you all!
Trying to eval a 1B parameter, 2 GFLOP vision transformer on my desktop 3090. 9.8 im/sec, it was getting sweaty. Spin up a spiffy 1x @LambdaAPI A100 instance... 14 im/sec and cool as a 🥒, not bad. torch.compile() it, 24 img/sec and I can hope to have a result before I sleep🤘
I haven't seen many people complaining that torch.compile() is crashing and there's a reason for that!
The minifier by @cHHillee and @anijain2305 is the silent star of 2.0. I've used it to turn crashing 1000+ line models into 10. I view it as a revolution in customer support.
If you've been benchmarking PyTorch 2.0 over the weekend would highly recommend you get yourself an
1. A10G which is a cost-effective A100 so you can use tensor cores
2. Add to your code torch.backends.cuda.matmul.allow_tf32 = True otherwise you won't be using your tensor cores
We just introduced PyTorch 2.0 at the #PyTorchConference, introducing torch.compile!
Available in the nightlies today, stable release Early March 2023.
Read the full post: https://t.co/DFO0HojkMt
🧵below!
1/5