Context Inkling 2 Mini is a 26.4B mixture-of-experts model from Thinking Machines Lab, tested on four OnePlus 11 phones. IQ4_NL and Q8_0 are four-bit and eight-bit weight formats. Inkling 2 Mini study.
Prefix caching is usually explained as reusing the KV cache for a shared prompt. That is the common case, and it is already valuable: a system prompt, a retrieved document, or a long instruction block does not need to be prefilled again. But a hybrid model may carry more state than attention keys and values. Saving only the KV cache can miss the recurrent convolutions, the delta state, or other per-layer buffers that the next token depends on.
In a model with a gated delta-rule layer, delta state is that layer's fixed-size recurrent memory. A delta-rule layer is a linear-attention layer that updates a matrix memory instead of keeping a growing KV table. At each token, the layer forms a prediction from the current memory, compares it with the new value, and applies a correction equal to the difference, scaled by a learned gate. That difference is the "delta." If a prefix cache restores the attention KV but not this matrix, the layer's history is inconsistent and the next token can diverge. Short convolution buffers and other per-layer recurrent state need the same treatment.
Recurrent convolutions are the other common piece. A short depthwise convolution runs across the token sequence and keeps a rolling buffer of recent hidden states. The next token's convolution reads that buffer, so it is state too: saving the KV cache without the convolution buffer gives the layer a truncated history even if the attention side looks intact.
The local Inkling 2 Mini work treated the prefix as a complete sequence state. The test was deliberately small: a 62-token document, a new question, and a cold request as the control. The point was correctness and break-even, not a production cache service.
The saved-prefix experiment
The server prefilled the document, saved the complete sequence state, and restored it before evaluating the new question suffix. The restored request evaluated 18 new prompt tokens out of 80, emitted the same four greedy tokens as the cold request, and contained the expected answer. The four-token continuation included extra text, so the probe verifies caching and token parity rather than strict response formatting.
| Request path | New prefill tokens | Reused tokens | First token | Completion |
|---|---|---|---|---|
| Cold | 80 | 0 | 22.61 s | 26.80 s |
| Restored prefix, request only | 18 | 62 | 7.87 s | 11.98 s |
| Restored prefix, including restore | 18 | 62 | 8.00 s | 12.11 s |
The saved file was 37,463,388 bytes, including two automatic context checkpoints. Restoring it added 0.13 s for this short prefix. The default path then created two more automatic checkpoints inside the request, each about 0.8–1.0 s. Disabling automatic checkpoints and pinning the prefix reduced the snapshot to 16,027,688 bytes, about 57% smaller, with restore times of 0.086 and 0.105 s.
A live resident prefix produced similar latency at this size: 8.34 s to first token for the first question, 8.02 s for a changed question, against 21.89 s cold. The server restored a checkpoint at the 62-token boundary, while active attention and convolution buffers stayed on their owner phones.
Where the state lives
At context 2,048 and one slot, full-attention KV used 64 MiB, sliding-window KV used 200 MiB, and recurrent state used 3.66 MiB. The four workers owned approximately 33.46, 100.37, 100.37, and 33.46 MiB in layer order. Those are preallocated backend buffers, not a promise that a multi-document cache will fit.
This is the practical limit. A prefix cache is not free memory. It competes with the live sequence, the scratch buffers, and the model weights. The capacity for live prefixes depends on the room on each layer owner, especially the two middle workers. A cache that fits on the coordinator but not on the layer owner is not a cache.
Break-even on a real workflow
The OrationMail trial used two public prefixes: a 256-token selected-message summary and a 64-token tone rewrite. Both were synthetic selections with different dates, names, and details. The question was whether the saved prefix paid for its prime and save cost on the second request.
| Workflow | Uncached to first text | Restored to first text | Matched pair, uncached → restored | Prime and save | Net savings on two requests |
|---|---|---|---|---|---|
| Selected-message summary | 66.8–67.3 s | 27.9–29.1 s | 159.25 → 81.19 s | 40.91 s | 37.15 s |
| Requested tone rewrite | 24.0–25.4 s | 14.7–15.2 s | 78.17 → 58.89 s | 12.12 s | 7.17 s |
The cached tokens came entirely from public instructions. The two synthetic selections stayed isolated, and the exact-phrase guard rejected a rewrite that changed “Please do not move the meeting” into “Please keep the meeting as scheduled.” The cache restored the computation, not the authority to send.
What a cache key has to include
A prefix is only reusable if the next request is really the same prefix. The key should include the model, tokenizer, context and KV settings, the exact rendered prefix tokens, the template, and the runtime's state compatibility. If any of those change, the old snapshot is not a match.
The security boundary is separate. Public instructions can be shared. Account content, message bodies, and session state should be scoped and erased on expiry or logout. A cache hit must not cross accounts, and a stale snapshot must not be restored after a policy change.
The honest result
A 62-token prefix produced a large first-token improvement on this testbed: 22.61 s cold to 7.87 s restored. That is a useful result. It is not a claim that every prefix is worth caching. The prime and save cost, the snapshot size, the layer-owner memory, and the break-even reuse count all have to be measured for the workflow.
The right default is conservative: cache public, stable prefixes first; measure the second reuse; and keep account content out of shared entries. The cache is a performance tool, not a permission model.