Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/docs/gpu/PI_DRIVE_27B_SPARK.md # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / docs / gpu / PI_DRIVE_27B_SPARK.md` 125 lines · 11520 bytes Raw Blame History Source # Driving Qwen3.8-27B-FP8 on DGX Spark GB10 from Raspberry Pi 5 (Pure Seeded Omega) Date: 2026-11-19 Status: `PASS` (live end-to-end Pi → Spark 27B inference over encrypted SSH loopback tunnel + AArch64 `seed/out/omc` GB20B host test suite on Pi). Scope boundary (honesty check): Today's live 27B run still uses Linux + `aien-serve-http` (`omega-qwen38` engine) on Spark, offloading all driving/client/compiler userspace to the Raspberry Pi 5 so Spark dedicates its unified memory to the 27B model. Bare-metal Aienux with zero Linux userspace on Spark remains `NOT_RUN` until the Aienux UEFI/PCIe/GB20B/SASS stack completes bring-up. ## 1. Live Measured Run: Pi 5 Pure-Omega Client → Spark GB10 27B ### Client (Raspberry Pi 5 `hub`, `aarch64 GNU/Linux`) - Source: `seed/net/http.om` + `seed/net/notls.om` + `tools/pi-drive-27b/pi_drive.om` - Build command (native on Pi AArch64, zero C / Python / curl / libc): ``` { printf 'om2\n'; cat seed/net/http.om seed/net/notls.om tools/pi-drive-27b/pi_drive.om; } | ./seed/out/omc > pi_drive chmod +x pi_drive ``` - Binary: `68 KB` static AArch64 ELF (`ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked`) - Measured Pi footprint (`/usr/bin/time -v ~/pi-drive-27b/pi_drive < /dev/null`): - Max RSS: `400 KB` (`0.4 MB`) - CPU time: `0.00 s` user / `0.00 s` system (`0%` CPU) - End-to-end wall clock (`/health` + `/v1/chat/completions`): `5.06 s` - Exit status: `0` ### Server (DGX Spark GB10, `121 GiB` unified LPDDR5x) - Binary: `~/.local/state/aien-q36/bin-cc45f45e/aien-serve-http` (`SHA256SUMS` verified `OK`) - Model: `~/models/specialist-transfer/qwen3.8-27b-fp8-017b9c7a` (`64` layers, `omega-qwen38` engine) - Launcher: `tools/pi-drive-27b/run-spark-27b.sh` (loopback-only `127.0.0.1:18099`, `--max-context 131072`, `--max-tokens-cap 16384`, `--thinking off`, `CLAIM`/`RELEASE` on `BOARD.md`, guaranteed `EXIT` trap shutdown) - Measured Spark load & memory: - Engine load time: `50.9 s` (`READY` in `49 s`) - Context window: `131,072` tokens (engine `attn256` ceiling) - Weights resident: `26.92 GB` | KV cache: `8.59 GB` | Server RSS: `38.55 GB` (`37,649,508 KiB`) - Spark `MemAvailable` before load: `109,923 MiB` (`107 GiB`) - Spark `MemAvailable` with 27B + 128k KV loaded: `71 GiB` free - Measured inference output: - `/health`: `{"busy":false,"engine":"omega-qwen38","model":"qwen3.8-27b-fp8","status":"ok","uptime_s":11}` - Completion ID: `chatcmpl-18e97c6dcb707cbf0000` (`40` prompt tokens, `36` completion tokens, `76` total tokens, `finish_reason: "stop"`) - Post-run cleanup: `aien-serve-http` stopped cleanly; `spark-window status` = `no window open`, `gb10 lock holders:` empty, `nvidia-smi` = 0 compute processes. ## 2. Pure-Omega GB20B Host Tests Verified on Pi AArch64 (`seed/out/omc`) Compiled and executed natively on `hub` (`Linux hub 7.0.0-1023-raspi aarch64 GNU/Linux`) with pinned `seed/out/omc`: Suite Verdict Output `logdec_trace` (`logdec.om` + `logdec_trace.om`) `PASS` (`rc=0`) `LOGDEC TEST PASS 12/12` `bootfs_trace` (`bootfs.om` + `bootfs_trace.om`) `PASS` (`rc=0`) `BOOTFS TEST PASS 9/9` `irqcc_trace` (`logdec.om` + `irqsim.om` + `irq.om` + `irqcc.om` + `irqcc_trace.om`) `PASS` (`rc=0`) `IRQCC TEST PASS 6/6` `compute_trace` (13-unit GB20B compute bring-up stack) `PASS` (`rc=0`) `PASS compute_trace` `chan_trace` (`dma/gmmu/mem/chan/sim` + `chan_trace.om`) `PASS` (`rc=0`) `rc=0` ### OM-1 `omc` Fixes Applied During Native AArch64 Verification - `gpu/driver/gsp/arena.om`: split compound `or` in Profile 2 size check (`arbuild`) to stay within OM-1's 16-register pool (`error 12`). - `gpu/driver/gsp/logdec.om`: cast `uchar` to `ulong` and split `kind`/`loc` check in `lgtabparse` (`error 12`). - `gpu/driver/gsp/compute.om`: split `get cbrblob` temp before `put rqpay` (`error 12`). - `gpu/driver/tests/bootfs_trace.om` & `gpu/driver/tests/logdec_trace.om`: typed bare arithmetic literals with `ulong` (`error 11`). ## 3. Back-to-Back 3-Way Live Stress Benchmark (2026-11-19) All three trials ran back-to-back on the exact same DGX Spark GB10 (`580.173.02`), same model (`qwen3.8-27b-fp8-017b9c7a`), and byte-identical `.om` codebase prompts (`pi_drive.om` bumped to `512 KiB` request buffer, still `68 KB` static ELF). Metric / Stage Trial 1: Pi 5 (68 KB `.om`) → Spark Omega Trial 2: Spark-Local → Spark Omega Trial 3: CUDA + PyTorch (`torch 2.14.0+cu130`, `transformers 5.17.0`) Model Load Time `51.4 s` (`READY 47 s`) `47 s` `171.8 s` (3.5× slower) Memory at Load `38.55 GB` RSS (incl. 128k KV; `71 GiB` free) `38.55 GB` RSS (incl. 128k KV) `29.47 GB` CUDA + `0.69 GiB` RSS (0 KV allocated) Client Footprint `68 KB` ELF, `512–640 KB` RSS, `0.00 s` CPU Local Python process Python + PyTorch + HF venv S1 (`45` in / `37` out) `5.22 s` (`8.05 tok/s` decode) `5.21 s` (`8.04 tok/s` decode) CRASH (`ImportError: finegrained-fp8 kernel unavailable`, 0 tok) S2 (`3,264` in / `128` out) `31.99 s` (`7.88 tok/s` decode) `31.54 s` (`7.89 tok/s` decode) Not reached (crashed on S1) S3 (`13,127` in / `64` out) `72.72 s` (`7.36 tok/s` decode) `72.36 s` (`7.39 tok/s` decode) Not reached S4 (`39,820` in / `32` out) `215.68 s` (`6.40 tok/s` decode) `214.43 s` (`6.42 tok/s` decode) Not reached S5 (~99K tok / 240 KB JSON) Hit `420 s` client timeout in prefill (no OOM/crash; `68 GiB` free) — — ### Live GB10 Telemetry During Trial 1 (364 samples @ 2 s) - GPU Utilization: max `96%`, active average `64.6%` (`362/364` active samples) - SM Clock: `208 MHz` idle → `2,502 MHz` peak - Temperature: `41°C` idle → `74°C` peak - Power Draw: `4.73 W` idle → `48.81 W` peak - Spark `MemAvailable` after 40K+ token stress: `68 GiB` still free (zero swap, zero OOM) - Pi 5 remote overhead vs. Spark-local: < 1% (`+0.01 s` at 45 tok; `+1.25 s` / `+0.6%` at 40K tok). ## 4. Spark CPU + GPU Co-Execution: Live Benchmark & Pure-Omega Modules (2026-11-19) ### Live Spark Overlap & Warm-Prefix Reuse Benchmark (`bin-cc45f45e`) Tested `AIEN_OMEGA_Q38_OVERLAP_AB=1`, `AIEN_OMEGA_Q38_BUF_CACHED=1`, `AIEN_OMEGA_GDN_STATE_CACHED=1`, `AIEN_OMEGA_DGRAPH_PREFETCH=1`, `--prefill-device-host on`: - Warm-prefix reuse (`S2_warm_3k`, `reuse Live(3392)`, 30 new tok): prefill dropped from `15,477 ms` → `502 ms` (`30.8× faster`), total wall `3.47 s`, decode `7.77 tok/s`. - Env overlap flags vs default: cold prefill and decode were within ~1% of default (`7.95` vs `8.04 tok/s`, `15.48 s` vs `15.31 s` at 3.2K, `63.19 s` vs `63.69 s` at 13K), confirming `bin-cc45f45e` defaults are already optimal and that the largest CPU+GPU wins come from prefix-pool reuse, L2-resident CPU speculative drafting, and mid-decode OM-1 grammar guarding. ### Pure-Omega CPU Co-Execution Modules (Verified Live on Pi ARM64 `seed/out/omc`) Module Size / Footprint Live AArch64 Verdict Purpose on Grace ARM64 Cores `tools/pi-drive-27b/specdraft.om` + `specdraft_trace.om` `12 KB` ELF, `400 KB` RSS, `0.00 s` `PASS` (`SPECDRAFT TEST PASS 8/8`, `rc=0`) L2-resident (`64.17 KiB` state, 0 DRAM contention) 4/3/2/1-gram prompt-lookup speculative drafter + exact verification/rollback (`1..8` tokens/step) `tools/pi-drive-27b/omguard.om` + `omguard_trace.om` `20 KB` ELF, `400 KB` RSS, `0.00 s` `PASS` (`OMGUARD TEST PASS 8/8`, `rc=0`) Incremental mid-decode OM-1 syntax/register guard (`0x`, `>6` params, `>16` locals / `error 12`, missing `bound`, unbalanced `end`) + 64-slot FNV-1a unified-RAM prefix-pool index with LRU eviction `tools/pi-drive-27b/tree20.om` (live across all 20 Spark ARM64 cores `0..19`) `2.6 KB` ELF, `1,640 KB` RSS `PASS` (`20/20` cores, `2,000,000` cand. tok in `1.52 s` = `1,314,134 tok/s` / `65,707` 20-tok trees/s) 20-core parallel L2-resident (`64 KiB/core`) speculative 20-node token-tree + `20x20` causal attention mask generator (`~15 us/tree` vs `128 ms` GPU step) ## 5. Server-side CPU+GPU levers for the 27B: integration and live GPU gate (2026-11-19) Source: `aien-sovereign-core-mv`, branch `feat/q38-integ` @ `0fe20f567` on the Spark git store (`~/git/aien-sovereign-core-mv.git`), merging four tracks with no conflicts. Receipts on the Spark: `~/work/q38-gate/`. Track Host gate GPU gate Verdict Speculative decoding (`AIEN_SERVE_SPEC=ngram`, default off) 14/14 stub tests incl. 2 negative controls FAIL. Golden prompt 24/24 identical, but a 3,929-token code-edit prompt diverges from plain greedy at generated index 41 in all 3 runs Do not enable. Verify uses a host `lm_head` argmax, not the chip's two-pass head, so it is not bit-exact once drafts are accepted or rolled back Speculative decoding speed (temp 0, 128 tok, 3 runs each) plain 7.92 tok/s (16.1 s decode), spec 5.68 tok/s (22.5 s decode) = 28% slower (177 vs 127 ms/token) Slower and wrong. No acceptance counter is logged Batch door (`--batch-slots`, off by default) 13/13 incl. 3 negative controls NOT_RUN Batched dense decode is BLOCKED: the pinned `libomega_gpu.a` has a single-head dense graph and lacks `omega_gpu_q38_graph_create_heads`, `_set_head_state`, `_stroke`. A serialized fallback exists. 8 slots x 128k context do not fit in memory Prefix pool (64 sessions, FNV-1a chain, LRU) 7/7 incl. collision negative control NOT_RUN Pool is built and tested; the engine hook (`put`/`lookup`) is not wired. Snapshot = 156,893,184 B + 65,536 B/token Device argmax docs only NOT_RUN Already present and used: `Q38Graph::token` (`gen_argmax`), greedy path has no logit readback. The sampled path still copies about 1 MB/token and no device sampler exists Unchanged from earlier: plain 27B decode is 7.9 to 8.1 tok/s at short context (about 0.79 of the 10.15 tok/s DRAM ceiling). The remaining gap is Omega kernel bandwidth in down-proj and lm_head, which needs work in the Omega repository, not the server. The pure-Omega drafters in `tools/pi-drive-27b/` (`specdraft.om`, `tree20.om`, `omguard.om`) pass their own AArch64 tests, but the live engine gate above shows the Rust port is not yet usable. `tree20.om`'s 1.31M candidate tok/s figure is draft generation only; no draft was accepted by the 27B in that measurement. ## 6. Follow-Up: Multi-Head Batched Dense Decode & Exact Two-Pass Head on GB10 (2026-11-19) The missing `libomega_gpu.a` multi-head dense graph APIs (`omega_gpu_q38_graph_create_heads`, `_set_head_state`, `_stroke`, `_set_batch`, `K <= 32768` FP8 GEMM for `17408` `down_proj`) and the HUM L314 exact two-pass `lm_head` (`H = 5120`, `XBOUND` parameterized up to width `8192`) were subsequently implemented in `omega-mv` (`f7d147c21`, `799adb6d8`), bound in `aien-sovereign-core-mv` (`feat/q38-integ` @ `572a9142`), and qualified on live GB10 silicon (`gpu_q38_graph_test` `24/24 PASS`, `gpu_q38_stroke_exact_test` `71/71 PASS`, `gpu_q38_stress_bench` `134/134 PASS`). Full scaling, PTIMER, output-head, and hardware telemetry metrics are published in Q38_27B_GB10_STRESS_`20261119`.md .