Abstract
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.
Introduction
As Large Language Models (LLMs) scale to hundreds of billions of parameters, the associated computational costs in terms of memory, latency, and power become prohibitive for many real-world applications. Traditional optimization strategies typically rely on static pruning—permanently removing weights—or early exiting, where computation stops after a fixed depth.
However, these approaches face two significant limitations. First, static methods are inherently rigid; they fail to account for the varying complexity of inputs, where a common token like "the" requires far less processing than a specialized technical term. Second, early-exit strategies often operate under the assumption that importance decreases monotonically with depth. This research demonstrates that in modern, ultra-deep LLMs, the middle layers are often the most redundant, making them prime candidates for skipping.
Methodology: The Radial Architecture
To address these limitations, we propose Radial Networks, a paradigm shift from fixed sequential processing to dynamic, token-level routing.
The Residual Ratio
The foundation of this approach is the Residual Ratio, a metric developed to quantify the contribution of each layer. By measuring the norm of a residual block's output relative to its input, we can determine exactly how much "value" a layer adds to a token's representation.
Dynamic Routing
In a Radial Network, the traditional linear sequence (Layer 1 → Layer 2 → ... → Layer N) is replaced by a hub-and-spoke model. A central Router module—implemented as a lightweight Multi-Layer Perceptron (MLP)—acts as a traffic controller. For every token at every step, the router analyzes the current state and decides which layer to visit next, or whether the token has reached sufficient maturity to exit the network.
This architecture enables Layer Reuse, where a token can visit the same layer multiple times if necessary, and utilizes a Unified Cache to manage memory efficiently across dynamic routing paths, unlike the per-layer KV caches in standard Transformers.
Key Insights and Results
Our empirical analysis across the OPT (Open Pre-trained Transformer) family reveals several critical properties of layer sparsity.
Scale Enables Sparsity
A primary finding is that as models grow larger, individual layers contribute less to the final output. In the OPT-125M model, the median residual ratio is approximately 20%. However, in the OPT-66B model, this drops to just 5.9%. This "layer sparsity" suggests that massive models are significantly over-parameterized, with many layers performing near-identity transformations.
The U-Shaped Importance Curve
Profiling revealed that importance is not distributed linearly. The first and last layers are typically the most critical for feature extraction and final prediction, respectively. The middle layers are often the most redundant. This explains why traditional early-exit strategies, which skip the final layers, are often suboptimal.
Dynamic Depth Efficiency
Simulations on the OPT-13B model indicate that most tokens only require 40 to 70 blocks out of the available 80 to maintain performance levels. By decoupling total capacity (the "library" of layers) from dynamic depth (the number of layers actually visited), Radial Networks can maintain high performance while significantly reducing FLOPs.
Conclusion and Future Work
Radial Networks offer a promising path toward more efficient LLMs by exploiting token-level variance and layer redundancy. While this work establishes a robust theoretical and empirical framework, several challenges remain. Training complexity is increased due to the need to co-learn router and layer weights, often requiring sophisticated distillation. Furthermore, while layer-skipping is more hardware-friendly than fine-grained pruning, current frameworks are optimized for static execution. Future research will focus on large-scale training to benchmark "accuracy-per-FLOP" and developing specialized kernels to realize the full latency benefits of dynamic routing on modern hardware.
Summary updated