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 / pkv514-chip-20261014 / PLAN.md
| 1 | # #514 chip qualification plan (written before any chip run, 2026-10-14) |
| 2 | |
| 3 | Candidate: branch `pkv/505-omega-park-restore` with origin/main merged (commit recorded in |
| 4 | RESULTS.md), stacked on `pkv/503-own30b-serve` (#510, not merged yet: qualified against the |
| 5 | branch as-is). Native release build, omega at the `omega.lock` pin (d0889a94), physics at |
| 6 | omega's `physics.lock`, built through `scripts/pins.sh --gpu` (clean tree, so the build id is |
| 7 | trusted). Model: `~/models/qwen3-30b-a3b-instruct-2507-fp8`, fp8-all weights, fused attention |
| 8 | cache (the live server's path). Every chip process takes `/tmp/aien-gb10.lock` around each |
| 9 | generation. Ports 18098/18099 (18097 is left for the Qwen3-8B worker, 18091 is the live |
| 10 | server and must be down, 18095 is spark-cockpit). Before each run: quiet flag clear, at least |
| 11 | 45 GB `MemAvailable` per 30B process (unified 128 GB; `cudaMemGetInfo` under-reports, so |
| 12 | `/proc/meminfo` is the gauge). |
| 13 | |
| 14 | Docs read: DGX Spark user guide known issues (unified memory, `nvidia-smi` memory "Not |
| 15 | Supported", `cudaMemGetInfo` may under-report). Concurrent use of one store directory by two |
| 16 | processes: DOCS SILENT (ADR 0003 names one runtime per store directory; the store takes no |
| 17 | cross-process lock), so it is not tested as a supported mode. |
| 18 | |
| 19 | ## Items (PASS rule in brackets) |
| 20 | |
| 21 | 1. **Fused-cache export/import round trip.** In-process chip test |
| 22 | `fused_cache_round_trip_cost_and_restore_latency_on_the_chip`: 2048-token prompt plus 32 |
| 23 | generated tokens; export positions 0..n (A, 5 times: all identical); reset; `restore_kv`(A); |
| 24 | export again (B). [B == A byte for byte] |
| 25 | 2. **Restored-turn token identity.** (a) in-process `restored_turn_two_equals_the_uninterrupted_turn_two_on_the_chip` |
| 26 | (greedy, seed 1, temperature 0; also the engine K/V after turn 2 byte for byte); |
| 27 | (b) the server script `own30b-pkv-chip-check.sh` (off/on/park/restore and its other phases). |
| 28 | [restored turn 2 tokens == uninterrupted turn 2, restores == 1] |
| 29 | 3. **Checkpoint cost.** From item 1's test: export time under the GPU lock for the whole |
| 30 | history (ms, min and median of 5) and bytes; the store's `park_bytes` and `parked_chunks` |
| 31 | after turn 1. [measured; no threshold, numbers recorded] |
| 32 | 4. **NVMe restore latency, cold and warm.** Same test: `fetch` (store lookup, read, decrypt, |
| 33 | verify) of the parked prefix, 5 times warm (page cache) and 5 times cold |
| 34 | (`sync; echo 3 > /proc/sys/vm/drop_caches` before each, cold proven by `/proc/self/io` |
| 35 | `read_bytes` growing by at least the stored bytes); plus `restore_kv` import time. |
| 36 | [fetched payload == A byte for byte every time; numbers recorded] |
| 37 | 5. **Two-process test.** Process 1 (server, :18098) parks turn 1 and stays loaded; process 2 |
| 38 | (second server, :18099, a copy of process 1's store, same key) loads beside it and answers |
| 39 | turn 2 by restoring; process 1 then answers turn 2 from RAM. [both turn 2 replies == |
| 40 | the uninterrupted turn 2 of a persistence-off run; process 2 restores == 1] |
| 41 | |
| 42 | ## Baseline and negative controls |
| 43 | |
| 44 | - Baseline: persistence off (same binary, `AIEN_KV_STORE_DIR` unset), same conversation; every |
| 45 | comparison is against it. The script's `off` phase and the in-process uninterrupted turn. |
| 46 | - Comparator can say no: in item 1, restore A with one byte flipped, export: must differ from A, |
| 47 | then restore A again and match. |
| 48 | - Engine refuses a truncated payload (`restore_kv` Err, history empty). |
| 49 | - Corrupted checkpoint refused: in item 4, flip one byte in every stored object, drop caches, |
| 50 | `fetch` must return nothing with a miss counted; server script `neg-corrupt` phase |
| 51 | (restores == 0, still answers) and `neg-switch` (another identity, restores == 0). |
| 52 | |
| 53 | Anything not measured here is UNVERIFIED in RESULTS.md. |