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/aienix/issues/ede53dc6e4b96bee # aienix AienOS front door: pinned repositories, source-linked lessons and verification paths. AienOS is in alpha testing; components remain separate and each states its own status. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers # [EPIC] Omega Expert Ribbon — tiered NVMe/RAM expert streaming on one DGX Spark Closed · #4 · open 2026-10-18 05:36 UTC · closed 2026-11-06 23:42 UTC (reason not_planned) Imported from GitHub aien-dev/aienix#4, by drakestapleton Labels: retired drakestapleton wrote on 2026-10-18 05:36 UTC ## Objective Develop Omega Expert Ribbon: a native, tiered MoE expert-weight residency system for one NVIDIA DGX Spark (GB10). Keep shared/model-critical weights and active experts in unified RAM, store colder experts on the internal NVMe SSD, and hide necessary transfers behind useful GPU work using fixed-slot buffering and bounded asynchronous prefetch. This is an engineering proposal, not an implemented feature or a performance claim. The purpose is to run models larger than physical RAM without vLLM/CUDA-framework dependence if measured SSD miss costs and model quality make it worthwhile. ## Current evidence / ownership (2026-10-18) - Omega FP8 tensor API : resident FP8 experts, upload/free, expert weight/scale device address access; no demand-loaded SSD tier. - Omega router API : router selects top-k and constructs tables of expert device addresses. - Sovereign Core OWN-30B implementation : model loading, resident expert weights, prefill/decode integration. - AIENIX front page : unified core tree is planned; source code still lives in component repositories. Work there first; import only under accepted repository-migration plan. - Existing KV offload work is related only by storage/async ideas; do not conflate KV persistence with expert-weight paging. ## Invariants - The model router, not any predictor, determines the exact experts executed. Cache misses may stall, never alter logits or silently substitute experts. - Fixed/contiguous logical expert slots, not physical-nearness claims about RAM or SSD cells. - Publish a replacement expert's pointer/version only after complete transfer, digest verification, GPU visibility/fence; never overwrite an in-flight expert. - Budget RAM for kernel/OS/runtime, resident non-expert weights, the true KV requirement and scratch before admitting a cache slot. Fail closed on OOM/SSD/GPU errors. - Correctness and model quality against the same checkpoint/quantization are hard gates before performance claims. No silent CPU fallback or vendor-serving-runtime dependency. - Benchmark cold vs warm, real workloads and long-context prefill separately; compare with the same Omega model fully resident. - Target Linux-hosted Spark first. Native AIENOS NVMe/GPU integration is a separate qualification, not implied by a successful Linux-hosted run. - No destructive disk repartition, production-data modification, or arbitrary root privileges. Use read-only checkpoint artifacts. ## Execution plan - Phase 0: freeze baseline, trace expert access and quantify feasible NVMe miss budget. - Phase 1: content-addressed SSD artifact store; fixed, versioned GPU slots; bounded resident-cache controller and correctness. - Phase 2: two-buffer async staging and GPU/NVMe overlap, safely swapping only after completion. - Phase 3: optional prediction, tiled streaming and cache-policy experiments, each independently gated. - Phase 4: GB10 end-to-end parity, latency, energy and reproducible evidence, including an explicit ship / pivot / stop decision. ## Not in scope - Claiming that SSD becomes RAM-speed; physical placement of particular RAM cells; promising near-zero swap overhead. - Porting GLM/DeepSeek model architectures in the first iteration, or claiming one-Spark feasibility for a particular >128-GB checkpoint without measurement. - 128K-context support: native decode-attention currently defines 65,536 maximum positions (source ); qualify long-context as an independent workstream. ## Completion All linked implementation and qualification issues resolve with source/test evidence. Publish a signed or content-addressed reproducible evidence bundle, complete limitations, and a decision about whether further large-model ports are justified. Tracker: this issue owns coordination and acceptance. Child issues are in the actual component repositories (to be linked below). ## Linked engineering issues ### P0 — Baseline (independent) - benchmarks #29 — Freeze GB10 expert-offload feasibility baseline and replay workloads ### P1 — Foundations (parallel lanes) - Sovereign Core #629 — Content-addressed FP8 expert store and bounded NVMe read adapter - Omega #533 — Versioned replaceable FP8 expert slots with GPU completion fences ### P2 — Correct serving path (dependency ordered) - Sovereign Core #630 — Bounded expert residency manager — after #629/#533 contracts; fake adapters can start in parallel - Sovereign Core #631 — Two-buffer asynchronous NVMe/GPU overlap — after #629/#533/#630 - Sovereign Core #632 — Wire on-demand paging into real Qwen3-MoE decode/prefill — after #629/#533/#630/#631 ### P3 — Optional optimizations (only after P2 is correct) - Sovereign Core #633 — Expert-demand prefetch hints, never change router outputs - Omega #534 — Compare full expert vs tiled FP8 streaming ### P4 — Hardware qualification and go/no-go - benchmarks #30 — Real GB10 parity, TTFT, stalls and energy qualification ### Independent context-length workstream - Omega #535 — Extend and qualify native 128K attention . This is not a prerequisite for the initial expert-offload proof. A 128K+ large-model demonstration does require this separate support. ### Agent work allocation P0 benchmark protocol, P1 host storage, and P1 Omega GPU slots can run concurrently with nonoverlapping code ownership. Later work must follow the dependency gates. Performance claims require GB10 receipts, not only host fake tests. drakestapleton wrote on 2026-11-06 23:42 UTC 35B retired (Drake 2026-11-06): Omega LLM only. Expert Ribbon pages MoE experts of an outside checkpoint (its serving target is the Qwen3-MoE path in core crates/aien-inference-abi/src/qwen3_moe_omega.rs, children core#629-#633, omega-mv#533/#534, benchmarks-mv#29/#30); our Omega LLM is a small dense model that fits in RAM. What carries over is the weight-residency discipline (publish a replacement weight slot only after full transfer, digest check and GPU fence; budget RAM before admitting a cache; cold vs warm benchmarks against the fully resident model), recorded for the lead in the Omega LLM retarget list (M2 — Bigger model trained on the chip). — issuecov/I6 (Hermes worker subagent of lead issuecov, claude-opus-5-5, anthropic) did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:18 UTC Recovered GitHub comment. Original comment `6532989646` Ribbon progress, 2026-10-30 (RibbonDSV4). Status: HOST-ONLY. No GPU was used, and the serving loop was not touched. Routing trace. The first real DeepSeek-V4-Flash routing trace is done. - Pin `60d8d707`, all 43 layers. - 4 × 1024 teacher-forced tokens, layer-streamed on CPU with one shard on disk at a time, each sha-checked. - Sanity checks pass: next-token NLL beats the shift-2 control on every segment. Shifting expert ids in layers 40–42 raises NLL by 0.06–0.25 nats. Residency replay. Run with `om/residency`, PR #844 (draft). That PR also fixes a pre-existing trap: main exited 104 on traces over 1M ids. Warm misses per token at a 70% cache (7705 of 11,008 experts, 95.94 GiB): policy misses/token per-layer LRU 9.515 shared LRU 6.526 OPT bound 2.249 What this means: - Read concurrency decides it (sc#631). At shared LRU 70%, depth-32 reads cap decode at 121 tok/s and layer-serial reads at 19.7 tok/s (both MODELED). - Prediction is cheap (sc#633). Predicting from the previous layer's gate input recalls 0.688 of the next layer's experts at K=6 and 0.892 at K=18. The shuffled control gets 0.141 and 0.237. - Prefill touches 84–88% of all experts per 1024 tokens. Prefill should stream expert-major. - The port must be bit-exact (Core #629). In 3.26% of routed token-layers the router margin is below 1e-3. Also: Core #780 (the TwoToOne FP4 decoder) was CONFLICTING. I merged main into it; `run.sh` reports ALL PASS. Report: `~/handoffs/Ribbon-20261030/REPORT.md` on the Spark. Still NOT_RUN: - the GB10 serving-loop paging receipt, which needs a CHIP-RESERVED window; - the model port. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:43 UTC Recovered GitHub comment by @aien-spark on 2026-10-18T05:40:25Z. Original comment `6246190384` ## Phase 0, step 1: SSD miss budget (measured 2026-10-18, Linux-hosted Spark) Setup: internal NVMe (Samsung MZALC4T0HBL1, link PCIe Gen5 x4, 32 GT/s). Reads of one expert-sized block (4,718,592 B = 3 × 2048×768 FP8, scales excluded) at random positions in `model-00002-of-00004.safetensors` of Qwen3-30B-A3B-Instruct-2507-FP8, `O_DIRECT` (page cache bypassed), read-only, 800 reads per row. parallel streams time (s) throughput 1 1.899 1.988 GB/s (calc:`610f2a71`) 4 0.565 8 0.377 10.03 GB/s (calc:`14359036`) 16 0.377 (flat, saturated) Model shape (config.json): 48 layers, 128 experts, top-8 → 384 expert reads per token = 1.812 GB if every expert misses (calc:`b1df01a1`). Worst-case ceiling: all-miss decode at the saturated rate is 5.53 tokens/s from SSD alone (calc:`e594b453`). Every cache hit removes 4.7 MB of that traffic, so the hit rate decides whether Ribbon is worth it; that needs the expert-access trace (Phase 0, step 2). Limits: tool was `dd` (one process per read, so qd1 is pessimistic); one file only; no GPU-visibility cost, digest check or scale tensors counted; a deeper `io_uring` measurement in our own code is still to do. Next (Phase 0): frozen baseline of the fully resident OWN-30B decode, and an expert-access trace from the router (per-layer reuse, working set over 1/8/64 tokens) to get the real hit-rate curve. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:43 UTC Recovered GitHub comment by @aien-spark on 2026-10-18T05:45:59Z. Original comment `6246231509` ## Design direction (Drake, 2026-10-18): the Heartbeat Inference stays on the GPU. The SSD runs a constant, fixed-rhythm flow into unified memory, and the work is organized around that rhythm instead of fetching experts on demand. - Expert rotation (the beat). Cold experts stream SSD → fixed versioned slots on a fixed schedule in layer order (a ring / conveyor). One full pass of all 6,144 experts (48×128 × 4.72 MB) takes 2.89 s at the measured 10.03 GB/s (calc:`5382cf60`). Hot experts stay resident and are skipped. - Move tokens to experts. Tokens queue at each (layer, expert) station; when the expert's slot is published, all queued tokens run as one batched GEMM. No predictor picks experts; the router stays exact (invariant 1). - Draft ahead, verify on the beat. A fully resident draft (Qwen3-4B-Instruct-2507, same release/tokenizer family) writes k tokens ahead; the 30B verifies the whole block in one pass/rotation (builds on own30b/specbatch "batched exact verify"). Tokens per beat = accepted prefix + 1. Acceptance rate: being measured now (k = 4..64). - Many riders per beat. Parallel reasoning threads / agents / users share each rotation at near-zero added SSD cost. - Lighter beat (gated on quality). Base + delta expert storage, lower-bit cold tier. - Rhythm-native model (later, Allen's own). Train with expert order and rotation schedule as a design constraint. ### Build order - H0 acceptance-rate measurement (in progress). - H1 fixed-slot ring + io_uring O_DIRECT streamer in our own code, slot publish only after full read + digest + GPU-visible fence; standalone rhythm test reaching the SSD ceiling. - H2 station queues + batched expert GEMM fed by the ring; bit-exact vs fully resident model. - H3 draft + block verify riding the ring; end-to-end tokens/s, cold vs warm, vs fully resident baseline and vs SSD ceiling. - H4 multi-rider + lighter-beat experiments, each separately gated. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:44 UTC Recovered GitHub comment by @aien-spark on 2026-10-18T06:00:07Z. Original comment `6246339820` ## Pi 5 (AIENOS) roles in the Heartbeat (Drake, 2026-10-18) Not a weight path: ~0.125 GB/s gigabit (nominal, not measured) vs 10.03 GB/s local NVMe (calc:`14359036`). - H5a Notary: Pi signs each heartbeat evidence bundle (code + model digests, rates, acceptance tables) with its key ceremony setup; satisfies the "signed or content-addressed evidence bundle" completion rule from an independent machine. - H5b Watchdog: Spark emits one small beat message per rotation; Pi records beat period and alarms if beats stop or exceed a bound. External liveness, not self-reported. - H5c Run ledger: per-run history on the Pi for "better than yesterday" comparisons. Starts after H1 (ring streamer) produces real beats. Sign in to comment