arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.19472cs.CL
收藏

平衡并行混合神经网络中的计算负载与表示表达力

Balancing Computation Load and Representation Expressivity in Parallel Hybrid Neural Networks

Department of Computer Science, Concordia University(康科德大学计算机科学系);Ascend Team, Huawei Technologies(华为技术有限公司Ascend团队)

Mohammad Mahdi Moradi, Walid Ahmed, Shuangyue Wen, Sudhir Mudur, Weiwei Zhang, Yang Liu

AI总结:

提出并行混合网络架构FlowHN,通过FLOP感知的动态token分割平衡计算负载并融合分支发散输出,显著提升了语言建模的token处理速度与准确率。

摘要:

注意力机制和状态空间模型(SSMs)在混合网络中以串行或并行方式结合时,能提供互补的优势。在混合串行流水线中,它们交替地对输入应用 transformer,然后将其输出送入 SSM。这会导致各个组件出现空闲期,增加了端到端延迟并降低了吞吐量上限。在并行混合架构中,transformer 与 SSM 独立并行运行,这些配对被级联起来,一个配对的输出构成下一个配对的输入。存在两个问题:(i)利用这些独立分支本质上发散的输出来创建具有表达力的知识表示,以及(ii)在保持表示保真度的同时,平衡这些并行分支之间的计算负载。在这项工作中,我们提出了 FlowHN,这是一种新颖的并行混合网络架构,它适应各种负载平衡策略,通过在两个分支之间适当分配输入 tokens 来实现。FlowHN 的两个创新差异化因素包括:一是在注意力分支和 SSM 分支之间进行 FLOP 感知的动态 token 分割,从而在计算负载中实现高效平衡;二是一种融合来自各个分支的高度发散输出以增强表示表达力的方法。它们共同实现了更好的 token 处理速度,避免了瓶颈,同时与其他竞争工作相比,显著提高了准确性。我们在具有 135M、350M 和 1B 参数的模型上对自回归语言建模进行了全面实验。FlowHN 优于串行混合模型及其并行对应模型,实现了高达 4* 的更高 Tokens per Second(TPS)和 2* 的更好 Model FLOPs Utilization(MFU)。

英文摘要:

Attention and State-Space Models (SSMs) when combined in a hybrid network in sequence or in parallel provide complementary strengths. In a hybrid sequential pipeline they alternate between applying a transformer to the input and then feeding its output into a SSM. This results in idle periods in the individual components increasing end-to-end latency and lowering throughput caps. In the parallel hybrid architecture, the transformer operates independently in parallel with the SSM, and these pairs are cascaded, with output from one pair forming the input to the next. Two issues are (i) creating an expressive knowledge representation with the inherently divergent outputs from these separate branches, and (ii) load balancing the computation between these parallel branches, while maintaining representation fidelity. In this work we present FlowHN, a novel parallel hybrid network architecture that accommodates various strategies for load balancing, achieved through appropriate distribution of input tokens between the two branches. Two innovative differentiating factors in FlowHN include a FLOP aware dynamic token split between the attention and SSM branches yielding efficient balance in compute load, and secondly, a method to fuse the highly divergent outputs from individual branches for enhancing representation expressivity. Together they enable much better token processing speeds, avoid bottlenecks, and at the same time yield significantly improved accuracy as compared to other competing works. We conduct comprehensive experiments on autoregressive language modeling for models with 135M, 350M, and 1B parameters. FlowHN outperforms sequential hybrid models and its parallel counterpart, achieving up to 4* higher Tokens per Second (TPS) and 2* better Model FLOPs Utilization (MFU).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