interplane.Get Omega
Read in your language

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

[RIBBON P2] Overlap NVMe reads with GPU work using a two-buffer expert pipeline

Closed · #631 · open 2026-10-18 05:39 UTC · closed 2026-11-07 00:06 UTC (reason not_planned)

Imported from GitHub aien-dev/aien-sovereign-core-mv#631, by drakestapleton

Labels: retired

drakestapleton wrote on 2026-10-18 05:39 UTC

Parent: https://github.com/aien-dev/aienix/issues/4 Depends on: read adapter #629, GPU slots/fences #533, residency manager #630. Baseline receipt: benchmarks #29.

Scope

Build the actual double-buffered ribbon scheduler for experts: while GPU consumes ready expert slots, a bounded read/verify/copy pipeline prepares future known-needed experts in a separate staging/slot region. Exchange slots only through Omega's completed-copy + retired-reader protocol. This is logical buffering; do not claim physical RAM-cell proximity.

Deliverables

  • Explicit async tasks/queues for disk read, integrity check, GPU copy, publication, execution, retirement, with ownership, deadlines, bounded queue capacities and deterministic shutdown.
  • Known-demand lookahead only at first (top-k selected by the real router, and later-stage dependencies actually determined); no speculative predictor in this issue.
  • Single-buffer synchronous control mode, and two-buffer async mode with exact same checkpoint, token IDs, weights, arithmetic results and error propagation.
  • Timeline trace of actual SSD read, host wait, GPU copy, GPU useful compute, exposed stall and overlap; define wall clock origin, prevent double-counting overlap.
  • Handle hot-reused experts without pointless retransfer. Respect serialized GPU execution paths and current device-address-table use.

Acceptance

  • Deterministic fake-I/O and fake-GPU tests demonstrate overlap when timeline allows it, and no speedup (rather than false reporting) when it does not.
  • Stress cancellation, missing/corrupt expert, stalled NVMe, GPU error and shutdown while buffers are busy. No use-after-free, partially published data, double occupancy or unbounded resource growth.
  • GB10 receipt compares single- vs double-buffer mode over same fixed model/prompt and reports TTFT, tok/s, IO bytes, copy/stall time, p95 tail latency, correctness and peak allocations. A slower result is a valid outcome.

Exclusions

No predictive future-router guessing, no weight tiling, no new model architectures, no 128K context enablement.

drakestapleton wrote on 2026-11-07 00:06 UTC

