Deep Learning

Is DeepSpeed Ulysses the best choice for training models with extremely long context windows?

LA Asked by Laura Simmons · 05-02-2025
0 upvotes 12,187 views 0 comments
The question

I am working on a legal-tech AI that needs to process 100k+ token sequences. Standard Data Parallelism fails, and even ZeRO-3 struggles with the activation memory at that length. Is DeepSpeed Ulysses the right path? I've read it uses sequence parallelism to split the workload. How does it compare to FlashAttention-2 in terms of memory saving for long-context deep learning?

3 answers

0
PA
Answered on 07-02-2025

DeepSpeed Ulysses is specifically designed for this scenario. Unlike standard parallelism, Ulysses splits the sequence dimension across GPUs. It uses an "All-to-All" communication pattern to reshuffle data before and after the attention computation. The beauty of it is that it is complementary to FlashAttention-2. You use FlashAttention to save memory on a single GPU, and you use Ulysses to scale that across multiple GPUs. This combination is what allowed teams to break the 100k and even 1M token barrier. It is much more communication-efficient than older sequence parallel methods.

0
ED
Answered on 09-02-2025

Does Ulysses require any specific interconnect hardware like InfiniBand to be effective, or will standard Ethernet work for a small cluster?

RO 10-02-2025

Edward, while it works on Ethernet, the All-to-All communication is very heavy on bandwidth. If you're on a 10Gbps Ethernet, you'll likely see the GPUs idling while waiting for data. For long contexts with DeepSpeed Ulysses, you really want NVLink or InfiniBand to ensure that the communication doesn't completely eclipse the actual computation time.

0
GA
Answered on 11-02-2025

We switched to Ulysses for our document analysis model and the memory scaling was linear. It's much easier to configure than Pipeline Parallelism for long sequences.

LA 12-02-2025

Gary is spot on. Pipeline Parallelism introduces "bubbles" and complexity that Ulysses simply avoids by keeping the model layers intact on each device while sharding the data.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session