RidgeFill: training-free prefill skipping cuts TTFT 1.6x, 64K request 82.6s to 47.5s

Public_Umpire_1099 · reddit · 2026-11-03

A Reddit-posted paper introduces RidgeFill, a fully training-free way to shorten prefill by skipping most upper layers for the prompt: lower layers run exactly to a split point, then a once-fitted closed-form ridge regression predicts every later layer's input, and each late layer writes its cache from that prediction with its own projections unchanged. Selected rows, the last few thousand tokens and every decoding step still run the full model — nothing trained, no token dropped.

Results:

Methodology: the idea originates from DeepSeek's V4.1, which trains with prefill approximation baked in so the model absorbs the error; porting it degraded context recall, so the authors mapped where the error lives and chose to bypass the most sensitive prefill projections rather than train a heavier (task-dependent) component. Community-adaptable on local-inference-grade hardware, with per-model tuning strongly advised and exhaustive ablations in the paper.

Shipped as a llama.cpp fork, HF maps for five models, tcclaviger's vLLM fork, and Radiance v1.3.0.

Original post →

More from Infra

Infra channel →