[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

+5 -3
View File
@@ -37,7 +37,8 @@ Built from the measured hardware physics and engineering lessons of our hardened
- **M0 (Foundation — done):** Workspace skeleton, Lean contracts (`slab_ring_dma.lean`), checked IO, serve parsing, telemetry, HIP ABI, full CPU test suite.
- **M0.5 (Architecture realignment — done):** approved microkernel design fixed in `docs/ARCHITECTURE.md`; crates realigned to `vetta-infer-*` (abi/kn/ld/cc/rt/lab/sp/nt/tm/gw); bus lifecycle Lean-verified (`bus_lifecycle.lean`); faithful Adaptive-K port; `strata-ctl` wire emitters + `image=` key.
- **M1 (Resident MoE End-to-End — Target 1: `Inkling-2-Mini`, in progress):** `rt` HIP RDNA 3.5 microkernels, NVFP4/MXFP8 + `Q8_G64_T16` trunk, Vision WMMA, write-once `.vbundle`, `strata-ctl` drop-in `--serve` parity & speed vs C++ baseline (`>= 18 tok/s`, `< 4 s` reload). Landed so far: serve-session FSM (`serve_session.lean`), `memory.vplan` arena safety (`arena_plan.lean` + `abi::arena`), `.vbundle` manifest/plan contract (`abi::bundle` + `ld::bundle`).
- **M1 (Resident MoE End-to-End — Target 1: `Inkling-2-Mini`, inference landed):** full 48-visit forward on real `gfx1150` weights, **EXACT multi-token greedy parity** vs the `strata` reference (per-pass KV pools + unpadded vocab 200058), `strata-ctl` drop-in `--serve` link (OpenAI-compatible API, field-for-field wire). Serve-session FSM (`serve_session.lean`), arena safety (`arena_plan.lean` + `abi::arena`), `.vbundle` contract (`abi::bundle` + `ld::bundle`), loop proof (`inkling_loop.lean`). Speed vs C++ baseline (`>= 18 tok/s`, `< 4 s` reload) is the remaining M2 work.
- **🎉 First real interactive GUI conversation — 2026-12-01 (measured):** via 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 is sequential prefill of the ~2650-token agent prompt, ~140 ms/token; decode ~4.2 tok/s). Host-CPU busy-wait eliminated via `hipDeviceScheduleBlockingSync` (measured A/B 101.2% → 54.2%); the residual ~54% is kernel-launch cost, removed by HIP graph capture (M2).
- **M1.5 (Embedder lane — BGE-M3):** native encoder forward-pass (LayerNorm, bidirectional full-attn, GELU-erf, CLS pooling + L2 — recipe declared in the manifest), XLM-R importer, SPM tokenizer, `vetta-infer embed` wire; acceptance cosine ≥ 0.999 vs the live `vetta-semantics` oracle (`:8091`) + publisher fixture + anisotropy canary. Optional reranker head. May double as the HIP kernel bring-up bench.
- **M2 (Hybrid GDN + NVMe Zero-Copy DMA Streaming):** Chunkwise Parallel GDN (WY-representation, target `250–350+ ppts`), `Clover-35B-A3B` & MTP MoE support, `io_uring O_DIRECT` + `hipHostRegister` `SlabRing`, Hot/Cold expert cache + lookahead prefetch.
- **M3 (Distributed Control Plane — Lyra + Sogliola):** Remote `DraftProvider` + domain `PrefetchAdvisor` over 2.5 Gbps LAN + live telemetry-driven domain expert pre-warming.
@@ -45,12 +46,13 @@ Built from the measured hardware physics and engineering lessons of our hardened
## Quick Verification
```sh
# Lean 4 formal proofs (0 sorryAx, 42 theorems across 4 files)
# Lean 4 formal proofs (0 sorryAx, 5 files)
lean proofs/slab_ring_dma.lean
lean proofs/bus_lifecycle.lean
lean proofs/serve_session.lean
lean proofs/arena_plan.lean
lean proofs/inkling_loop.lean
# Pure-Rust workspace tests (no GPU required, 65 tests)
# Pure-Rust workspace tests (no GPU required)
cargo test --workspace
```
+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.