RidgeFill
A training-free LLM inference acceleration method that fits inter-layer mappings through closed-form ridge regression, skipping computation of most later layers and directly filling the KV cache to reduce prefill-stage overhead.
Timeline (last 90 days)
RidgeFill is a training-free late-layer cache filling method: shallow layers are computed exactly up to a cut layer, then for each subsequent layer a closed-form ridge regression fits the inter-layer mapping to predict that layer's input, and that layer's projection writes out the KV cache, skipping computation in most of the model's later layers.
RidgeFill's mapping is fitted in closed form from a single forward pass over a piece of calibration text; it is fitted only once, and the layers' original projections are left unchanged and not fine-tuned, so nothing is trained and no tokens are dropped.
In its design, RidgeFill draws on the architectural idea in YOCO and DeepSeek-V4.1-Flash of using projections to map shallow-layer states to deep-layer inputs, but retrofits it onto a frozen model that was never trained for this.
Averaging loss over all tokens masks RidgeFill's filling error, because errors in the filled regions are diluted by the large number of easy tokens.
The authors designed three complementary detection lines: needle retrieval within the fill region, loss on tokens that depend on long-range context, and a splice test (replacing the filled key or value with the exact value and then comparing).
On Llama-3.1-8B, RidgeFill's error mainly comes from the key, with half of it manifesting in the scale; on Qwen3.5-9B, the error falls on the value and the recurrent state.
Running Qwen3.8-27B with a llama.cpp branch on an A100, with the mapping placed in VRAM, the first-token time in the 16K to 120K token range is 1.25 to 1.31 times that of exact computation.
In this experiment on an A100, RidgeFill causes RULER to drop by 1.2 and 1.4 points and LongBench v2 to drop by 1.4 points, with the 95% confidence interval containing zero but unable to rule out a real loss of a few points.
Running Qwen3.8-Flash-Next on vLLM, RidgeFill reaches 1.50 to 1.60 times the speed of exact computation in the 9K to 32K token range.
In the vLLM experiment, RidgeFill's RULER needle task is 99.8 versus 100.0, and new-word perplexity is 2.65% higher, with an interval of -0.02% to +4.93%.
3 more timeline events
All Facts (13)
RidgeFill is a training-free late-layer cache filling method: shallow layers are computed exactly up to a cut layer, then for each subsequent layer a closed-form ridge regression fits the inter-layer mapping to predict that layer's input, and that layer's projection writes out the KV cache, skipping computation in most of the model's later layers.
50%UnverifiedRidgeFill's mapping is fitted in closed form from a single forward pass over a piece of calibration text; it is fitted only once, and the layers' original projections are left unchanged and not fine-tuned, so nothing is trained and no tokens are dropped.
50%UnverifiedIn its design, RidgeFill draws on the architectural idea in YOCO and DeepSeek-V4.1-Flash of using projections to map shallow-layer states to deep-layer inputs, but retrofits it onto a frozen model that was never trained for this.
50%UnverifiedAveraging loss over all tokens masks RidgeFill's filling error, because errors in the filled regions are diluted by the large number of easy tokens.
50%UnverifiedThe authors designed three complementary detection lines: needle retrieval within the fill region, loss on tokens that depend on long-range context, and a splice test (replacing the filled key or value with the exact value and then comparing).
50%UnverifiedOn Llama-3.1-8B, RidgeFill's error mainly comes from the key, with half of it manifesting in the scale; on Qwen3.5-9B, the error falls on the value and the recurrent state.
50%UnverifiedRunning Qwen3.8-27B with a llama.cpp branch on an A100, with the mapping placed in VRAM, the first-token time in the 16K to 120K token range is 1.25 to 1.31 times that of exact computation.
50%UnverifiedIn this experiment on an A100, RidgeFill causes RULER to drop by 1.2 and 1.4 points and LongBench v2 to drop by 1.4 points, with the 95% confidence interval containing zero but unable to rule out a real loss of a few points.
50%UnverifiedRunning Qwen3.8-Flash-Next on vLLM, RidgeFill reaches 1.50 to 1.60 times the speed of exact computation in the 9K to 32K token range.
50%UnverifiedIn the vLLM experiment, RidgeFill's RULER needle task is 99.8 versus 100.0, and new-word perplexity is 2.65% higher, with an interval of -0.02% to +4.93%.
50%UnverifiedOn three 8 to 9B reference models, under the same splitting and tail settings as identity fill, the fitted mapping recovers 49.1 and 49.6 additional fill-region RULER points on the two dense models, and long-document loss differs from the released SwiftKV checkpoint by within ±0.03 nats.
50%UnverifiedRidgeFill requires fitting a separate mapping for each model, the choice of calibration text affects the results, and the mapping must reside in VRAM, requiring trade-offs in scenarios with tight memory.
50%UnverifiedRidgeFill's benefit becomes more pronounced as context lengthens, with the speedup ratio stable in the 16K to 120K range; it has limited significance for short requests and is better suited as a tiered strategy that enables fill for latency-sensitive, extremely long-context requests and falls back to exact computation for accuracy-sensitive tasks.
50%