Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

RidgeFill: Training-Free Late-Layer Cache Fill for Faster Prefill

RidgeFill fills late-layer caches with a fitted map to speed up prefill

  • Problem Prefill makes users wait because every prompt token runs through every layer before the first output token. Skipping late layers breaks quality on models never trained for it.
  • Method RidgeFill runs the lower layers exactly up to a split. A closed-form ridge map then predicts each late layer's input from the split state, so late layers skip most of their arithmetic.
  • Results On Qwen3.8-27B on an A100, time to first token is 1.25 to 1.31x faster at 16K to 120K tokens, with RULER changing by -1.2 and -1.4 points.

Figure 2: Two ways to fill a late layer’s cache from a middle layer’s state. (a) kishida’s KVA projector:
trained heads on the layer-18 state write each late l…

Figure 2 .Two ways to fill a late layer’s cache from a middle layer’s state. (a) kishida’s KVA projector: trained heads on the layer-18 state write each late layer’s keys and values directly, bypassing the layer’s own key and value projections. (b) RidgeFill: a closed-form ridge map predicts each late layer’s input; the layer’s own projections run unchanged, and on a Gated DeltaNet layer so does its state update. Exact rows (§2.4) skip the map and run the layer from its exact input.

Original paper · CC BY 4.0 · Dylan Johnston, Robert P. Smith · RidgeFill: Training-Free Late-Layer Cache Fill for Faster Prefill · Original paper figure · Extracted the figure area from page 3 of the original PDF.

Why prefill is the bottleneck

A long prompt keeps the user waiting, because the model runs every prompt token through every layer before the first output token. At 120,000 tokens on Qwen3.8-27B, that wait is 128 seconds on an A100. Decoding the answer afterwards is comparatively fast, so the prompt pass dominates the time the user spends waiting.

That spare compute is why a draft model or head can spend it guessing tokens that the model then verifies.

RidgeFill uses the spare bandwidth in prefill instead, by reading one extra map for each late layer. In return, a late layer skips most of its arithmetic for most prompt tokens, computing only its key and value projections or its recurrent state update. Since a filled cache has no affordable verifier, the rows most likely to matter stay exact instead.

Speculative decoding run in reverse

In return, it skips most of the late layers' arithmetic, and a filled cache has no affordable verifier.

The closest precedent is DeepSeek-V4.1-Flash, which builds on YOCO and takes upper-layer caches from a projection of a middle layer's state. That model trains the whole network to absorb the error, while RidgeFill trains nothing. The KVA projector by kishida retrofitted the same design onto Qwen3-8B with trained per-layer heads that write keys and values from the layer-18 state.

RidgeFill differs in three ways: it predicts the layer input rather than keys and values, it fits a ridge regression in closed form, and it computes some rows exactly. Figure 2 contrasts the two designs, with the layer's own projections running unchanged in RidgeFill.

How the ridge map is fitted

The ridge map multiplies the split state by a matrix and adds an offset, so the predicted input is a linear function of that state. On the reference models the hidden size is 4,096, so each filled layer gets its own 4,096 by 4,096 matrix and a 4,096-long offset. Each pair is chosen on calibration text: the unmodified model runs over it, and the split state and true layer input are recorded for every token.

The chosen pair is the one whose predictions come closest to those true inputs.

The penalty stops the map from overfitting the calibration text, and the penalty strength is set by alpha. The split states and layer inputs are stacked as rows of two matrices, and each is centred by its mean before the solve. The offset makes the map right on average, because it equals the true input mean minus the matrix times the split-state mean.

The authors run one capture pass over the unmodified model and keep running sums of X transpose X, X transpose Y and the two means. Each document is added one at a time, with fp32 products summed in fp64, and the result matches solving on all rows at once.

The penalty is set as alpha equal to lambda times the trace of X transpose X, divided by d_in. Tying alpha to the input size means the same lambda means the same thing on every model. The search picked 0.03 on Llama-3.1-8B, Qwen3.5-9B and Qwen3.8-27B, and 0.01 on Qwen3-8B. On Qwen3-8B the split 18 value was 0.003, and the next-best reference value scored within about 0.0004.

The four arms and their controls

The study compares four treatments for prefix rows in the late layers: exact, no fill, identity, and RidgeFill. Exact runs the true late input for every row, so nothing is skipped. Identity copies the split state as each late layer's input, which is the fill that POP uses. RidgeFill instead feeds each late layer the predicted input, a matrix applied to the split state plus an offset.

Figure 3: The arms. (a) The four fills of §2.1, shown for the layers above the split: exact, no fill, identity
(POP’s fill) and RidgeFill; the lower layers and…

Figure 3 .The arms. (a) The four fills of §2.1, shown for the layers above the split: exact, no fill, identity (POP’s fill) and RidgeFill; the lower layers and the tail run exactly in every arm. (b) The reference study’s controls (§3.3): attention-selected exact rows, the same number of random rows, the same number of rows added to the tail, and no fill with the tail lengthened to the fill’s cost. Row positions are illustrative.

