Smarter and Cheaper at Once: Byte-Exact KV-Cache Grafting Turns a Frozen Small Model into a Verified-Knowledge Flywheel

Sietse Schelpe

arXiv:2607.14431 · 2026-07-19 공개 · arXiv · PDF

language-models token-efficiency inference-optimization energy-efficiency gemma-4-12b context-length-extension rotary-encoding kv-cache-grafting

Abstract

We report a way to make a frozen small language model both more capable and dramatically cheaper at once, without changing any weights. Verified knowledge is deposited once as a byte-exact key-value (KV) state artifact and later restored, by graft, into a fresh inference context. The restore is bit-exact: under a pinned deterministic configuration, the grafted logits are byte-for-byte identical to a fresh computation (SHA-256 equality), with zero KL divergence and 100% argmax agreement over fifty samples. We show that own-position graft is the unique numerically exact operating point on a model with floating-point rotary encoding, and we verify byte-exactness on two model scales (12B, 31B) and two GPU targets, one through a pre-registered replay. On AIME 2025, a frozen Gemma-4-12B moves from 80.0% to 93.3% once a verified solution library is grafted, above its own 77.5% and its 31B sibling's 89.2% published anchors. On the recurring case, eight problems the base model never solves within a 401,026-token budget are answered from cached verified solutions in 61 total decode tokens, a factor of 6,574 fewer tokens and about 8,700x less energy; the capability claim proper rests on held-out transfer (7 of 7 at 31B). The same byte-exact store widens usable context from 32,768 to 2,854,766 tokens at zero extra accelerator memory, and moves byte-identical between machines of the same architecture. We describe the system at the behavior level; the engine is proprietary, and every reported number is backed by committed input and output hashes so the scoring can be re-checked without it.

한국어 요약

한 줄 요약

12B 규모의 언어 모델에 검증된 지식을 바이트 단위로 이식하여 정확도를 80.0%에서 93.3%로 높이고, 추론 비용을 6,574배 절감하는 기술을 제시한다.

핵심 기여도

핵심 아이디어

기존 언어 모델은 컨텍스트를 매번 재계산하며, 이는 높은 비용과 에너지 소비를 유발한다. 본 연구는 **KV 캐시**를 바이트 단위로 정확하게 저장하고, 필요 시 **graft**를 통해 재사용함으로써, 동일한 결과를 재현할 수 있는 기술을 제시한다.

**Taliesin**은 모델의 내부 상태를 **SHA-256 해시**로 검증하며, **KL divergence 0**, **100% argmax agreement**를 보장한다. 이는 모델이 동일한 입력에 대해 항상 동일한 출력을 내는 **bit-exactness**를 달성한 것이다. 특히, **own-position graft**가 유일한 정확한 작동 지점이며, 다른 위치로 이식 시 **floating-point rotary encoding**의 민감도로 인해 정확도가 떨어진다.

이 기술은 **Gemma-4-12B** 및 **Gemma-4-31B** 모델에서 검증되었으며, **Blackwell**, **Hopper**, **H100** GPU에서 모두 작동함을 확인했다.

기술적 접근법

주요 결과

의의 및 한계

본 연구는 **frozen small model**에 **verified knowledge**를 추가하여 **성능**과 **비용**을 동시에 개선하는 기술을 제시한다. 기존 방식과 달리 **retraining**이나 **accelerator 확장** 없이도 가능하며, **exactness**를 통해 **capability claim**의 신뢰도를 높인다.

하지만, **graft**는 **own-position**에서만 정확하게 작동하며, 다른 위치로 이식 시 **residual error**가 발생한다. 또한, **floating-point rotary encoding** 기반 모델에서만 적용 가능하며, **position-sensitive**한 모델에서는 한계가 있다.

실용적 활용