T3:用于计算与集合通信细粒度重叠的透明跟踪与触发机制
T3: Transparent Tracking & Triggering for Fine-grained Overlap of Compute & Collectives
AI总结:
针对分布式大模型中张量并行等技术的串行通信开销及软件细粒度交错的资源争用问题,提出软硬件协同的T3机制,通过地址空间配置、硬件跟踪触发与计算增强内存实现通信计算高效重叠,显著提升大模型通信密集子层性能。
摘要:
大语言模型的训练与推理愈发依赖分布式技术。这类技术需要跨设备通信,而随着设备数量增加,通信会降低扩展效率。尽管部分分布式技术可通过独立计算与通信重叠来掩盖通信开销,但张量并行(Tensor Parallelism, TP)等技术本质上会让通信与模型执行串行化。掩盖这类串行通信的一种思路是,将通信与(待传输数据的)生产者操作进行细粒度交错。然而,在软件层面实现通信与计算的这种细粒度交错难度较高。此外,和所有并发执行场景一样,这种交错需要计算与内存资源在计算和通信间共享,会引发资源争用,进而降低重叠效果。\n为解决上述挑战,我们提出T3架构,采用软硬件协同设计,在最小化与计算的资源争用的同时,透明地实现串行通信的重叠。T3通过对生产者输出地址空间的简单配置,将生产者操作与后续通信透明融合,仅需少量软件改动。在硬件层面,T3新增了轻量级的跟踪与触发机制,用于协调生产者的计算与通信过程;还将计算增强型内存用于通信伴随的计算任务。最终,T3减少了资源争用,高效实现了串行通信与计算的重叠。对于T-NLG等重要Transformer模型,T3将通信密集型子层的几何平均速度提升了30%(最高47%),数据移动量几何平均减少22%(最高36%)。此外,T3的优势随模型规模扩大依然存在:在约5000亿参数的模型PALM和MT-NLG中,子层的几何平均加速比达29%。
英文摘要:
Large Language Models increasingly rely on distributed techniques for their training and inference. These techniques require communication across devices which can reduce scaling efficiency as the number of devices increases. While some distributed techniques can overlap, and thus, hide this communication with independent computations, techniques such as Tensor Parallelism (TP) inherently serialize communication with model execution. One approach to hide this serialized communication is to interleave it with the producer operation (of the communicated data) in a fine-grained manner. However, this fine-grained interleaving of communication and computation in software can be difficult. Furthermore, as with any concurrent execution, it requires compute and memory resources to be shared between computation and communication, causing resource contention that reduces overlapping efficacy. To overcome these challenges, we propose T3 which applies hardware-software co-design to transparently overlap serialized communication while minimizing resource contention with compute. T3 transparently fuses producer operations with the subsequent communication via a simple configuration of the producer's output address space and requires minor software changes. At the hardware level, T3 adds a lightweight track and trigger mechanism to orchestrate the producer's compute, and communication. It further uses compute-enhanced memories for communication's attendant compute. As a result, T3 reduces resource contention, and efficiently overlaps serialized communication with computation. For important Transformer models like T-NLG, T3 speeds up communication-heavy sublayers by 30% geomean (max 47%) and reduces data movement by 22% geomean (max 36%). Furthermore, T3's benefits persist as models scale: geomean 29% for sublayers in $\sim$500-billion parameter models, PALM and MT-NLG.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。