使用全流水线分布式 Transformer 训练超长上下文语言模型
Training Ultra Long Context Language Model with Fully Pipelined Distributed Transformer
AI总结:
本文提出 FPDT 全流水线分布式 Transformer,通过序列块流水线在 4 GPU 上训练 200 万上下文的 8B 模型,序列长度较 SOTA 提升 16 倍且 MFU 超 55%。
摘要:
具备长上下文能力的大型语言模型(LLM)是自然语言处理和计算生物学中复杂任务(如文本生成和蛋白质序列分析)不可或缺的组成部分。然而,直接在极长上下文上训练 LLM 需要大量 GPU 资源和更多内存,从而导致更高的成本与更大的复杂性。通过下游微调或适配来引入长上下文能力的替代方案则存在显著的设计局限。在本文中,我们提出 Fully Pipelined Distributed Transformer(FPDT,全流水线分布式 Transformer),用于以极高的硬件效率高效训练长上下文 LLM。对于 GPT 和 Llama 模型,与当前最先进的解决方案相比,我们在相同硬件上可训练的序列长度实现了 16 倍提升。借助专门的序列块流水线设计,我们现在仅用 4 个 GPU 即可训练具有 200 万序列长度的 8B LLM,同时保持超过 55% 的 MFU。我们提出的 FPDT 与现有训练技术无关,并被证明可在不同 LLM 模型上高效运行。
英文摘要:
Large Language Models (LLMs) with long context capabilities are integral to complex tasks in natural language processing and computational biology, such as text generation and protein sequence analysis. However, training LLMs directly on extremely long contexts demands considerable GPU resources and increased memory, leading to higher costs and greater complexity. Alternative approaches that introduce long context capabilities via downstream finetuning or adaptations impose significant design limitations. In this paper, we propose Fully Pipelined Distributed Transformer (FPDT) for efficiently training long-context LLMs with extreme hardware efficiency. For GPT and Llama models, we achieve a 16x increase in sequence length that can be trained on the same hardware compared to current state-of-the-art solutions. With our dedicated sequence chunk pipeline design, we can now train 8B LLM with 2 million sequence length on only 4 GPUs, while also maintaining over 55% of MFU. Our proposed FPDT is agnostic to existing training techniques and is proven to work efficiently across different LLM models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。