Skip to content

Commit 6bde294

Browse files
docs(v0.5-cuda): correct overclaim — Qwen3-4B run was a wrapper SMOKE TEST, not engine validation
Honest correction: the Qwen3-4B H200 run validated only the KakeyaVLLM Python wrapper plumbing (builds vLLM, override reaches config, CUDA graphs capture, generate returns). It is NOT validation of Kakeya Attention: Qwen3-4B has no trained f_theta/proposer, so restoration never ran, and prompts were inside the 68-token window so nothing was evicted. v0.5-cuda's real engine evidence is the committed gemma-4-26B KIE-v2 numbers, which hold at recall 1.0 @ sw=68 BECAUSE gemma-4's 5/30 native full-attention layers carry recall (S5 free lunch) — no trained f_theta/proposer needed. The full-attention path (where restoration IS required and must be trained) is v0.6. - report §5 rewritten as is/is-not validated - README v0.5 note + ADR 0015 milestone reframed - artifact relabeled as wrapper smoke test Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
1 parent 69751d6 commit 6bde294

3 files changed

Lines changed: 42 additions & 20 deletions

File tree

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,18 @@ H200, gemma-4-26B-A4B, recall **1.0**:
390390
| **Parallel inference** | bounded window on vLLM measured to **N=70** @16k (recall 1.0); eager research engine reached **N=75 @62k** (≈4.8× vLLM concurrency) |
391391
| **Memory saving** | gemma-4 hybrid: **~7 % @ 62k** (vLLM already bounds 25/30 layers; the 5 full layers dominate both); **~** edge needs a **full-attention** model + the v0.6 restoration backend |
392392

393-
> **Honest scope.** v0.5-cuda is the **gemma-4 bounded-window** instantiation
394-
> (gemma-4's hybrid needs **no per-token restoration** — the S5 "free lunch" —
395-
> delivered via vLLM `hf_overrides`). The `KakeyaVLLM` wrapper itself was validated
396-
> end-to-end on an H200 (CUDA graphs captured, window applied, coherent generation,
397-
> 777 tok/s on Qwen3-4B — the model that fit the box). The **restoration backend**
398-
> (f_θ + dLLM-proposer at prefill + quantized-exact attention) for **full-attention**
399-
> models — the large ~6× memory differentiator — is the **v0.6** roadmap item.
393+
> **Honest scope.** v0.5-cuda is the **gemma-4 bounded-window** instantiation, and
394+
> it works **without a trained f_θ/proposer**: gemma-4's 5/30 native full-attention
395+
> layers carry recall, so recall is **1.0 at `sliding_window=68` with no restoration**
396+
> (the S5 "free lunch"), delivered via vLLM `hf_overrides`. The gemma-4 throughput /
397+
> concurrency / recall numbers above are the measured KIE-v2 results. The
398+
> `KakeyaVLLM` wrapper *plumbing* was separately smoke-tested on an H200 (builds
399+
> vLLM, window→config, CUDA graphs capture, generate returns) using Qwen3-4B —
400+
> that is a **wrapper smoke test only, not engine validation**: Qwen3 has no
401+
> trained f_θ/proposer, so restoration never ran. The **restoration backend** (f_θ
402+
> + dLLM-proposer training + quantized-exact attention) for **full-attention**
403+
> models — the large ~6× memory differentiator, where a bounded window *without*
404+
> restoration would destroy recall — is the **v0.6** roadmap item.
400405
401406
## v0.4 for Mac — MLX speculative-decode port (the journey to parity)
402407

