메모리 효율적인 헤드별 청킹을 통한 컨텍스트 병렬 처리
Untied Ulysses: Memory-Efficient Context Parallelism via Headwise Chunking
February 24, 2026
저자: Ravi Ghadia, Maksim Abraham, Sergei Vorobyov, Max Ryabinin
cs.AI
초록
Transformer 모델로 긴 시퀀스를 효율적으로 처리하려면 일반적으로 컨텍스트 병렬화를 통해 연산을 여러 가속기로 분할해야 합니다. Ring Attention이나 DeepSpeed Ulysses와 같은 이 방법론 계열의 주류 접근법들은 컨텍스트 차원의 확장을 가능하게 하지만 메모리 효율성에 중점을 두지 않아 지원 가능한 시퀀스 길이를 제한합니다. Fully Pipelined Distributed Transformer나 activation 오프로딩과 같은 더 발전된 기법들은 학습 처리량을 희생시키면서 가능한 컨텍스트 길이를 더욱 확장할 수 있습니다. 본 논문에서는 어텐션 헤드 수준에서 세분화된 청킹을 수행하는 간단하면서 효과적인 컨텍스트 병렬화 기법인 UPipe를 제안합니다. 이 기법은 자기 어텐션의 활성화 메모리 사용량을 크게 줄여 활성화 메모리 장벽을 극복하고 훨씬 더 긴 컨텍스트 길이를 구현합니다. 우리의 접근 방식은 320억 매개변수 Transformer 모델에서 어텐션 계층의 중간 텐서 메모리 사용량을 최대 87.5%까지 절감하면서도 학습 속도 측면에서는 기존 컨텍스트 병렬화 기법과 동등한 성능을 보입니다. UPipe는 단일 8xH100 노드에서 Llama3-8B를 학습할 때 500만 토큰의 컨텀스트 길이를 지원하며, 이는 기존 방법 대비 25% 이상 향상된 수치입니다.
English
Efficiently processing long sequences with Transformer models usually requires splitting the computations across accelerators via context parallelism. The dominant approaches in this family of methods, such as Ring Attention or DeepSpeed Ulysses, enable scaling over the context dimension but do not focus on memory efficiency, which limits the sequence lengths they can support. More advanced techniques, such as Fully Pipelined Distributed Transformer or activation offloading, can further extend the possible context length at the cost of training throughput. In this paper, we present UPipe, a simple yet effective context parallelism technique that performs fine-grained chunking at the attention head level. This technique significantly reduces the activation memory usage of self-attention, breaking the activation memory barrier and unlocking much longer context lengths. Our approach reduces intermediate tensor memory usage in the attention layer by as much as 87.5% for 32B Transformers, while matching previous context parallelism techniques in terms of training speed. UPipe can support the context length of 5M tokens when training Llama3-8B on a single 8timesH100 node, improving upon prior methods by over 25%.