Abstract
Large Language Models (LLMs) have achieved remarkable performance across diverse tasks, but their massive parameter counts lead to significant computational overhead and latency. While "early-exiting"—terminating computation once a model reaches sufficient confidence—offers a potential solution, it is often hindered by systemic bottlenecks in modern inference pipelines. This paper, based on the dissertation by Sangmin Bae (KAIST, 2025), introduces three frameworks designed to resolve the "efficiency-dynamism" conflict: FREE, Relaxed Recursive Transformers, and Mixture-of-Recursions (MoR). These methods collectively address the missing KV cache problem and batch synchronization delays, achieving up to a 2.16x speedup while maintaining high model fidelity.
1. Introduction
As LLMs scale, the cost of inference becomes a primary barrier to deployment. Early-exiting algorithms aim to reduce this cost by allowing simpler tokens to bypass deeper layers of the network. However, two major technical hurdles have historically limited the practical utility of these algorithms: the Missing KV Cache Problem and the Batch Synchronization Issue.
In standard autoregressive decoding, each token requires the Key-Value (KV) caches from all previous layers. If a token exits early, the KV caches for subsequent layers are never computed, causing a "memory hole" that prevents the next token from being processed correctly. Furthermore, in batched inference on GPUs, the system must wait for the slowest request (the one using the most layers) to finish, effectively nullifying the gains from tokens that exit early.
2. Proposed Frameworks
2.1 FREE: Fast and Robust Early-Exiting
To address the KV cache deficiency, the FREE (Fast and Robust Early-Exiting) framework introduces Synchronized Parallel Decoding. Rather than attempting to approximate missing hidden states, FREE stacks the hidden states from early-exited tokens and processes them in a single, parallel pass alongside the next non-exiting token. Because LLM decoding is typically memory-bound rather than compute-bound, this parallel pass incurs negligible overhead. Additionally, FREE utilizes a Beta Mixture Model (BMM) to dynamically calculate confidence thresholds, ensuring robustness across different tasks without manual tuning.
2.2 Relaxed Recursive Transformers
This approach re-imagines the model architecture through Layer Tying, where a single block of layers is reused multiple times. To mitigate the performance degradation typically associated with parameter-sharing, the author introduces layer-wise LoRA (Low-Rank Adaptation) modules. This "relaxes" the weight-sharing constraint, allowing the model to recover the performance of deeper, non-recursive models. Crucially, because the layers are architecturally identical, tokens at different stages of completion can be batched together—a technique called Continuous Depth-wise Batching—which eliminates the batch synchronization bottleneck.
2.3 Mixture-of-Recursions (MoR)
Mixture-of-Recursions (MoR) extends the recursive concept by employing a learned router to determine the optimal number of loops for each token. By allowing the model to "think longer" for complex reasoning and "snap-decide" for simple syntax, MoR creates a new Pareto frontier for efficiency. It also introduces recursion-wise KV caching, which stores data only for the specific recursion steps a token actually utilizes, significantly reducing the memory footprint.
3. Experimental Evaluation
The frameworks were evaluated across a wide range of benchmarks, including summarization (SAMSum, CNN/DailyMail), question answering (SQuAD), and general language modeling (MMLU, ARC).
- Inference Speed: FREE achieved up to a 2.16x speedup on the SQuAD dataset while maintaining 99% of the original model's performance, consistently outperforming existing baselines like CALM.
- Parameter Efficiency: A recursive version of the Gemma 1B model outperformed standard 1B models (such as TinyLlama) and recovered the majority of the performance of the original Gemma 2B model.
- Resource Optimization: MoR models demonstrated a 19% reduction in training time and a 25% reduction in peak memory usage compared to vanilla Transformers at equal training FLOPs.
4. Discussion and Future Work
The research demonstrates that the conflict between dynamic inference and hardware efficiency can be resolved through co-designing architectures and decoding strategies. By treating recursion as a batching solution and exploiting the memory-bound nature of Transformers, these frameworks allow for significantly more efficient LLM deployment.
Future research directions include scaling these recursive strategies to models exceeding 70B parameters and developing custom CUDA kernels to further optimize the execution of multiple LoRA adapters in a single batch. Additionally, the application of these recursive "thinking loops" to multimodal data, such as video and audio, remains a promising area for exploration.
5. Conclusion
This work provides a comprehensive roadmap for accelerating LLM inference. By solving the structural issues of KV cache management and batch synchronization, the proposed early-exiting and recursive frameworks enable high-performance AI that is both faster and more resource-efficient than traditional static architectures.
Summary updated