[Docs] Prefix checkpoint cache landed: multi-turn prefill reuse, EXACT parity, 57.8x measured
This commit is contained in:
1 parent
736c541887
commit
8c8ae4485a
1 file changed
+22
-7
+22
-7
@@ -96,11 +96,23 @@ Five ideas explain almost everything that will surprise you:
|
|||||||
dropped it to ~54% (measured A/B 101.2% → 54.2%). The residual ~54% is genuine
|
dropped it to ~54% (measured A/B 101.2% → 54.2%). The residual ~54% is genuine
|
||||||
kernel-launch submission cost (~1300 launches/token), removed only by HIP graph
|
kernel-launch submission cost (~1300 launches/token), removed only by HIP graph
|
||||||
capture.
|
capture.
|
||||||
|
- **Multi-turn prefill is no longer re-paid: the prefix checkpoint cache landed
|
||||||
|
(2026-12-01, measured).** Ported in concept from strata `--auto-ckpt` and proven
|
||||||
|
in `proofs/prefix_cache.lean` (`restore_equiv`, 0 `sorryAx`), `serve_gen` restores
|
||||||
|
the longest cached prefix of a prompt and prefills only the NEW suffix tokens;
|
||||||
|
the checkpoint saves at `pos` (prompt + generated tokens) so the next turn reuses
|
||||||
|
the whole prior context. Pinned anchors {512,1024} are never evicted (I3), LRU at
|
||||||
|
cap 6, KV snapshots unpooled (freed on eviction). **Parity EXACT** (restore ==
|
||||||
|
cold re-prefill, token-for-token, both prewarm- and decode-state checkpoints).
|
||||||
|
Measured on `gfx1150`, Inkling-2-Mini, FP16 KV, greedy: a 605-token prompt with a
|
||||||
|
600-token cached prefix prefills in **2.29 s vs 132.5 s cold (57.8×)**, end-to-end
|
||||||
|
**3.2 s vs 133.2 s (41.8×)**. This collapses the *second-turn* time-to-first-token;
|
||||||
|
the *first* turn still pays sequential prefill (batched prefill is the next brick).
|
||||||
- **What is NOT done yet (the frontier):** HIP graph capture (collapse the
|
- **What is NOT done yet (the frontier):** HIP graph capture (collapse the
|
||||||
per-token launches → near-zero host CPU), batched prefill / prefix cache (make
|
per-token launches → near-zero host CPU), batched/chunked prefill (M>1 attention
|
||||||
large-prompt time-to-first-token seconds, not minutes), and the expert-GEMV
|
+ grouped MoE, make the *first* large-prompt time-to-first-token seconds, not
|
||||||
math speedup (WMMA). These are the M2 performance work — correctness is
|
minutes), and the expert-GEMV math speedup (WMMA). These are the M2 performance
|
||||||
already there; speed is the next axis.
|
work — correctness is already there; speed is the next axis.
|
||||||
|
|
||||||
## The road to the goal
|
## The road to the goal
|
||||||
|
|
||||||
@@ -118,9 +130,11 @@ on 2026-12-01 (see *Current state*). The path, in order:
|
|||||||
4. **Weights → device** — ✅ landed (resident `WeightCache`, lazy expert load).
|
4. **Weights → device** — ✅ landed (resident `WeightCache`, lazy expert load).
|
||||||
5. **Serve wiring + first chat** — ✅ landed (`strata-ctl` link, EXACT parity,
|
5. **Serve wiring + first chat** — ✅ landed (`strata-ctl` link, EXACT parity,
|
||||||
first real GUI conversation 2026-12-01).
|
first real GUI conversation 2026-12-01).
|
||||||
6. **M2 performance** — ⏳ the current frontier: HIP graph capture (host CPU),
|
6. **M2 performance** — ⏳ the current frontier: prefix checkpoint cache ✅ landed
|
||||||
batched prefill / prefix cache (time-to-first-token), expert-GEMV WMMA
|
(multi-turn prefill reuse, EXACT parity, 57.8× measured); HIP graph capture
|
||||||
(decode tok/s). Measured against the reference, no unmeasured claims.
|
(host CPU), batched/chunked prefill (first-turn time-to-first-token), and
|
||||||
|
expert-GEMV WMMA (decode tok/s) still pending. Measured against the reference,
|
||||||
|
no unmeasured claims.
|
||||||
7. **M3 Lyra co-processor** — remote drafting, semantic domain routing,
|
7. **M3 Lyra co-processor** — remote drafting, semantic domain routing,
|
||||||
domain-aware expert prefetch.
|
domain-aware expert prefetch.
|
||||||
|
|
||||||
@@ -135,6 +149,7 @@ lean proofs/slab_ring_dma.lean
|
|||||||
lean proofs/bus_lifecycle.lean
|
lean proofs/bus_lifecycle.lean
|
||||||
lean proofs/serve_session.lean
|
lean proofs/serve_session.lean
|
||||||
lean proofs/arena_plan.lean
|
lean proofs/arena_plan.lean
|
||||||
|
lean proofs/prefix_cache.lean
|
||||||
|
|
||||||
# Opt-in live tests against the real Inkling artifact:
|
# Opt-in live tests against the real Inkling artifact:
|
||||||
cargo test -p vetta-infer-ld -- --ignored inkling
|
cargo test -p vetta-infer-ld -- --ignored inkling
|
||||||
|
|||||||
Reference in new issue
Block a user