1# @ajax/mesh-ref-gpt2-kv
23GPT-2's KV cache: per layer, the K and V rows (768 wide, heads concatenated) of every position so far,
4and its digest (FNV-1a 64 over each layer's K then V rows). Rows are only appended; during a forward pass
5layer l's rows land before layer l + 1's, and `mesh_gpt2_kv_len` reports layer 0's count, as the Rust
6`Kv::len` does.
78**Ported from** `crates/mesh-ref/src/gpt2.rs` (`Kv`). Host only. **Tested** through the generation and
9prefill/decode golden data of `@ajax/mesh-ref-gpt2`.
1011## Differences
1213- `Vec<Vec<f32>>` per layer becomes one growable buffer per layer with a shared capacity and per-layer
14 row counts.