Echo:用于大语言模型训练与推理的误差补偿4比特张量并行通信
Echo: Error-Compensated 4-Bit Tensor-Parallel Communication for LLM Training and Inference
AI总结:
Echo是一种4比特张量并行通信方案,通过误差反馈控制累积误差,在不损失模型精度的前提下,显著提升LLM训练与推理的通信速度,且无需专用低精度硬件。
摘要:
张量并行在每一层的两个依赖矩阵乘法之间插入了一个全归约(all-reduce)操作,因此其通信成本无法被隐藏,且会随着计算速度超过互连带宽而不断增长。将发送值从16比特改为4比特可将该成本降低近4倍,但全归约需要对携带的值进行求和,而每次求和的舍入操作都会引入误差。模型质量取决于这些误差在各层的累积情况,然而现有方法均单独处理每次全归约操作。我们提出了Echo,一种用于训练和推理的4比特全归约方案,可控制累积误差。Echo以4比特传输数据,以高精度进行求和,因此无论使用多少GPU,每次调用时每个值最多仅需量化两次。求和操作会揭示每次引入的误差,Echo将这些误差反馈到后续调用中,使旧误差相互抵消而非累积。我们证明,累积误差与网络深度无关,始终保持在有限范围内。在A100 GPU上,对于1GB消息,Echo比16比特NCCL全归约快2.09倍;在空闲互连环境下,它可将首token生成时间加速最高1.16倍,训练步骤时间加速最高1.09倍;当背景流量增加时,上述加速比分别可达1.44倍和1.38倍。在Qwen3-8B模型上,Echo在7个基准测试中的平均准确率与16比特推理的差距在0.4个点以内;在100亿token预训练中,其最终损失比16比特训练的损失低不到0.9%。Echo无需FP8或FP4硬件支持。
英文摘要:
Tensor parallelism ends every layer with an all-reduce that sits between two dependent matrix multiplications, so its cost cannot be hidden and grows as compute outpaces interconnect bandwidth. Sending 4-bit instead of 16-bit values would cut this cost by nearly 4x, but the all-reduce must add the values it carries, and rounding the sum injects an error at every call. Model quality depends on how these errors accumulate over layers, yet existing methods treat each call on its own. We present Echo, a 4-bit all-reduce for training and inference that controls the accumulated error. Echo moves data in 4 bits and sums in high precision, so each value is quantized at most twice per call for any number of GPUs. The summation reveals each injected error, and Echo feeds it back into later calls, so old errors cancel instead of accumulating. We prove that the accumulated error stays bounded independently of depth. On A100 GPUs, Echo is 2.09x faster than the 16-bit NCCL all-reduce on 1 GB messages. It speeds up the time to first token by up to 1.16x and the training step by up to 1.09x on an idle interconnect, and by up to 1.44x and 1.38x as background traffic grows. It keeps the average accuracy over seven benchmarks within 0.4 points of 16-bit inference on Qwen3-8B. In 10B-token pretraining, its final loss is less than 0.9% above that of 16-bit training. Echo needs no FP8 or FP4 hardware.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。