35B retired (Drake 2026-11-06): Omega LLM only. Expert Ribbon P2 (parent aienix#4, retired): two-buffer NVMe/GPU expert pipeline for Qwen3-MoE. — issuecov/I3 (Hermes worker subagent of lead issuecov, claude-opus-5-5, anthropic)

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:14 UTC

Recovered GitHub comment by @aien-spark on 2026-10-30T20:38:52Z. Original comment 6532988711

A real DeepSeek-V4-Flash routing trace says read concurrency is the lever, not cache size. Status: HOST-ONLY, EXERCISED. No GPU was used.

Trace. CPU reference forward of all 43 layers. Pin 60d8d707. Teacher-forced on 4 segments of 1024 tokens (chat, rust, python, prose). Head NLL is 1.62–3.71 nats/token; the shift-2 control scores 14.2–23.7.

Replay. om/residency with the shared-cache mode from draft PR #844. Warm half: 2048 tokens, 528,384 accesses. Counts are MEASURED; rates come from Wolfram.

cache (share of 11,008 experts)warm missesmisses/tokenMB/token
per-layer LRU 70%19,4869.515127.2
shared LRU 70% (7705 experts, 95.94 GiB)13,3656.52687.25
shared OPT 70%4,6062.24930.07

I/O-only decode ceiling at shared LRU 70% (MODELED; NVMe rates from the 10-18 receipts):

read patternNVMe rateceiling
depth 3210.60 GB/s121 tok/s
layer-serial (what the 10-18 pager delivered)1.715 GB/s19.7 tok/s
depth 11.32 GB/s15.1 tok/s

For comparison, reading the routed experts alone from memory caps decode at 79.1 tok/s (MODELED: 258 × 13,369,344 B per token at 273 GB/s).

So with deep or overlapped reads the NVMe stops being the bottleneck. With layer-serial reads it caps decode at about 20 tok/s.

Known-demand lookahead for this issue. Layers 0–2 are hash-routed (tid2eid[token]), so their 18 experts per token are known as soon as the token is sampled.

Prefill. One 1024-token prompt touches 84–88% of all routed experts, so prefill wants an expert-major streaming pass rather than per-token demand paging.

Full report, artifacts and sha256s: ~/handoffs/Ribbon-20261030/REPORT.md on the Spark.

Next decisive step, still NOT_RUN: a GB10 serving-loop receipt, which needs a CHIP-RESERVED window.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:14 UTC

Recovered GitHub comment by @aien-spark on 2026-10-30T23:15:02Z. Original comment 6535505869

Host NVMe replay: layer-serial issue does not fill a deep queue, and verify sets the 1.715 GB/s (MEASURED host I/O; GB10 NOT_RUN).

Setup. io_replay.py (MEASUREMENT tooling) replayed the 70% shared-LRU warm misses of the DSV4 routing trace on this machine's NVMe. Reads were O_DIRECT, 13,369,344 B each, issued layer by layer, over two 256-token windows. Full data: ~/handoffs/Ribbon-20261030/TESTPLAN.md and REPORT §5.2.

All ratios and rates below come from Wolfram.

Results

measurementdelivered
calibration: one stream at depth 18.656 GB/s
calibration: one stream at depth 2-329.772-11.41 GB/s
layer-serial glru, raw reads, 32 readers6.489 / 6.268 GB/s
same with a BLAKE3 hash of every read (stand-in for the pager's verify)1.739 / 1.700 GB/s
same verified, 1 reader1.625 / 1.621 GB/s

The two figures in each layer-serial row are windows w2304 and w3328.

  • Per-expert time (WolframLanguageEvaluator: 13369344/1.73881*10^-6 -> 7.689 ms):
    • 7.69–7.86 ms per expert verified;
    • 2.06–2.13 ms raw;
    • 6.877 ms for the hash alone on one X925 core.
  • Why 32 readers barely help. Under layer-serial issue, glru reads only 1819 / 1105 experts over 11,008 rows. Most rows have nothing in flight.
  • Where 1.715 GB/s comes from. The host lands on the 10-18 pager's 1.715 GB/s only when the verify is in the path. Whether the chip pager is verify-bound in the same way is [INFERENCE] until #632 runs.

Implications for the two-buffer pipeline

  1. Cross-row lookahead is what fills the queue: issue the next rows' known demands, including hash layers 0-2, which are known at sampling time. Adding reader threads within a row is not enough.
  2. Verify must leave the critical path or go wide:
    • hash the next expert while the current one is consumed;
    • or split one expert's BLAKE3 tree across cores. A single-core hash of a 13.37 MB expert costs more than its read.

#633 hints on top of this: overlapped H=6 hints gain 5–9% with 32 readers and 1163 µs of compute per layer. Serial hints always lose. Details are on #633.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:14 UTC

Recovered GitHub comment by @aien-spark on 2026-10-31T00:39:34Z. Original comment 6536635978

GB10 chip evidence for the read-depth premise of this issue (RibbonDSV4, 2026-10-31). MEASURED on chip with an evidence build that is not QUALIFIED.

What ran. own30b_check --paged-experts at ribbon-sc 836a5344, demand paging only. Binary sha256 20b4465b…, byte-identical to the 10-18 ribbon-paged-20261018T1719Z receipt binary. Prompt p1, 16 tokens, swept over --read-workers W --read-depth D. Window 20261031T003200Z-5b989c (exclusive GB10 + quiet, verdict "quiet machine"). 13/13 runs had rc 0. Routing matched the 10-18 receipt exactly: at 768 slots, 3683 hits and 2461 misses. Flint was resident and idle.

768 slots, W x D1x12x24x48x816x32 (default)
decode tok/s, fwd / rev1.106 / 1.1711.870 / 1.8812.599 / 2.6812.859 / 2.8042.809 / 2.884
delivered GB/s (loaded / miss wall)0.696 / 0.7401.234 / 1.2361.794 / 1.8522.049 / 2.0132.009 / 2.072

Decision rule. The rule was fixed before the window: two reps per cell, and s is the forward/reversed spread. Both parts hold. Going from 1x1 to 8x8 multiplies tok/s by 2.488. Going from 8x8 to 16x32 multiplies it by 1.005, and the worst 16x32 rep is 0.050 tok/s below the best 8x8 rep, inside s = 0.075. The pager issues one layer's misses at a time, and Qwen3-30B-A3B routes 8 experts per layer, so queue depth stops paying at 8 in flight. On chip, as on the host replay, a deeper queue needs the cross-row lookahead this issue proposes. Raising --read-depth alone does not provide it.

Two numbers that move.

  • The layer-serial rate of 1.715 GB/s (10-18, same binary and default, measured while the live server shared the box) is 2.01-2.08 GB/s in device bytes per miss wall with the neighbour idle. That is 1.17-1.21x higher (WolframLanguageEvaluator: 11634057216/{5.7818,5.6052}/(11634057216/6.7823) -> {1.173, 1.210}).
  • A depth-1 miss costs 6.38-6.79 ms of wall time, of which about 2.02 ms is slot load. That is not the roughly 3.5 ms per expert the read bench suggested.

NOT_RUN. Overlap/two-buffer behaviour, because 836a5344 has no such code, and DSV4 expert sizes.

Receipt: ~/handoffs/Ribbon-20261030/t6/20261031T003208Z/ (SHA256SUMS 044becf1…). Write-up: ~/handoffs/Ribbon-20261030/TESTPLAN.md section "T6 results" and REPORT.md section 5.3.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:14 UTC

Recovered GitHub comment by @aien-spark on 2026-10-31T00:40:53Z. Original comment 6536650749

Correcting the evidence label in my comment above. The 2.01-2.08 GB/s layer-serial rate is MEASURED: it was taken on 2026-10-31 with Flint resident but serving no requests. The claim that the 10-18 figure of 1.715 GB/s was low because the live server shared the box is [INFERENCE]. It rests on one comparison across 13 days, nobody measured the 10-18 load, and drive state and other differences were not separated. The "17-21% low" applies only to that inference. The read-depth result (depth pays up to 8 in flight, nothing beyond) does not depend on it, and neither does C1's direction.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:18 UTC

Recovered GitHub comment. Original comment 6559928643

Merged https://github.com/aien-dev/aien-sovereign-core-mv/pull/894 as 5c95594a923de32a833e85512d677dba0b213110. The bounded Omega controller, existing read/slot transport attachment and corrected synchronous-control tests are on main. The review found an expired-copy residency publication bug; the fix passes 18 pager tests and three model tests. All applicable final hosted checks passed.

The committed experiment records exact-token parity and a two-buffer improvement over the synchronous control. It does not establish a speedup over the current grouped default or a release-qualified native build. Hardware timings remain tied to their original measured binary; the later deadline fix has host verification. See qualification. No deployment; leaving broader qualification open.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:18 UTC

Recovered GitHub comment. Original comment 6561623997

Current merged adapter consumes each ready expert with two launches. Qualification explicitly records the grouped reference as faster but unqualified. Drake now asks: "Whatever updates and time to first token you can get out of that, read speed needs to be as fast as possible. Roll it into the ribbon".

Continuing #631: implement a bounded Omega selection policy that batches only already-ready, pinned experts, attached through the existing reader/model adapters. Preserve exact router positions, final reduction order, copy-before-publication, deadlines, ownership and the serial one-buffer control. No speculative expert substitution, no model or harness changes. Owner: Codex main agent, isolated perf/ribbon-ready-groups worktree. Dependency: merged #894 native Ribbon binding. This is the existing 30B attachment; a 27B dense attachment remains separate work.

Acceptance: independent Omega selection oracle and compiled faults; existing controller/ownership/failure tests; mixed cached/missing and all-cached grouped-consumer tests; resident/paged full-logit equality; same-model real GPU output and alternating timing comparison against both old streaming and grouped default before any promotion. Record native identities and driver observations. No measured speed claim before these gates.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:18 UTC

Recovered GitHub comment. Original comment 6562263531

PR#897 publishes the bounded ready-group experiment after the final isolated repository preflight passed. The final policy and host checks include20,164 ready-selection cases with six compiled faults,14,788 controller commands with seven faults,21 pager tests and three complete-score host references at windows1/2/4/8. Native-feature Clippy passed.

All37 shared-machine native trials preserved the same16 generated tokens and identical I/O workload. Wider ready groups and completion harvesting improved the streaming candidate, but none beat the existing grouped default. The command-seal transfer also showed no clear gain. The default stays unchanged and this remains a draft experiment. The source, immutable binary identities, individual timings and original measured-source snapshots are linked from the PR.

The separate resident27B reading work in #710 now shows repeated5,017-token readings near18.7 seconds versus23.4 seconds with every score bit preserved. Its combined checkpoint/buffer candidate has passed full serving and32K retrieval plus resumed/cold continuation equality. That work does not claim a dense27B storage attachment.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:27 UTC

Recovered GitHub comment. Original comment 6561766953

The ready-group screen retains exact16-token output and identical I/O work, but two active read buffers still lag the existing default. The tested configuration already reserves eight staging buffers and eight read workers; the Omega controller admits only two. Grouping alone has no clear large gain in the shared screen.

Next experiment in this issue: admit bounded read windows1 through8, refusing any window above the caller's already-reserved queue depth and retaining the explicit byte budget. One remains the serial control. Omega still owns budgets, transitions and ready-group selection. No extra staging allocation, default change, model swap or harness change is proposed. Add host ownership/failure and resident-logit tests for4/8, including invalid9, and screen2/4/8 against the unchanged grouped default on the same real-model output and I/O workload. Final performance qualification and full preflight remain required before promotion. Earlier two-buffer receipts remain tied to their original source/binaries.

Sign in to comment