In this article
Before adopting the faster path, verify that state survives the operations that reuse it and disappears when the application clears it.
Recurrent layers carry a working state across tokens. Copying that state for each evaluation can add memory traffic even when model weights and the prompt are unchanged. In the llama.cpp b12816 snapshot published on 27 November, the graph reads the state from cache in place where possible. The release also documents RWKV6/7 read-before-write handling, a graph-reuse check, and work around speculative decoding snapshots. Performance improvement is the maintainers’ description, and its size depends on the path used.
Define a correctness matrix around state
Record an uninterrupted continuation, then compare cases that reuse the graph, clear the model memory, or resume after a rejected speculative draft. Use a fixed model revision and either compare logits within an agreed tolerance or verify deterministic outputs where the backend supports that. Alternate two independent sessions in the same test. Watch for accidental reuse between slots and for divergence that starts at the first token after rollback.
Measure decode under realistic slot use
Use the same weights, backend, device and sequence policy for both versions. Report tokens per second for steady generation and the tail latency of decode steps. Include a single active session and a few interleaved sessions. Keep prompt processing separate, because a read-path change that helps steady decode may move an end-to-end benchmark only slightly when prompts dominate.
Gate rollout on repeatability
Run the matrix on the backends you ship and repeat it with speculative decoding disabled. The release notes mention separate Vulkan, Metal and WebGPU considerations, so one CUDA result covers only its own path. Track the first failing operation if outputs diverge. A session that runs fast but answers differently after a cache clear is a functional regression, even if the average benchmark improves.
Watch for errors that delayed averages miss
A problem with state handling may remain invisible until a request reuses a slot after a prior run. Include a long warm run followed by a short independent one and verify each completion using its own reference. Add a multi-turn case with the same first exchange and a different follow-up input. These cases make it easier to tell a rollback regression from normal differences caused by sampling.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.