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

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Dotzel, Jordan, Akhauri, Yash, AbouElhamayed, Ahmed S., Jiang, Carly, Abdelfattah, Mohamed, Zhang, Zhiru
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866914743767269376
author Dotzel, Jordan
Akhauri, Yash
AbouElhamayed, Ahmed S.
Jiang, Carly
Abdelfattah, Mohamed
Zhang, Zhiru
author_facet Dotzel, Jordan
Akhauri, Yash
AbouElhamayed, Ahmed S.
Jiang, Carly
Abdelfattah, Mohamed
Zhang, Zhiru
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2404_04900
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Radial Networks: Dynamic Layer Routing for High-Performance Large Language Models
Dotzel, Jordan
Akhauri, Yash
AbouElhamayed, Ahmed S.
Jiang, Carly
Abdelfattah, Mohamed
Zhang, Zhiru
Computation and Language
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.
title Radial Networks: Dynamic Layer Routing for High-Performance Large Language Models
topic Computation and Language
url https://arxiv.org/abs/2404.04900