
Distributed & Decentralized training @HuggingFace
France
Joined October 2013
- Tweets630
- Following1.4K
- Followers2.9K
- Likes2.6K
Pinned Tweet
Interested in 4D parallelism but feeling overwhelmed by Megatron-LM codebase? We are currently cooking something with @Haojun_Zhao14 and @xariusrke 😉
In the meantime, here is a self-contained script that implements Pipeline Parallelism (AFAB + 1F1B) in 200 LOC 🧵👇
I was testing Huggingface Jobs by running AsyncGRPO + LoRA on Qwen3-30B-A3B: 3 vLLM Jobs + 2 trainer Jobs. Inside a trainer Job, GPUs talk over NVLink. Between Jobs, only TCP.
Same GPUs, same model. One code change, and each training step took 40% less time. Just a simple trick 🧵
A must read it !
📖 The Ultimate MoE Training Handbook 📖
We spent 1/2M GPUh to optimize MoE training and wrote the most comprehensive blog about it. With 30k words and 50+ interactive figures it covers everything from profiling to large cluster training.
huggingface.co/spaces/huggin…
3
370
In collaboration with @PyTorch team, we added transformers modeling backend to torchtitan library ! This means training any Dense model (MoE support coming soon) with torch.compile + FSDPP/TP/PP/CP out of the box with no performance drop !
There is no performance degradation (if using torch.compile) if you use Huggingface transformers modeling backend compared to torchtitan (github.com/huggingface/torch…)
Good shit from Monarch. Previously, i'll have to ssh to every node and remote attach my debugguer to all node. Now no longer the case
1
7
616
finally found the motivation (for @TheZachMueller distributed course) to make the next video on Pipeline Parallel and how it interacts with Data and Tensor Parallel. Expect as well a code deep dive on how 2 of the most common PP schedules are implemented (All-Forward All-Backward & 1 Forward-1 Backward). Coming on October 2nd
7
634
The research paper video review on "Swarm Parallelism" along with the author @m_ryabinin, Distinguished Research Scientist @togethercompute is now out ! Link below 👇
For context, most decentralized training today follows DDP-style approaches requiring full model replication on each node. While practical for those with H100 clusters at their disposal, this remains out of reach for the vast majority of potential contributors, this is where SWARM comes in handy !
Another one to my reading list
HALoS: a hierarchical asynchronous DiLoCo from Geon-Woo Kim et al.
Some context:
DiLoCo (arxiv.org/abs/2311.08105) is a version of FedOpt (arxiv.org/abs/2003.00295) targeted for LLM training with inner Adam and, critically, outer Nesterov.
Async DiLoCo (arxiv.org/abs/2401.09135) from @cranialxix extends DiLoCo to use heterogenous hardwares and async communication between replicas by 1) syncing more often slow replicas and 2) having a delayed-aware outer optimizer where it is apply for each incoming outer gradients but whose opt state is updated only after a buffer is filled.
HALoS (arxiv.org/pdf/2506.04531) from Kim et al. extends said Async DiLoCo to a hierarchical setting, where there are two levels of parameters servers.
They use roughly the same learning paradigm of Async DiLoCo (nicknamed Async Local-SGD in their paper), but with some critical differences:
(1). nesterov's b1 of the local param server is 0.9 as in DiLoCo family, but for global param server, it must be 0.5
(2). the local and global models are merged, but with slightly more importance for the local
(3). the local server accumulates its update for reduced variance
Great work Kim & folks!
--
1
3
478
Fixed size hidden state was always a blocker as to why I didn’t believe in linear attention in the first place. But now, that may be different
We know Attention and its linear-time variants, such as linear attention and State Space Models. But what lies in between?
Introducing Log-Linear Attention with:
- Log-linear time training
- Log-time inference (in both time and memory)
- Hardware-efficient Triton kernels
1
373
👀👀
Inspired by “minimal implementation“ projects in AI such as @karpathy’s nanoGPT, I worked to bring this concept to the HPC world!
I’ve built a minimal implementation of an MPI library called nanoMPI, which focuses on clarity, simplicity, and easy installation.
324
Another one: arxiv.org/abs/2410.15352
(courtesy to @m_ryabinin for the discovery)
Honestly, very impressive work. And nowww I need to read more literature about compressing the activations. Find this one so far (a bit old)
5
537
Honestly, very impressive work. And nowww I need to read more literature about compressing the activations. Find this one so far (a bit old)
In MuLoCo paper from @benjamintherien , Xiaolong Huang, @irinarish, @ebelilov, they tested DCT based compression (from DeMo paper by @bloc97_ from @NousResearch). Anyone aware of other papers that use Fourrier transform in any sort of way that is related to Decentralized training ? Just curious
Most decentralized training today follows DDP-style approaches requiring full model replication on each node. While practical for those with H100 clusters at their disposal, this remains out of reach for the vast majority of potential contributors.
Delving back into the decentralized training literature, @m_ryabinin, Research Scientist at @togethercompute has been proposing "SWARM Parallelism", a model-parallel training algorithm designed for poorly connected, heterogeneous and unreliable devices.
It will be a pleasure to have him as a guest for the 3rd edition of interviewing researchers with their paper on June 2nd. If you have any questions on the paper for the author, feel free to comment on the thread below ! 🧵
Replying to @HKydlicek
@HKydlicek meme game never cease to amaze me
Thought verification issues in RL were just a math problem? Think again. Many code datasets have such weak test cases that even simple brute-force solutions pass.
To fix this we’ve updated our CodeForces dataset with over 100GB of test cases to greatly improve verifiability! 🛠️"
39
people dont realize how crazy this is
Introducing PCCL, the Prime Collective Communications Library — a low-level communication library built for decentralized training over the public internet, with fault tolerance as a core design principle.
In testing, PCCL achieves up to 45 Gbit/s of bandwidth across datacenters in Europe and 25 GBit/s training intercontinental across North America and Europe.
Exicting time in the decentralized training field with @PrimeIntellect and @NousResearch. Can’t wait for the new releases 🚀
Replying to @NousResearch
Atropos is one of three primary components in our overall RL system's design. Today we release our environments framework, soon our training and inference as well.
nousresearch.com/introducing…
Together, these pieces culminate in an asynchronous, distributed system for state of the art post training with reinforcement learning.
These systems are a key component of Psyche, our upcoming decentralized training network, which coordinates pre-training, mid-training, and post-training workloads globally.
Open source is a cornerstone of progress, and we are putting every effort toward advancing the state of the art through collaborative efforts. In this spirit, we will be hosting a hackathon in San Francisco on May 18th - more details to come soon!


























