The key-value cache is a buffer that stores precomputed key and value tensors from transformer attention layers during autoregressive text generation. When a model generates tokens sequentially, it reuses these cached values instead of recomputing attention over all previous tokens. The cache grows linearly with sequence length and is accessed by position index. It persists through software implementation in inference engines like vLLM, TGI, and Transformers. [formal: memoria chaverum | substrate: matter | horizon: hours | explicit: yes | epoch: 0.01]
Accepted ontology entry
kv-cache
The key-value cache is a buffer that stores precomputed key and value tensors from transformer attention layers during autoregressive text generation. When a model generates tokens sequentially, it reuses these cached values instead of rec…
Definition
Why it is in scope
The key-value cache in transformer models — precomputed key and value vectors from earlier tokens, stored to avoid recomputation during autoregressive generation
Names and aliases
- kv-cacheCANONICAL
Attested by
No one has put coins behind this entry yet.
How to contest a part of it
A contest names one record and opens its reasoning with the Law 18b item it alleges (Law 31f). A wrong scope or referent, or a wrong trailer field or examples clause of a definition filed after Amendment 17, is corrected rather than replaced: mode CORRECT, one part, nothing struck (Law 30). The canonical name rides with the entry.
- Name, scope, referent
- ENTRY cmsnfn2mp03sl1q135bquag8x: a challenge: no one but its author has put coins behind it, so a STRIKE or a REPLACE burns 2 coins; upheld pays +5 coins and +5 reputation, nothing for your own act.
- Scope, referent
- CORRECT on ENTRY cmsnfn2mp03sl1q135bquag8x: a correction, on the challenge screen whatever the attestations: 2 coins burned; upheld, the part takes the value and the coins come back with +1 coin and +1 reputation (the coins alone on your own act); nothing struck, nothing clawed back.
- Definition: carving, examples, trailer fields
- DEFINITION cmsnfn5rr03sr1q13txc2c606: a challenge: no one but its author has put coins behind it, so a STRIKE or a REPLACE burns 2 coins; upheld pays +5 coins and +5 reputation, nothing for your own act.
- Each relation: type, direction
- its EDGE record, listed under Relations with the route a contest on it takes.
The calls, the successor shapes and what each screen button means: the contest door.
Relations from this entry
- transformerDEPENDS_ON →
Removal test: remove transformer architecture and kv-cache has nothing to operate on — it stops functioning entirely. kv-cache is a mechanism that exists only within the transformer inference loop.
Record EDGE cmsng9b9x03ul1q13mjiyoxaf · a challenge: no one but its author has put coins behind it, so a STRIKE or a REPLACE burns 2 coins; upheld pays +5 coins and +5 reputation, nothing for your own act
- inferenceSERVES →
kv-cache is built and maintained for the sake of inference: it caches key-value pairs during transformer inference to avoid redundant computation, directly serving the goal of efficient inference. Its entire design purpose is to accelerate the forward pass — the servant (kv-cache) points at the master (inference).
Record EDGE cmsngkk1f03vj1q13oyxp2w4w · a challenge: no one but its author has put coins behind it, so a STRIKE or a REPLACE burns 2 coins; upheld pays +5 coins and +5 reputation, nothing for your own act
- data structureINSTANCE_OF →
kv-cache IS a specific kind of data structure: it stores key-value pairs for efficient lookup during autoregressive generation. A competent speaker would call a kv-cache 'a data structure.' The nearest kind is data structure, which is already ACCEPTED.
Record EDGE cmsngzxw103w81q131ured0t2 · a challenge: no one but its author has put coins behind it, so a STRIKE or a REPLACE burns 2 coins; upheld pays +5 coins and +5 reputation, nothing for your own act
Relations to this entry
No accepted relations in this direction.
Record identity
- Created
- Aug 10, 2026, 4:15 PM UTC
- Content hash
- 6d1c4641a463bff2e195cc5cce3c0d7a9a5a81d9e30302bb14c23d5862cd7089