Large language models run every token through every layer, regardless of difficulty. We present TIDE, a post-training system that attaches tiny learned routers at periodic checkpoint layers and, at inference time, selects the earliest layer whose hidden state has converged for each token. TIDE requires no model retraining, works with any HuggingFace causal LM, auto-detects GPU architecture, and supports float32, float16, and bfloat16 through fused CUDA kernels. On an NVIDIA A100 with DeepSeek R1 Distill 8B, TIDE achieves 100% prefill exit rate (5% of tokens exit at layer 11, the remaining at layer 31), reduces prefill latency by 7.2%, and increases single-batch throughput by 6.6%. During autoregressive decoding, 98-99% of tokens exit early while the model correctly solves a multi-step math problem with 95 unique output tokens. On Qwen3 8B (36 layers), throughput improves by 8.1% at batch size 8. Calibration on 2,000 WikiText samples takes under 3 minutes and produces a ~4 MB router checkpoint. The system comprises 1,308 lines of Python and 1,081 lines of CUDA/C++ with 74 passing tests. Code: https://github.com/RightNow-AI/TIDE
Figures & tables
System
Decoder
Post-training
Per-token
CUDA
Universal
DeeBERT ( Xin et al., 2020 )
✗
✓
✓
✗
✗
CALM ( Schuster et al., 2022 )
Enc-Dec
✗
✓
✗
✗
LayerSkip ( Elhoushi et al., 2024 )
✓
✗
✓
✗
✗
EE-LLM ( Chen et al., 2023b )
✓
✗
✓
✗
✗
SkipDecode ( Del Corro et al., 2023 )
✓
✓
✗
✗
✗
MoD ( Raposo et al., 2024 )
✓
✗
✓
✗
✗
Table 1: Comparison of early exit systems for transformer models.
Figure 1: Tide system overview. Left : one-time calibration collects hidden states from a frozen model, computes per-token cosine similarity to the final layer, and trains a binary router MLP at each checkpoint. Right : at inference, the full forward pass runs (preserving the KV cache), then routers evaluate each checkpoint post-hoc and select the earliest converged layer for logit computation. Numbered steps show execution order.
Target Model
Hidden Dim
Bottleneck
Phi-2 / TinyLlama
2048
64
Phi-2 / TinyLlama
2048
128
Phi-3-mini
3072
128
LLaMA-8B / Mistral-7B
4096
128
LLaMA-8B / Mistral-7B
4096
256
LLaMA-13B
5120
128
Table 2: Kernel template specializations. Each entry compiles a dedicated kernel for the given hidden/bottleneck dimension pair.
Model
Layers
θ
Tokens
Exit%
Distribution
DeepSeek R1 Distill 8B
32
0.85
322
100%
L11:16, L31:306
DeepSeek R1 Distill 8B
32
0.50
322
100%
L11:16, L31:306
Qwen3 8B
36
0.85
155
100%
L35:155
Qwen3 8B
36
0.50
155
100%
L11:11, L23:5, L35:139
Table 3: Prefill exit rates on 16 real text prompts (A100, bf16).
Model
Metric
Baseline
Tide
Δ
DeepSeek R1 8B
Latency ( θ=0.85 )
39.08 ms
36.94 ms
− 5.5%
DeepSeek R1 8B
Latency ( θ=0.50 )
39.08 ms
36.26 ms
− 7.2%
DeepSeek R1 8B
Throughput BS=1
973 tok/s
1,037 tok/s
+ 6.6%
DeepSeek R1 8B
Throughput BS=8
8,668 tok/s
7,252 tok/s
− 16.3%
Qwen3 8B
Latency ( θ=0.85 )
46.82 ms
44.14 ms
− 5.7%
Qwen3 8B
Throughput BS=1
258 tok/s
271 tok/s
+5.0%
Table 4: Prefill latency and throughput (A100, bf16, 20 runs). Δ is relative to vanilla model baseline.
θ
Exit Rate
Unique Tokens
Correct
Exit Layer
1.0 (off)
0%
99
✓
—
0.85
98.4%
95
✓
L31
0.70
99.2%
95
✓
L31
0.50
99.6%
95
✓
L31
Table 5: Decode exit rates and output quality on a math word problem (DeepSeek R1 Distill 8B, 256 tokens, temperature=0, A100).
Figure 2: Per-token early exit in a 32-layer model. Token “the” converges at layer 8 and skips the remaining 24 layers. Token “cat” exits at layer 16. Only “sat” requires full depth. Tide evaluates the routers ϕk post-hoc after the full forward pass completes.
Large Language Models (LLMs) have demonstrated exceptional performance across diverse domains but are increasingly constrained by high inference latency. Early Exit has emerged as a promising solution to accelerate inference by dynamically bypassing redundant layers. However, in decoder-only architectures, the efficiency of Early Exit is severely bottlenecked by the KV Cache Absence problem, where skipped layers fail to provide the necessary historical states for subsequent tokens. Existing solutions, such as recomputation or masking, either introduce significant latency overhead or incur severe precision loss, failing to bridge the gap between theoretical layer reduction and practical wall-clock speedup. In this paper, we propose River-LLM, a training-free framework that enables seamless token-level Early Exit. River-LLM introduces a lightweight KV-Shared Exit River that allows the backbone's missing KV cache to be naturally generated and preserved during the exit process, eliminating the need for costly recovery operations. Furthermore, we utilize state transition similarity within decoder blocks to predict cumulative KV errors and guide precise exit decisions. Extensive experiments on mathematical reasoning and code generation tasks demonstrate that River-LLM achieves 1.53 to 2.16 times of practical speedup while maintaining high generation quality.
Speculative decoding can substantially accelerate LLM inference, but realizing its benefits in practice is challenging due to evolving workloads. We present TIDE (Temporal Incremental Draft Engine), a serving-engine-native framework that integrates online draft adaptation directly into high-performance LLM inference systems. TIDE reuses target model's intermediate hidden states generated during inference as training signals for draft adaptation, thereby avoiding additional target model computation and serving-time overhead. It employs adaptive runtime control to activate speculation and draft model training only when beneficial. TIDE exploits heterogeneous clusters by mapping inference and training to appropriate GPU classes. Across diverse real-world workloads, TIDE achieves up to 1.66× throughput over no-speculation baselines while recovering performance on misaligned workloads where static draft models degrade throughput. TIDE also reduces training time by up to 3.02× and storage requirements by 24× compared to existing draft training approaches, and improves system throughput by up to 1.22× on heterogeneous GPU clusters.
Diffusion Large Language Models (dLLMs) have emerged as a competitive alternative to autoregressive (AR) models, offering better hardware utilization and bidirectional context through parallel block-level decoding. However, as dLLMs continue to scale up with mixture-of-experts (MoE) architectures, their deployment on resource-constrained devices remains an open challenge. Existing AR-based methods often incur either prohibitive I/O overhead or significant compute bottlenecks. In this work, we propose TIDE, a novel resource-efficient inference system that leverages the temporal stability of expert activations during the diffusion process within the block. Specifically, we leverage the temporal stability of expert activations during the diffusion process within the block and introduce an interval-based expert refresh strategy that updates the expert placement in an I/O-aware fashion. To ensure optimal performance, we formulate the inference scheduling as a mathematical programming problem, solving for the optimal interval that minimizes I/O traffic and CPU computation. Most importantly, TIDE is a lossless optimization that requires no model training, providing a "free lunch" acceleration for dLLM inference. In a single GPU-CPU system, we demonstrate that TIDE achieves up to 1.4× and 1.5× throughput improvements over prior baselines on LLaDA2.0-mini and LLaDA2.0-flash models, respectively.