docs/adr/0015-kakeya-attention-and-engine-substrate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ PR, so development context stays per-task:
146146
| **KIE-v1.1.z** | throughput + N=75 | **N=75 MET** (recall 1.0, 126.7 GB, ≈4.8× vLLM; int8+quant-attn). kakeyalattice v1.6.1 gemma-4 fix verified (recall 1.0). **decode ≥ vLLM NOT met**: ~31 tok/s aggregate (eager 26B-MoE forward dominates; torch.compile-attn 6.6× but 0% e2e; static-cache auto-compile segfaults). | #139 |
147147
| **KIE-v1.1.z2** | fused-MoE + graph-captured full-forward decode (rebuild vLLM's runtime) | **abandoned — superseded by KIE-v2** (run on vLLM instead of rebuilding it) ||
148148
| **KIE-v2** | **Kakeya Attention on the vLLM runtime** (bounded window + restoration + quantized-exact as a vLLM backend) | **decode-parity MET + EXCEEDED**: gemma-4 bounded-window (sw=68) on vLLM = **195.6/231.9/539/1079 tok/s vs vLLM-default 159.3/198.6/467.5/894.9 @N=1/4/8/70, ~1.15–1.23× faster, recall 1.0** (ctx16k). Full backend (restoration + quantized-exact for full-attn models) = next. | #140 |
149-
| **v0.5-cuda** | **release**: package KIE-v2 as `inference_engine.engine.KakeyaVLLM` (Kakeya window on vLLM's Apache-2.0 fused-MoE + CUDA-graph + scheduler), consolidate reports, README | **done**entrypoint validated end-to-end on H200 (CUDA graphs captured, window→vLLM config, coherent generation, 777 tok/s on Qwen3-4B); model-aware `text_config` nesting (gemma nested / Qwen flat); 13 config unit tests. Scorecard: `docs/reports/kakeya-inference-engine-v0.5-cuda.md`. | this PR |
149+
| **v0.5-cuda** | **release**: package KIE-v2 as `inference_engine.engine.KakeyaVLLM` (Kakeya window on vLLM's Apache-2.0 fused-MoE + CUDA-graph + scheduler), consolidate reports, README | **done (gemma-4 instantiation)**engine evidence = committed gemma-4 KIE-v2 numbers (recall 1.0 @ sw=68 via the S5 free lunch, **no trained f_θ/proposer needed** on gemma-4). `KakeyaVLLM` wrapper **plumbing** smoke-tested on H200 (CUDA graphs captured, window→vLLM config, generate returns) on Qwen3-4B**smoke test only, NOT engine validation** (Qwen3 has no trained f_θ/proposer → restoration never ran). Model-aware `text_config` nesting (gemma nested / Qwen flat); 13 config unit tests. Scorecard: `docs/reports/kakeya-inference-engine-v0.5-cuda.md`. | this PR |
150150

151151
**KIE-v1.1.z2 port attempt (2026-06-16) — all clean paths blocked:**
152152
- **HF `kernels` hub** (lowest-surgery kernelize): `kernels` is **version-incompatible

docs/reports/kakeya-inference-engine-v0.5-cuda.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,40 @@ out = engine.generate(prompts, SamplingParams(temperature=0.0, max_tokens=128))
110110
fused-MoE on). The pure config layer (`kakeya_hf_overrides`, `KakeyaVLLMConfig`)
111111
is torch/vllm-free and unit-tested (`tests/inference_engine/engine/test_kakeya_vllm.py`).
112112

113-
## 5. Verification status
113+
## 5. Verification status — what is and is **not** validated
114+
115+
**The engine claim (gemma-4) — validated, and it does NOT depend on a trained
116+
f_θ/proposer.**
114117

115118
-**Throughput / concurrency / recall numbers** (gemma-4-26B) above were measured
116119
on H200 (Vast.ai) and committed in the KIE-v2 integration
117120
(`scripts/research/vllm_multitenant_parallel_bench.py --sliding-window 68`;
118-
commits `7ec3a03`, `48ded1e`, `e2cf137`).
119-
-**`KakeyaVLLM` entrypoint validated end-to-end on H200** (vLLM 0.23.0): it builds
120-
the vLLM engine with **CUDA graphs captured** (PIECEWISE + FULL), the Kakeya window
121-
(68) **reaches vLLM's model config** (`hf_config.sliding_window == 68`), and
122-
generation is coherent (Paris / 2+2=4 / story) at **777 tok/s** (batch 3). The
123-
validation used **Qwen/Qwen3-4B** — the 26B model does not fit this box's 4 GB free
124-
disk, so the wrapper *mechanism* is validated here and the 26B *performance* is the
125-
committed measured path above. Evidence:
121+
commits `7ec3a03`, `48ded1e`, `e2cf137`). Recall **1.0 at sliding_window=68**
122+
holds on gemma-4 **because its 5/30 native full-attention layers carry recall
123+
with no restoration** (the "S5 free lunch") — so this instantiation genuinely
124+
needs **no trained f_θ/proposer**. That is the entire reason v0.5-cuda is a
125+
gemma-4 release.
126+
127+
**The Qwen3-4B run was a wrapper PLUMBING smoke test — NOT engine/algorithm
128+
validation. Read this honestly:**
129+
130+
- ✅ It proves only the **`KakeyaVLLM` Python wrapper plumbing**: it constructs a
131+
vLLM engine, the override value lands in vLLM's config
132+
(`hf_config.sliding_window == 68`), CUDA graphs capture, and `generate()`
133+
returns coherent text (Paris / 2+2=4 / story) at 777 tok/s. It also caught a
134+
real bug (`text_config` injection crashing text-only models).
135+
- ❌ It does **NOT** validate Kakeya Attention on Qwen3. **Qwen3-4B has no trained
136+
f_θ and no trained proposer**, so **restoration never ran** — a bounded window
137+
without restoration is naive truncation, not Kakeya Attention. The test prompts
138+
were also `< 68` tokens (inside the window), so **nothing was even evicted**;
139+
recall/memory were not exercised at all. On a **full-attention** model,
140+
window=68 without trained restoration would *destroy* recall — which is exactly
141+
why the full-attention path is **v0.6 (after f_θ/proposer training)**, not v0.5.
142+
- Evidence (clearly labelled as a wrapper smoke test):
126143
`kakeya_vllm_v05_h200_validation.log`.
127-
- ✅ The wrapper auto-detects `text_config` nesting (multimodal gemma-4 → nested;
128-
text-only Qwen/Llama → flat), fixing a crash where unconditional `text_config`
129-
injection broke text-only models. Config layer unit-tested (13 tests).
144+
145+
**Bug fix:** the wrapper auto-detects `text_config` nesting (multimodal gemma-4 →
146+
nested; text-only Qwen/Llama → flat). Config layer unit-tested (13 tests).
130147

131148
## 6. What's next (v0.6)
132149

0 commit comments

Comments
 (0)