aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / docs / inference / evidence / own30b-f-20261013T1745Z / FINDINGS.md
| 1 | # OWN-30B cut 3 (builder F): Qwen3-30B-A3B-Instruct-2507 Stage A on Omega, findings |
| 2 | |
| 3 | Checkpoint ~/models/qwen3-30b-a3b-instruct-2507-fp8 (FP8 experts, bf16 rest). Engine: |
| 4 | `aien_inference_abi::qwen3_moe_omega` (sc own30b/qwen3-30b-general; commit in each `.start`). |
| 5 | Golden: `own30b_check golden` on the CPU oracle (f32 attention, exact FP8 MoE oracle, greedy, |
| 6 | 16 new tokens, 4 fixed prompts of 1 / 20 / 204 / 657 tokens), `golden.json` + `golden.log`. |
| 7 | Every chip run: `scripts/own30b-chip-run.sh` (flock /tmp/aien-gb10.lock, whisper, stamps, |
| 8 | raw output, rc, SHA256SUMS). Per run: `<name>.start` (commit, binary and golden digests, env, |
| 9 | command, free -g), `<name>.raw`, `<name>.err`, `<name>.rc`, `<name>.end`, `<name>/run.json`. |
| 10 | |
| 11 | ## Runs (one variable each) |
| 12 | | run | omega | spin us | prompts | parity (3 layers) | controls | tokens vs golden | decode | |
| 13 | |---|---|---|---|---|---|---|---| |
| 14 | | base-pinned | omega.lock 4d0bb369, expert matmuls = whole-tensor fallback | 0 | 1,2 | PASS | routing CAUGHT (skew n/a) | IDENTICAL | 0.6 tok/s | |
| 15 | | win | A's archive 25dd7c10 (window matmul), sha256 947f24b0... | 0 | 1,2,3,4 | PASS | routing CAUGHT, skew CAUGHT | IDENTICAL x4 | 7.5-7.7 tok/s | |
| 16 | | win-r2 | same | 0 | 1,2,3,4 | PASS | both CAUGHT | IDENTICAL x4 | 7.5-7.6 tok/s | |
| 17 | | win-spin2000 | same, sc 022d474 | 2000 (daemon default) | 1,2,3 | PASS | both CAUGHT | IDENTICAL x3 | 10.7-12.1 tok/s | |
| 18 | |
| 19 | ## Numbers (VERIFIED on the chip, from the .raw files) |
| 20 | - Load: 60-68 s for 60.42 GB resident bf16 + 0.67 GB host (embed, norms, routers); KV pool 768 MB |
| 21 | resident at 8192 context. Peak host RSS during load 61.99 GB (resident mapping counts), 0.90 GB |
| 22 | over resident + host; 63.3 GB at the end of a run. |
| 23 | - Layer parity (p2-short, 20 positions, chip traces replayed on the host): attention cosine(min) |
| 24 | 0.999986 / 0.999780 / 0.999997 and MoE cosine(min) 0.999998 / 0.999993 / 0.999994 on layers |
| 25 | 0 / 23 / 47; chip top-8 routing equals the oracle's at every traced position. |
| 26 | - Controls: routing mutant (expert id + 1) drops layer 0 MoE cosine to 0.3686; A's window-skew |
| 27 | mutant (1 tile) drops it to -0.0212. The pinned build has no window API, so the skew control is |
| 28 | not applicable there (reported as such, not as caught). |
| 29 | - Whole-model greedy: all 4 prompts identical to the CPU golden through 16 new tokens (p2 stops at |
| 30 | 7 with <|im_end|>, same as the CPU). |
| 31 | - Decode (window path, spin 0): 129-139 ms/token = 913 launches/token (48 x (3 attention + 16 |
| 32 | expert) + lm_head). Per step: attention 40 ms, experts 84-97 ms, lm_head 5.4 ms, host 7-12 ms. |
| 33 | Spin 2000 us: 83-94 ms/token (attention 26-30 ms, experts 50-58 ms). The launch tax dominates: |
| 34 | about 0.1 ms per expert launch at spin 0 and 0.065 ms at spin 2000 for 3 MB of weights each. |
| 35 | - Prefill is token-at-a-time (every prompt token is a full step): 134 ms/token at spin 0. |
| 36 | - Attention 40 ms/token = 48 layers x 0.83 ms = 3 launches per layer (fused qkv [2048][5120] |
| 37 | matmul, paged bf16 attention over the resident KV pool, o [4096][2048] matmul) plus the host |
| 38 | q/k head-norm, rope and KV write between them (the host part is inside attention_ns; the |
| 39 | separately counted host_ns covers input norm, residual, post norm, routing, swiglu, weighted sum). |
| 40 | At these shapes each launch moves 21 MB / tiny / 17 MB, so 0.28 ms per launch is overhead, not |
| 41 | bandwidth. |
| 42 | |
| 43 | ## Limits |
| 44 | - One checkpoint, greedy only, 16 new tokens, 3 traced layers; no long-context parity beyond |
| 45 | 657 + 16 tokens; no batched prefill; no serving reservation/prepare/seal in these runs. |
| 46 | - A's archive is linked through the AIEN_OMEGA_GPU_LIB development override (not a qualified build). |
| 47 | |
| 48 | # Cut 7 (builder F): experts and attention projections as FP8 on omega's grouped GEMV |
| 49 | |
| 50 | Omega: own30b/integration da9a3d67 (moe-window + fp8-kernels), built with PHYSICS_DIR = |
| 51 | physics-own30b-k (6d7cf0d4), archive sha256 c3df6d12... linked through AIEN_OMEGA_GPU_LIB |
| 52 | (development override). sc commits cfbb388 (engine FP8 path), b2168a9 (check `--weights`). |
| 53 | `--weights fp8-experts`: experts as the checkpoint's e4m3 bytes + bf16 block-128 scales, |
| 54 | one grouped gate|up launch (8 experts, shared row) and one grouped down launch (8 rows) per |
| 55 | layer. `--weights fp8`: also q|k|v (one [5120][2048] FP8 GEMV) and o ([2048][4096]). |
| 56 | Control for the kernel: `omega_gpu_fp8_test_set_mutant(1)` (scales dropped). |
| 57 | |
| 58 | | run | weights | spin us | parity attn cosine(min) L0/23/47 | moe cosine(min) | controls | tokens | decode | resident | load | |
| 59 | |---|---|---|---|---|---|---|---|---|---| |
| 60 | | int-bf16 | bf16 (control: merged archive, old path) | 0 | 0.999986 / 0.999780 / 0.999997 | 0.999993+ | routing 0.37, skew -0.02 CAUGHT | IDENTICAL x2 | 6.8-7.8 tok/s | 60.42 GB | 63.8 s | |
| 61 | | fp8-experts | FP8 experts, bf16 attention | 0 | same as bf16 | 1.000000 (p95_rel 0.0000) | routing 0.37, scales-dropped 0.85 CAUGHT | IDENTICAL x4 | 14.3-16.5 tok/s | 31.43 GB | 42.4 s | |
| 62 | | fp8-all | FP8 experts + q/k/v/o | 0 | 0.999999 / 0.999957 / 0.999998 | 1.000000 | routing 0.37, scales-dropped 0.86 CAUGHT | IDENTICAL x4 | 19.3-23.3 tok/s | 30.53 GB | 16.2 s | |
| 63 | | fp8-all-spin2000 | same | 2000 | same | 1.000000 | both CAUGHT | IDENTICAL x4 | 28.8-31.7 tok/s | 30.53 GB | 16.6 s | |
| 64 | |
| 65 | Per step (p4-long, 657-token context, spin 0): bf16 path attention 40.7 ms + experts 87.8 ms; |
| 66 | fp8-experts attention 36.1 + experts 16.7; fp8-all attention 16.8 + experts 17.0; lm_head 5.4-5.8; |
| 67 | host 7-14 ms. Launches per token 913 -> 241 (48 x (3 attention + 2 expert) + lm_head). |
| 68 | With spin 2000 us: attention 8.3-10.8 ms, experts 12.9-14.7 ms, 31.5-34.7 ms/token. |
| 69 | |
| 70 | The MoE parity against the exact FP8 oracle is 1.000000 because the kernel multiplies the same |
| 71 | e4m3 x bf16-scale products in f32 that the oracle does (the bf16 path carried a bf16 rounding |
| 72 | of every weight). Attention parity improved for the same reason. Greedy tokens unchanged. |
| 73 | |
| 74 | Limits: same as cut 3 (greedy, 16 new tokens, 3 traced layers, up to 673 tokens of context); |
| 75 | the FP8 kernel's own shape/depth/CTA sweep is A's evidence in omega (OWN30B-FP8-GEMV-*), not |
| 76 | re-measured here; lm_head stays bf16 (the checkpoint ships it bf16). |