Original paper · CC BY 4.0

The ridge map is fitted on calibration text by recording the split state and the true layer input for every token. Each map takes the split state as input and writes the closest prediction of the true input, which the fit checks against the true inputs. The penalty keeps the entries of each matrix small, so the map doesn't overfit the calibration text.

The closed-form solution means nothing is trained iteratively, and the predicted input passes through the layer's own normalization and projections.

Figure 3 draws the four arms, with the lower layers and the tail running exactly in every arm. The reference study adds controls of equal cost to the attention-selected rows, which Figure 3b lists beside them. The random-row control keeps the same number of exact rows, but chooses them at random. The longer-tail control adds the same number of rows to the exact tail instead.

Those controls let the study separate the value of choosing rows from the value of simply spending more exact compute.

Choosing which rows stay exact

Attention is summed over the heads of attention layers 3, 7, 11 and 15 that lie below the split, so the selector reads the question when one ends the prompt.

The reason for this rule is a bound: if a row's value changes by delta, a query's attention output changes by exactly a_ij times delta. The error is not the same size everywhere, so the other selectors also protect tokens by their class.

Of the eligible tokens, the rarest 25 % run exactly, which came to 3 to 10 % of prefix positions in that run.

Pushing the filled cache back toward the exact one

RidgeFill's fill error lands in different places depending on the layer type, and that difference sets how the corrections must work. In an attention layer, a filled row's error stays in that row's own keys and values. Both corrections remove an average error rather than predict any single token's error, and neither is trained.

The value rescale works on each late attention layer, where the first c tail rows pass through the value projection twice.

The terminal-state correction is the second step, and it runs only in Flash-Next's quality mode.

The paper doesn't test the value rescale on its own in the final runs, so its separate effect stays unmeasured.

Finding where the error lives

Splice tests answered the first question by swapping filled keys or values for exact ones and watching the loss. On Llama-3.1-8B, exact keys remove 97.0 % of the added novel-token loss, and exact values remove 88.1 %. Exact keys and values together remove 100.0 % of that loss, which is the sign that both parts carry it. Replacing only the key scale with an exact-tail value leaves a +0.502 nats loss, half the added loss removed.

The splices tell a different story on Qwen3.5-9B, where exact keys remove 25.8 % and exact values remove 52.0 % of the added loss. Exact keys and values together remove 91.5 % on that model, and the key scale barely moves the loss. On Qwen3-8B, exact keys alone push the loss up, and exact keys and values together remove 98.8 % of it. The splices also show that Qwen3-8B needs keys and values fixed together, as the authors state in the introduction.

Two separate measurements, the splice loss and the RULER gap closed, point to where the error sits in each model.

Table 23: Splices at the primary split. RULER at 8K to 32K: 136 samples on Llama and 138 on Qwen3-8B.
On Qwen3-8B, exact and RidgeFill differ on only 20 sample…

Table 23 .Splices at the primary split. RULER at 8K to 32K: 136 samples on Llama and 138 on Qwen3-8B. On Qwen3-8B, exact and RidgeFill differ on only 20 samples, too few for an interval on the gap closed. On Qwen3.5 the splices act on the five upper attention layers; the fifteen upper Gated DeltaNet layers stay filled in every row, including “exact keys and values”. Value-scale rows have no interval, and no value-scale run exists for Qwen3-8B.

Original paper · CC BY 4.0

The splice runs on the filled attention layers, so Qwen3.5-9B's five upper attention layers are the only ones swapped. The authors did not run the value scale on Qwen3-8B, and the splice rows for Llama have no interval on the value scale.

The 27B speed and quality results

On Qwen3.8-27B, one A100 with the resident maps cut time to first token from 12.97 s to 10.38 s at 16K. At 120K the same comparison runs from 128.10 s to 100.01 s, giving speedups of 1.249× at 16K and 1.281× at 120K. Streaming the maps from host memory costs 0.5 s at 16K and nothing at 120K. The speedup falls short of the skipped compute: skipping 30 % at 16K would allow 1.43×, yet the measured speedup is 1.25×.

The authors attribute the gap to three likely costs, including attention in the 12 late attention layers, and they didn't profile how the difference divides among them.

RULER overall changed by −1.19 points at 16K and by −1.42 points at 32K, relative to stock. Both intervals include zero, running from −3.13 to +0.79 at 16K and from −3.21 to +0.35 at 32K. Variable tracking scores zero in both arms, so that cell carries no information.

Against the unmodified model, the two arms nearly agree at the median position, and top-1 agreement reaches 94.64 % at 16K. The mean KL is carried by a few documents, with a mean of 0.2656 at 32K against a median of 0.0042. Copy-heavy documents show RidgeFill's loss far below stock's, but that reflects a departure from the model rather than a gain.

On 22 of 25 checked documents, the BF16 model sat closer to stock than to RidgeFill.

