RidgeFill: Training-Free Late-Layer Cache Fill for Faster Prefill
Not on the map. Why?
Abstract (arXiv)
RidgeFill shortens prefill by not computing most of a model's upper layers for the prompt. The lower layers run exactly up to a split; from the split layer's state a per-layer map predicts every later layer's input, and each late layer writes its cache from that prediction. The design follows YOCO and DeepSeek-V4.1-Flash, where the projection is trained into the model. RidgeFill retrofits it onto models that were never trained for it: the map is a ridge regression fitted once in closed form from one pass over calibration text, the layer's own projections run unchanged, and a chosen set of rows, the last few thousand tokens, and every decoding step run the full model. Nothing is trained and no token is dropped. Most of the work was in measurement, finding a repeatable methodology. Loss averaged over all tokens hides RidgeFill's error. Needle retrieval in the filled region, loss on tokens that depend on distant context, and splice tests that swap filled keys or values for exact ones show which component carries it: the keys on Llama-3.1-8B, half of it in their scale, and the values and the recurrent state on Qwen3.5-9B. On Qwen3.8-27B in a llama.cpp fork on an A100, time to first token is 1.25 to 1.31x faster at 16K to 120K tokens with the maps in VRAM; RULER changes by -1.2 and -1.4 points and LongBench v2 by -1.4; the 95 % intervals include zero but do not rule out losses of a few points. On Qwen3.8-Flash-Next in vLLM it is 1.50 to 1.60x faster than exact at 9K to 32K tokens, with RULER's needle tasks at 99.8 against 100.0 and perplexity on novel tokens 2.65 % higher [-0.02 %, +4.93 %]. On three 8 to 9B reference models, at the same split and tail as the identity fill, the fitted map retrieves 49.1 and 49.6 more filled-region RULER points on the two dense models (at that split Llama's loss is worse), and its long-document loss is +/-0.03 nats of the released SwiftKV checkpoint's.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 38 of its 53 references that are in the map. Submitted 6 Nov 2026.
Builds on
38 of 53 references.
References · 38
- 2024The Llama 3 Herd of Modelscited by 16,113
- 2025Qwen3 Technical Reportcited by 9,994
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 6,685
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 2,115
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,853
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,559
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,557
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 1,163
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 1,003
- 2024Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Headscited by 961
- 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 902
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 798
26 more
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 690
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 672
- 2024EAGLE: Speculative Sampling Requires Rethinking Feature Uncertaintycited by 667
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 581
- 2018A Discourse-Aware Attention Model for Abstractive Summarization of Long Documentscited by 493
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 447
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 431
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 397
- 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decodingcited by 354
- 2021LexGLUE: A Benchmark Dataset for Legal Language Understanding in Englishcited by 338
- 2026DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compressioncited by 220
- 2024You Only Cache Once: Decoder-Decoder Architectures for Language Modelscited by 175
- 2019The Lean mathematical librarycited by 164
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 143
- 2024Hyper-Connectionscited by 99
- 2024LazyLLM: Dynamic Token Pruning for Efficient Long Context LLM Inferencecited by 80
- 2024Discovering the Gems in Early Layers: Accelerating Long-Context LLMs with 1000x Input Token Reductioncited by 49
- 2026Cross-Model KV Cache Transfer in LLM Families: A Closed-Form Linear Mapping for Prefill Reusecited by 25
- 2024SwiftKV: Fast Prefill-Optimized Inference with Knowledge-Preserving Model Transformationcited by 24
- 2025FastKV: Decoupling of Context Reduction and KV Cache Compression for Prefill-Decoding Accelerationcited by 18
- 2025ReplaceMe: Network Simplification via Depth Pruning and Transformer Block Linearizationcited by 18
- 2025Speculative Prefill: Turbocharging TTFT with Lightweight and Training-Free Token Importance Estimationcited by 17
- 2024KV Prediction for Improved Time to First Tokencited by 14
- 2026POP: Prefill-Only Pruning for Efficient Large Model Inferencecited by 4
- 2026Shallow Prefill, Deep Decoding: Efficient Long-Context Inference via Layer-Asymmetric KV Visibilitycited by 3
- 2026TokenGate: Adapting LLMs for Fast and Memory-Efficient Prefill with Learned Token Pruningcited by 1
Built on by
Not cited yet.