科学图像视觉变换器中的序列长度扩展:基于Frontier平台
Sequence Length Scaling in Vision Transformers for Scientific Images on Frontier
AI总结:
本研究提出面向ViT的分布式序列并行方法,支持百万级令牌,在2048块GPU上实现94%扩展效率,并将气候温度预测精度提升20%。
摘要:
视觉变换器(ViTs)对于科学图像领域的基础模型至关重要,包括地球科学应用,这得益于其处理长序列长度的能力。虽然文本变换器启发了ViTs中序列长度的扩展,但将其适配到ViTs引入了独特的挑战。我们为ViTs开发了分布式序列并行技术,使其能够处理多达100万(1M)个令牌。我们的方法利用DeepSpeed-Ulysses和长序列分割(Long-Sequence-Segmentation)结合模型分片,是首个在ViT训练中应用序列并行的技术,在2048块AMD-MI250X GPU上实现了94%的批处理扩展效率。评估ViTs中的序列并行性,特别是在高达100亿(10B)参数的模型中,揭示了显著的瓶颈。我们通过混合序列、流水线、张量并行以及闪存注意力(flash attention)策略来应对这些瓶颈,以扩展到超越单GPU内存限制。我们的方法将气候建模的温度预测准确性显著提升了20%,标志着首次在188K序列长度的全注意力矩阵上训练变换器模型。
英文摘要:
Vision Transformers (ViTs) are pivotal for foundational models in scientific imagery, including Earth science applications, due to their capability to process large sequence lengths. While transformers for text has inspired scaling sequence lengths in ViTs, yet adapting these for ViTs introduces unique challenges. We develop distributed sequence parallelism for ViTs, enabling them to handle up to 1M tokens. Our approach, leveraging DeepSpeed-Ulysses and Long-Sequence-Segmentation with model sharding, is the first to apply sequence parallelism in ViT training, achieving a 94% batch scaling efficiency on 2,048 AMD-MI250X GPUs. Evaluating sequence parallelism in ViTs, particularly in models up to 10B parameters, highlighted substantial bottlenecks. We countered these with hybrid sequence, pipeline, tensor parallelism, and flash attention strategies, to scale beyond single GPU memory limits. Our method significantly enhances climate modeling accuracy by 20% in temperature predictions, marking the first training of a transformer model on a full-attention matrix over 188K sequence length.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。