[Docs] Document the first real interactive GUI inference (2026-12-01, measured)

Federico completed the first real conversation with vetta-infer through the
strata-ctl web GUI on Sogliola:
  'Ciao, sono Federico' -> 'Ciao Federico! Piacere di conoscerti. Come posso aiutarti oggi?'
  2650 prompt + 53 completion tokens, 4.2 tok/s decode, first token 618 s.

The 618 s time-to-first-token is the sequential prefill of the ~2650-token agent
prompt (~140 ms/token); decode is ~4.2 tok/s. Recorded honestly as the current
performance frontier (not a hang).

- README M1 milestone: inference landed (EXACT parity + strata-ctl link), with a
  dedicated measured first-GUI-conversation bullet; refreshed verification counts
  (5 Lean files incl. inkling_loop.lean).
- ORIENTATION 'Current state (honest)': replaced the stale 'No token generated
  yet' with the real state (full forward, EXACT parity, agent link, first GUI
  chat, blocking-sync CPU fix A/B 101.2%->54.2%); marked road steps 1-5 landed,
  M2 performance (graph capture / batched prefill / expert WMMA) as the frontier.
This commit is contained in:
adm committed 2026-12-01 19:26:15 +01:00
1 parent 25200e2e79
commit b1f65942c8
2 files changed
+49 -29

No files matched your search

+44 -26
View File
@@ -71,38 +71,56 @@ Five ideas explain almost everything that will surprise you:
## Current state (honest)
- **CPU planning pipeline: complete and live-verified.** Inkling config →
total tensor classification (1244/1244) → canonical IR → physical schedule
(looped core unrolled to 48 steps) → a full base decode graph (675 ops) that
passes the Lean-proven arena validator.
- **GPU execution: begun.** Three kernels verified on the real `gfx1150`
(embed_bf16 exact, gemm_bf16 exact, rms_norm ~1e-6 relative error). The
hipcc → static-lib → FFI → launch → parity pipeline works end-to-end.
- **No token generated yet.** The engine does not currently run inference. The
GPU execution half (remaining kernels + executor + packer + serve wiring) is
the work in progress. Do not mistake the validated *plan* for a running
*engine*.
- **The engine runs real inference, end-to-end, and it is correct.** The full
48-visit Inkling-2-Mini forward (prelude + looped core ×3 passes with bank
rollback + coda + final depth-mix/softcap) runs on the real `gfx1150` weights.
Greedy decoding is **EXACT multi-token parity** against the hardened `strata`
reference (16 and 40 tokens, F32 and FP16 KV). The two root causes of the old
token-2+ gap were structural, not precision: per-pass KV pools and the
unpadded logit vocab (200058).
- **Linked to the agent framework.** `strata-ctl --serve` spawns `vetta-infer`
and serves its OpenAI-compatible API; the wire protocol (READY/INFO/T/PP/
RESUME/DONE/ERR) is field-for-field compatible. Verified live: capital queries,
Italian multi-turn, EOS/stop handling.
- **First real interactive GUI conversation (2026-12-01, measured).** Through the
`strata-ctl` web GUI on Sogliola (`http://sogliola:1234`), engine `vetta-infer`:
- prompt *"Ciao, sono Federico"* → *"Ciao Federico! Piacere di conoscerti.
Come posso aiutarti oggi?"*
- **2650 prompt + 53 completion tokens · 4.2 tok/s decode · first token 618 s.**
- The 618 s time-to-first-token is the **sequential prefill** of the GUI's
~2650-token agent prompt (~140 ms/token); decode itself is ~4.2 tok/s. This
is the honest current performance frontier, not a hang.
- **Host CPU during inference is no longer a busy-wait.** ROCm's default spin
host-wait schedule pinned the process at ~100% CPU; setting
`hipDeviceScheduleBlockingSync` before context creation (as the reference does)
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
capture.
- **What is NOT done yet (the frontier):** HIP graph capture (collapse the
per-token launches → near-zero host CPU), batched prefill / prefix cache (make
large-prompt time-to-first-token seconds, not minutes), and the expert-GEMV
math speedup (WMMA). These are the M2 performance work — correctness is
already there; speed is the next axis.
## The road to the goal
The destination: a working, measured inference engine that the agent framework
can talk to over the wire, replacing the old `strata` engine for a real
conversation. The path, in order:
conversation. **Steps 1–5 are landed** — the first real GUI conversation happened
on 2026-12-01 (see *Current state*). The path, in order:
1. **Inkling graph parity** — layer the model-specific refinements onto the base
graph: the learned attention-residual block-mix, loop controllers, ShortConv4,
relative-position bias, sliding-window attention, paged KV. (Blueprint:
`docs/inkling-forward-design.md`.)
2. **Remaining kernels** — flash attention (GQA, SWA, split-KV), MoE NVFP4
routing + experts + reduce, RoPE/KV-write, penalties/top-k. Each
parity-verified before use.
3. **Executor (`rt`)** — lower the `CompiledPlan` to kernel launches, UMA arena
broker, KV-cache management.
4. **BackendPacker + `.vbundle`** — weights → device, the real bundle build.
5. **Serve wiring** — connect the (already proven) serve-session FSM to real
generation and to `vetta-agents` over the line protocol. **First chat.**
6. **M2 performance** — WMMA tiling, expert residency/streaming, measured
tok/s against the reference.
1. **Inkling graph parity** — ✅ landed (attention-residual block-mix, loop
controllers, ShortConv4, relative-position bias, sliding-window attention,
per-pass KV). Blueprint: `docs/inkling-forward-design.md`.
2. **Remaining kernels** — ✅ landed (flash GQA/SWA, MoE NVFP4/MXFP8 routing +
experts + reduce, KV-write, L2-clip, relpos). Each parity-verified.
3. **Executor** — ✅ landed (full 48-visit forward on real weights).
4. **Weights → device** — ✅ landed (resident `WeightCache`, lazy expert load).
5. **Serve wiring + first chat** — ✅ landed (`strata-ctl` link, EXACT parity,
first real GUI conversation 2026-12-01).
6. **M2 performance** — ⏳ the current frontier: HIP graph capture (host CPU),
batched prefill / prefix cache (time-to-first-token), expert-GEMV WMMA
(decode tok/s). Measured against the reference, no unmeasured claims.
7. **M3 Lyra co-processor** — remote drafting, semantic domain routing,
domain-aware expert prefetch.