arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2404.04900cs.CL
收藏

Radial Networks:面向高性能大语言模型的动态层路由

Radial Networks: Dynamic Layer Routing for High-Performance Large Language Models

Cornell University(康奈尔大学)

Jordan Dotzel, Yash Akhauri, Ahmed S. AbouElhamayed, Carly Jiang, Mohamed Abdelfattah, Zhiru Zhang

AI总结:

本文针对深层 LLM 的资源开销问题,通过残差连接分析揭示层稀疏性潜力,并提出由 router 引导的 Radial Networks,实现 token 级动态层路由与复用,从而降低计算和服务成本。

摘要:

大语言模型(LLM)通常难以满足严格的内存、延迟和功耗需求。为满足这些需求,研究者提出了多种形式的动态稀疏性,以逐输入为基础减少计算量。这些方法通过利用不同输入之间的差异改进了静态方法,而这种差异随着训练数据的指数级增长持续扩大。然而,现代模型的深度不断增加,目前已达到数百层,这为动态层稀疏性带来了机会,即跳过整个层的计算。在本工作中,我们通过分析残差连接来探究层稀疏性的实用性,并建立模型深度与层稀疏性之间的关系。例如,OPT-66B 模型中的残差块对其输出的贡献中位数为 5%。随后,我们利用这种动态稀疏性,提出 Radial Networks,它由经过训练的 router 模块引导,在层与层之间执行 token 级路由。这些网络可用于从顺序网络进行训练后蒸馏,也可以从头训练,以共同学习 router 和层权重。它们通过将层数与网络的动态深度解耦,使扩展到更大模型规模成为可能,并且其设计允许层复用。通过逐 token 改变计算量,它们减少了生成完整序列所需的总体资源。总体而言,这带来了容量更大的网络,同时显著降低了大语言模型的计算和服务成本。

英文摘要:

Large language models (LLMs) often struggle with strict memory, latency, and power demands. To meet these demands, various forms of dynamic sparsity have been proposed that reduce compute on an input-by-input basis. These methods improve over static methods by exploiting the variance across individual inputs, which has steadily grown with the exponential increase in training data. Yet, the increasing depth within modern models, currently with hundreds of layers, has opened opportunities for dynamic layer sparsity, which skips the computation for entire layers. In this work, we explore the practicality of layer sparsity by profiling residual connections and establish the relationship between model depth and layer sparsity. For example, the residual blocks in the OPT-66B model have a median contribution of 5% to its output. We then take advantage of this dynamic sparsity and propose Radial Networks, which perform token-level routing between layers guided by a trained router module. These networks can be used in a post-training distillation from sequential networks or trained from scratch to co-learn the router and layer weights. They enable scaling to larger model sizes by decoupling the number of layers from the dynamic depth of the network, and their design allows for layer reuse. By varying the compute token by token, they reduce the overall resources needed for generating entire sequences. Overall, this leads to larger capacity networks with significantly lower compute and serving costs for large language models.

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

↑