让普通团队也能训练百万级长序列模型,突破显存瓶颈。
Arctic Long Sequence Training: Scalable And Efficient Training For Multi-Million Token Sequences
- 采用无需依赖注意力机制的单卡与多卡内存优化技术
- 单卡可训50万词元,4节点集群支持超1500万词元
- 兼容Hugging Face模型,开源可用,适合长文本任务研究者
长序列对RAG、长文档摘要、多模态等应用至关重要,现代大模型如Llama 4 Scout支持最高1000万词元序列。然而,开源社区普遍缺乏系统支持,导致长序列训练困难。即使在现代NVIDIA H100 80GB GPU集群上,基于Hugging Face的Llama 8B模型在超过32K序列时也会因两项原因显存不足:一、训练负载未充分使用单卡内存;二、多卡内存扩展方案难以用于HF模型。为此提出北极长序列训练(ALST),结合无注意力依赖的单卡与多卡内存优化,实现多种HF模型的开箱即用长序列训练。ALST可在单张H100 GPU上训练50万词元序列,单个8xH100节点支持370万词元,4节点集群超1500万词元,较32K基线提升超400倍。项目已通过DeepSpeed与Arctic Training开源。
原文摘要 · Abstract (English)
Long sequences are critical for applications like RAG, long document summarization, multi-modality, etc., and modern LLMs, like Llama 4 Scout, support max sequence length of up to 10 million tokens. However, outside of enterprise labs, long sequence training is challenging for the AI community with limited system support in the open-source space. Out-of-box, even on a modern NVIDIA H100 80GB GPU cluster, training Llama 8B model with sequence over 32K runs out of memory on a basic Hugging Face (HF) model due to two reasons: i) LLM training workloads are not optimized to fully leverage a single GPU memory, ii) existing solutions for leveraging multiple GPU memory are not easily available to HF models, making long sequence training inaccessible. We address this with Arctic Long Sequence Training (ALST). It offers a combination of attention-agnostic single GPU and multi-GPU memory optimizations, that enables it to support out-of-box training of multi-million sequence length for a wide variety of HF models. ALST supports training Meta's Llama 8B model with 500K sequence length on a single H100 GPU, 3.7M on a single 8xH100 GPU node, and over 15M on a 4 node cluster, an increase of over 400x compared to the 32K baseline for the latter. ALST is fully compatible with HF models and open-sourced via Deepspeed https://www.deepspeed.ai/tutorials/ulysses-alst-sequence-pallellism/ and Arctic Training https://github.com/snowflakedb/ArcticTraining/blob/main/projects/sequence-parallelism/README.md.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。