Qwen3.8-Flash-Next in vLLM: speed, quality and the PCIe caveat

A 64K request finishes in 47.5 s instead of 82.6 s, and RULER's needle tasks score 99.8 against exact's 100.0. Qwen3.8-Flash-Next has 48 layers, with every fourth layer a sparse-attention layer and the other 36 Gated DeltaNet. The authors serve an MXFP4/FP8 quantization in a vLLM fork, and they replace one file so the indexer's block selection is deterministic.

Figure 11: Serving on Qwen3.8-Flash-Next. (a) Time-to-first-token speedup over exact, each a ratio of
medians of five timed requests paired within a server sta…

Figure 11 .Serving on Qwen3.8-Flash-Next. (a) Time-to-first-token speedup over exact, each a ratio of medians of five timed requests paired within a server start, against the ceiling 1/r of §2.5. (b) Median time of a whole request over 25 single-needle samples at 64K, measured on separate server starts. No intervals were computed for the timings.

Original paper · CC BY 4.0

The 64K figure is a median whole-request time over 25 RULER samples, taken across separate server starts. Table 16 gives the speedups: RidgeFill reaches 1.50× at 9K, 1.54× at 16K, 1.60× at 32K and 1.74× at 64K. Quality mode, which keeps protected rows exact, reaches 1.25× at 9K and 1.27× at 32K. So the authors treat the improvement as not established and quality mode as optional.

Quality mode gives up about half of RidgeFill's gain over exact, at 1.22 to 1.27× against 1.50 to 1.60×. The authors attribute the likely cost to the protected rows, because the terminal-state correction is a single addition per layer. The measured speedups reach 85 to 92 % of the compute ceiling: 1.50× against 1.64× at 9K, and 1.60× against 1.88× at 32K.

The authors didn't measure expert traffic, so a compute-bound and a PCIe-bound prefill predict the same ceiling here.

Reference study across split depths

On the hybrid Qwen3.5-9B the gap is only 3.3 points, and its interval runs through zero. Llama's margin holds over 8K to 64K, while at 8K to 32K, the lengths Qwen3-8B covers, the Qwen3-8B margin is 49.1 points.

At half depth the fitted fill on Llama reaches +0.085 nats against +0.563 for the identity fill. At 5/8 depth it reaches +0.030 nats against +0.406 for the identity fill, so the deep split reverses the order. At 3/8 depth on Llama the fitted fill scores +1.006 nats against +0.505 for the identity fill, and the authors trace this shallow failure to the keys.

On Qwen3-8B at 3/8 depth the fitted fill scores +0.044 nats against +0.026 for the identity fill.

Attention-selected exact rows cut Llama's novel-token loss at 3/8 depth from +1.006 to +0.067. On the worst Llama document, 128K tokens of source code, the same rows move the loss from +8.189 to +0.180. Every loss on Qwen3-8B falls on a multi-needle task, and the authors have no tested explanation for it.

The controls in this comparison ran only at 8K to 32K.

Where the Limitations section says the evidence stops

Key-token loss stays 0.41 and 0.43 nats above exact on Llama and Qwen3.5 even with attention-selected rows, so retrieval alone doesn't settle a split. Without rows, RidgeFill alone sits 1.2 to 3.3 nats above exact on key tokens across the three reference models. A needle score hides this cost, which is why the authors ask readers to check key-token loss before choosing a split.

Two of the three row selectors depend on the question, and the authors don't claim any of them fits a new model. The 27B probe was never run with the question hidden, so its question dependence is untested. For such caches, the evidence supports a deeper split with no rows, which gives 96.1 retrieval on Llama at half depth.

Calibration documents run to about 30K tokens, while the test documents run to 128K. The 27B has no identity-fill arm, so its results compare RidgeFill only with stock.

RULER and the agreement study stop at 32K, and above that only the 108-item LongBench v2 long group measures quality. On 22 of 25 disagreement documents at 32K, the BF16 model is closer to stock than to RidgeFill.

Paper info

Authors
Dylan Johnston, Robert P. Smith
Venue
arXiv · Preprint
First published
2026-11-6
Added
2026-11-9
Updated
2026-11-6
Version
v1
arXiv
2611.09709
DOI
10.5281/zenodo.23890246
Category
cs.LG · cs.CL
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

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.

Quote from the paper

Dylan Johnston, Robert P. Smith (2026). RidgeFill: Training-Free Late-Layer Cache Fill for Faster Prefill. arXiv:2611.09709v1. https://doi.org/10.5281/zenodo.23890246

BibTeX
@article{johnston2026ridgefill,
  title = {{RidgeFill: Training-Free Late-Layer Cache Fill for Faster Prefill}},
  author = {Dylan Johnston and Robert P. Smith},
  year = {2026},
  eprint = {2611.09709},
  archivePrefix = {arXiv},
  doi = {10.5281/zenodo.23890246},
  url = {https://arxiv.org/abs/2611.09709v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up