One translator lets seven open models reuse each other's reading of a document
In a paper posted on 25 November on the Base Labs site, Ben Geist of Ramp Labs and Thomas Villeneuve introduce speculative encoding, a 2.35-billion-parameter network that translates one model's hidden states into another's. Across seven models from four families it covers all 42 directions and keeps 96.9% of the target's native accuracy on documents up to 8k tokens.
Systems increasingly split work across several language models, and context moves between them as text. Before a model can use text it receives, it must prefill it, running every token through each of its layers to build its key-value cache, the stored working state it attends to while answering. The paper notes that prefill cost grows quadratically with context length and repeats work the sending model has already done. Earlier methods map the sender's cache straight into the receiver's, but they are trained for one pair of models at a time, so a system of n models needs n times n minus one translators, 42 for seven models.
Speculative encoding replaces those pairs with one network. It translates hidden states rather than caches, because every layer of every model has exactly one hidden state per token, while caches differ in head count, width and positional encoding, and linear-attention layers keep no cache at all. The translator predicts the target's hidden states, and the target then computes its own cache from them with its frozen weights, which keeps keys and values in a space it understands. The core is a transformer encoder and decoder shared by all models, with small projections and biases for each model layer and mixture-of-experts feed-forward steps that let experts specialize.
The encoder turns the source model's hidden states into a memory that is computed once and can be decoded later by any target. Across tokens, attention reads only a recent window, since each hidden state already encodes its preceding context, so the translator's cost grows linearly with document length while prefill grows quadratically. The design borrows from earlier work: building keys and values from hidden states, starting the decoder from the target's own token embeddings to bridge different tokenizers, training against the target's native behavior, and a shared core with thin per-model layers.
All 42 directions are trained jointly in two stages with every base model frozen. The first stage fits the translated cache to the target's native cache, giving the second, a distillation stage that matches the target's own predictions, a good starting point. Because gradients from different targets differ several-fold in size, each target's gradient is rescaled to the mean before averaging. The translator has 2.35 billion parameters and covers Qwen3.5 9B, Qwen3 14B, Llama 3.1 8B, Gemma 3 12B, Gemma 4 12B, Ministral 3 8B and Ministral 3 14B. Results are reported as retention, the target's accuracy with the translated cache as a share of its accuracy with its own cache, averaged over three seeds.
On documents up to 8,192 tokens, the length used in training, retention at full depth averages 96.9% over 12 tasks and all 42 directions, and the worst direction reaches 93.1%. Measured against the weaker of the two models in each pair, retention averages 100.3%, since a weaker source limits what its cache can carry. Tasks left out of training retained as much as tasks in the training data, 97.4% against 96.5%.
Long documents are where translation saves the most time. On multiple-choice questions over documents of 32k, 64k and 128k tokens, timed on one H200 with vLLM, the paper reports that at 32k the target starts answering 4x faster than re-prefilling from text while keeping over 90% of its accuracy. At 128k the full-depth translator is 2.5x faster than prefill, and lighter versions that predict fewer hidden states per token reach 6.1x and 7.5x while giving up only 1 to 2 points of retention. Retention does fall as documents grow, from 92% at 32k to 83% at 128k at full depth, on documents 4 to 16 times longer than any seen in training.
A model receiving a long context rarely needs all of it to answer one question, so the authors added a compressor that takes the target's question and shrinks the translated cache by a set ratio. It starts from SnapKV, a training-free method that keeps the positions the question attends to most, and distillation then improves the selection. At 32k and 64k, compression keeps retention within 2 points of the full translated cache even at 128x. At 128k every ratio beats the full cache, by up to 4.3 points at 64x, because most of a very long context is noise for any one question.
The authors see uses wherever models hand context to one another. A router could switch models mid-task without the new model rereading everything that came before, and in a group of agents one agent could ask another a question and receive just the part of its context that answers it. The limits are in the paper too: retention declines on long documents, which the authors hope to address, every model tested is an open model whose hidden states can be read, and the results come from question answering benchmarks. The post describes the method and results; it does not point to a released translator.
