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 / campaigns / smollm2-qualification / ACCEPTANCE-SMOLLM2-Q.md
| 1 | # SMOLLM2-Q: SmolLM2-1.7B-Instruct on the complete CAND-4 qualification suite (declared before any run) |
| 2 | |
| 3 | ```text |
| 4 | campaign_id = "smollm2-qualification" |
| 5 | spec_version = 1 |
| 6 | purpose = Drake decision D3 (aien-architecture CURRENT_EXECUTION_PLAN.md, "operator decisions", |
| 7 | arch#156, merge f469bd13): after the daemon memory-sizing fix (sovereign-core issue #239, |
| 8 | PR #246) is merged, retest SmolLM2-1.7B-Instruct. If it passes the complete qualification |
| 9 | suite it becomes the next open-model candidate; if it fails for a reason unrelated to the |
| 10 | corrected memory sizing, Qwen3-4B is evaluated next. Never a bigger model to dodge the |
| 11 | allocation bug. |
| 12 | suite = the CAND-4 qualification suite (cand4-qualification/ACCEPTANCE-CAND4.md, frozen in 130beeb, |
| 13 | merged 328a7e9), run unchanged except for the substitutions of section 0, plus the memory |
| 14 | observations of section 8 (they close issue #236 and are not verdict rows). |
| 15 | candidate = sovereign-core main at the merge commit of #246 (sc_commit below), its omega and aienos |
| 16 | pins, and the SmolLM2 snapshot of section 2. Not a named candidate: if this campaign |
| 17 | PASSES, a CAND manifest is frozen afterwards from exactly these values. |
| 18 | status = DRAFT until the block in section 1 holds no UNFROZEN value. The freeze is the commit that |
| 19 | fills that block; it changes this file only and is made before any run. Nothing in this |
| 20 | file changes after the freeze; a change is a new spec_version. |
| 21 | scope = Linux-hosted, single machine (the Spark, GB10), the sovereign-core daemon path, as CAND-4. |
| 22 | Licence: SmolLM2 weights keep Apache-2.0 and their upstream notices; AIEN code Apache-2.0. |
| 23 | ``` |
| 24 | |
| 25 | ## 0. What differs from the CAND-4 suite (every difference, nothing else) |
| 26 | |
| 27 | | item | CAND-4 | SMOLLM2-Q | why | |
| 28 | |------|--------|-----------|-----| |
| 29 | | model | unsloth/Llama-3.2-1B-Instruct 5a8abab | HuggingFaceTB/SmolLM2-1.7B-Instruct 31b70e2e (section 2) | the purpose | |
| 30 | | chat template | Llama 3 (from the snapshot) | ChatML (from the snapshot's `tokenizer_config.json`; sovereign-core #233, merged a39c617) | the model's own template | |
| 31 | | `max_tokens` | 96 | 64 | frozen in SmolLM2 campaign v1 before its run, from the measured GB10 decode speed (open-model-smollm2/ACCEPTANCE-v1.md section 2.1: a 96-token attempt costs about 31.7 s, more than the 29 s skill budget). Keeping 64 is no change after results; raising it now would be tuning after v1's T3 hit the limit. | |
| 32 | | binaries | CAND-4 double build at d5b78ff | a clean double build at `sc_commit` (the CAND-4 recipe, `scripts/release-build.sh`), plus `cpu_fault` rebuilt from `sc_commit` by `build-cpu-fault.sh` | new code (#233, #246 and everything merged between) | |
| 33 | | model pinning | seven named files, exact listing | every regular file of the snapshot as a `model_file` line, exact listing `model_dir_listing` (the snapshot also holds `.cache/`, the download metadata, not read by the loader) | the SmolLM2 snapshot has other files than the Llama one | |
| 34 | | harness | `cand4-qualification/` at 1ce850c (#240 hardening included) | a copy in this directory; renamed labels (`SMOL2Q_*` gates, owner `laneSmol2`), the generic model check above, per-launch memory observations in the Q1 attempt records, `results_sha256` in the Q2w score (CAND-4 review finding e), the `mem` command (section 8), the stale note of `q1.decl.json` corrected (CAND-4 review finding b) | the CAND-4 files are a frozen record and are not edited | |
| 35 | | owner of GPU holds | laneQ | laneSmol2 | session "aien implementation phase transition" runs this campaign | |
| 36 | |
| 37 | |
| 38 | ## 1. Frozen inputs (filled once, at the freeze) |
| 39 | |
| 40 | `run-smol2q.sh` reads this block. It refuses a QUALIFICATION run while any value is UNFROZEN and |
| 41 | recomputes every sha256 below before every launch, inside each GPU hold. |
| 42 | |
| 43 | ```text |
| 44 | >>> SMOLLM2-Q frozen inputs >>> |
| 45 | kind = QUALIFICATION |
| 46 | candidate_id = SMOLLM2-Q (unnamed until a PASS) |
| 47 | sc_commit = 2e8cef96db9eee426b2e52b5396722294b0e69e0 |
| 48 | omega_commit = c0369e6705a4b0cb800978846e78915126a1b7f7 |
| 49 | aienos_commit = b84c0a67590a934f3f3e001b12ec85ebc086a9eb |
| 50 | physics_commit = 6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf |
| 51 | build_evidence = /home/drakestapleton/workspace/evidence-out/SMOL2Q-BUILD-A |
| 52 | aien_cli_path = /home/drakestapleton/.claude/jobs/9bfe8553/tmp/smol2/build/rootA/wt-sc/target-rb/release/aien-cli |
| 53 | aien_cli_sha256 = ce2fff7cb473550f61a7db3b78ef0082ea11753eb6b43d162cbcbd242e186a9d |
| 54 | cpu_fault_path = /home/drakestapleton/.claude/jobs/9bfe8553/tmp/smol2/build/cpu-fault/aien-cli-cpu-fault |
| 55 | cpu_fault_sha256 = b1b4acb0b23615ef61bbeb76ddbaedc14777be9d616f0ab62ba1482dbf08105d |
| 56 | librx_compose_sha256 = dfe0ffb8904b08cf9b67c857f7e9de34bf493a6d4d763e9fef0cf2b10f114cd6 |
| 57 | libomega_gpu_sha256 = ef80e4313d4e678335dceac3493aadec8d0df4352dd5356854b92e0a9e070887 |
| 58 | omega_build_dir = /home/drakestapleton/.claude/jobs/9bfe8553/tmp/smol2/build/rootA/wt-omega/build/rb |
| 59 | rx_r13_host_sha256 = f7b3add700e6b2971a2b1851793529c62549f1ecb3439afb792e18d6ea940cb9 |
| 60 | rx_r13_silicon_sha256 = 088a7f2b127e941a420ff855d86349e24fe65b50fe4849accb2300f96cc56e25 |
| 61 | rx_r13_testbuild_sha256 = 52e6bd7b6b187174719b84e86aaed99a86ddfe11f35a8eb3419fece169d764cf |
| 62 | omega_src_dir = /home/drakestapleton/.claude/jobs/9bfe8553/tmp/cand4/src/omega |
| 63 | aienos_repo = /home/drakestapleton/.claude/jobs/9bfe8553/tmp/cand4/src/aienos |
| 64 | physics_dir = /home/drakestapleton/.claude/jobs/9bfe8553/tmp/smol2/build/rootA/wt-physics |
| 65 | model_dir = /home/drakestapleton/models/SmolLM2-1.7B-Instruct-31b70e2e869a |
| 66 | model_dir_listing = .cache,.gitattributes,PROVENANCE.md,README.md,config.json,generation_config.json,instructions_function_calling.md,merges.txt,model.safetensors,special_tokens_map.json,tokenizer.json,tokenizer_config.json,vocab.json |
| 67 | model_file = .gitattributes 11766e5171641f6c68b9f14099fdb4e7b3d610f0a69451893e356c8334812257 |
| 68 | model_file = PROVENANCE.md 6e8636821c1ceb98dde07c71dbc2a8bde06dcb367a0f20b0cce573ed5b076b92 |
| 69 | model_file = README.md b00c0570dbc43674a0028d088fc72f40d83eea90f47cd987706ca2f95ed114c0 |
| 70 | model_file = config.json 994f50b16abb4ae00880baefe03c10260b5bd608d2bf586f7056ca05a534feea |
| 71 | model_file = generation_config.json 87b916edaaab66b3899b9d0dd0752727dff6666686da0504d89ae0a6e055a013 |
| 72 | model_file = instructions_function_calling.md dd266c8ca7f329682d17c1bfb72e2b870ac849f17a79a0bc23ccc897e4917134 |
| 73 | model_file = merges.txt 0b54e8aa4e53d5383e2e4bc635a56b43f9647f7b13832d5d9ecd8f82dac4f510 |
| 74 | model_file = model.safetensors f55217be716b6a997b97b9d8d7eb6fad02e00858f5010ec24f64603c3a98a0e8 |
| 75 | model_file = special_tokens_map.json 2b7379f3ae813529281a5c602bc5a11c1d4e0a99107aaa597fe936c1e813ca52 |
| 76 | model_file = tokenizer.json 9ca9acddb6525a194ec8ac7a87f24fbba7232a9a15ffa1af0c1224fcd888e47c |
| 77 | model_file = tokenizer_config.json 4ec77d44f62efeb38d7e044a1db318f6a939438425312dfa333b8382dbad98df |
| 78 | model_file = vocab.json 82b84012e3add4d01d12ba14442026e49b8cbbaead1f79ecf3d919784f82dc79 |
| 79 | llama_control_dir = /home/drakestapleton/.cache/huggingface/hub/models--unsloth--Llama-3.2-1B-Instruct/snapshots/5a8abab4a5d6f164389b1079fb721cfab8d7126c |
| 80 | llama_control_safetensors = 1ff795ff6a07e6a68085d206fb84417da2f083f68391c2843cd2b8ac6df8538f |
| 81 | llama_control_config = dfb67fd8afe73a1c75245824ef9d64a6ba8983025447e3bf76aa1ea57ee46152 |
| 82 | max_tokens = 64 |
| 83 | attempt_budget_ms = 12000 |
| 84 | skill_budget_ms = 29000 |
| 85 | max_attempts = 3 |
| 86 | q1_a1_record_mark = record-mark |
| 87 | fix_old_dir = /home/drakestapleton/.claude/jobs/9bfe8553/tmp/np2-fix |
| 88 | fix_old_files_sha256 = 3e4e26eff45e0f7282c335cb2028cd8c314e11b2669c73c16ab27c530c89eaf8 |
| 89 | <<< end of SMOLLM2-Q frozen inputs <<< |
| 90 | ``` |
| 91 | |
| 92 | The model values (sections 1 and 2) are filled now, before the freeze, because they do not depend on the |
| 93 | build; the twelve sha256 values equal the files on disk (computed 2026-10-06) and the four that |
| 94 | SmolLM2 campaign v1 pinned (model, config, generation config, tokenizer) are byte-equal to v1. |
| 95 | The Llama control values equal CAND-4 (`ACCEPTANCE-CAND4.md` section 1). Every UNFROZEN value is |
| 96 | filled from the double build at `sc_commit` in the freeze commit. |
| 97 | |
| 98 | ## 2. Model, template and budgets |
| 99 | |
| 100 | ```text |
| 101 | model_id = HuggingFaceTB/SmolLM2-1.7B-Instruct, revision 31b70e2e869a7173562077fd711b654946d38674 |
| 102 | LlamaForCausalLM, 24 layers, hidden 2048, 32 heads, 32 kv heads, head_dim 64, |
| 103 | max_position_embeddings 8192 (config.json), BF16 weights, chat template ChatML, |
| 104 | stop token <|im_end|>, licence Apache-2.0 (model card; PROVENANCE.md in model_dir) |
| 105 | max_tokens = 64 (section 0) |
| 106 | ``` |
| 107 | |
| 108 | Everything else is ACCEPTANCE-CAND4 section 2 unchanged: greedy decoding stopping on the model's |
| 109 | end-of-sequence token, the proposal prompt with the `filename:` assistant prefix, the 12 000 ms |
| 110 | attempt threshold, the 29 000 ms skill budget, 3 attempts, the retry policy and the launch |
| 111 | environment. `run-smol2q.sh check` reads the budget, attempt and prefix constants from the code at |
| 112 | `sc_commit` and refuses if they differ from section 1. |
| 113 | |
| 114 | Stated limit carried from v1 (`open-model-smollm2/ACCEPTANCE-v1.md` section 2.1): GB10 greedy output |
| 115 | can differ from the Hugging Face reference on near-ties (two of six diagnostic prompts). |
| 116 | |
| 117 | ## 3. Production hygiene (H), run first, no GPU |
| 118 | |
| 119 | ACCEPTANCE-CAND4 section 3 unchanged (rows H1, H1c, H2, H3, H4, H4c, H5, H6), against the SMOLLM2-Q |
| 120 | binaries; `hygiene.sh`. |
| 121 | |
| 122 | ## 4. Q1 useful workflow (GPU) |
| 123 | |
| 124 | ACCEPTANCE-CAND4 section 4 unchanged: tasks T1, T2, T3 of `next-phase-1/tasks-v5.json`, 3 repetitions |
| 125 | each, every v1..v5 row, one quietlock hold per round, `q1.decl.json`. Row Q4 already lists the ChatML |
| 126 | markers `<|im_start|>`, `<|im_end|>`, `<|endoftext|>`. A daemon that fails to start makes that launch |
| 127 | FAIL. In addition (observations, not rows) every attempt record carries both daemons' KV pool plan |
| 128 | line, warm-up line, fatal lines, session-open attempt lines and VmHWM (section 8). |
| 129 | |
| 130 | ### 4.1 Reading of the A1 containment row |
| 131 | |
| 132 | ACCEPTANCE-CAND4 section 4.1 unchanged (`q1_a1_record_mark = record-mark`, `a1-read.sh`), with its |
| 133 | two negative controls as rows of `q1.decl.json`. |
| 134 | |
| 135 | ## 5. Q2 recovery (NEXT-PHASE-2 v4 case set) |
| 136 | |
| 137 | ACCEPTANCE-CAND4 section 5 unchanged: F0 on the GB10 in one hold, then the NEXT-PHASE-2 v4 cases on |
| 138 | `cpu_fault` (rebuilt from `sc_commit` by `build-cpu-fault.sh`), `REPS=3`, `q2.decl.json`, scored by |
| 139 | SCORING-v5. The cases unset the model variables and run on the CPU-reference daemon |
| 140 | (`next-phase-2/run-faults.sh`), so only F0, C3-control and Q1 use SmolLM2. |
| 141 | |
| 142 | ## 6. Coverage of six failure cases |
| 143 | |
| 144 | ACCEPTANCE-CAND4 section 6 unchanged: cases 1, 3 and 6 OUT OF SCOPE; case 4 CONDITIONAL on C6d; |
| 145 | case 2 only as W2; case 5 only non-deterministically (W5). |
| 146 | |
| 147 | ### 6.1 Window rows (Q2w) |
| 148 | |
| 149 | ACCEPTANCE-CAND4 section 6.1 unchanged: W-ctl, W2 x3, W5 with 40 trials, `windows.decl.json`, |
| 150 | `run-windows.sh`, on the CPU build. |
| 151 | |
| 152 | ## 7. Run order, receipts, verdict |
| 153 | |
| 154 | Run order and GPU rules: |
| 155 | |
| 156 | 1. After the coordinator's "GO SmolLM2" (sent when #246 is merged): `sc_commit` = that merge commit |
| 157 | (or main at GO if later merges landed first, named in the freeze commit). Double build with the |
| 158 | CAND-4 recipe (`scripts/release-build.sh`), started only while `~/workspace/.spark-quiet` is |
| 159 | absent (the CAND-4 lesson: a hold taken mid-build makes the GPU-library steps refuse). Rebuild |
| 160 | `cpu_fault`. |
| 161 | 2. Freeze commit (fills section 1, this file only). `run-smol2q.sh check` PASS. |
| 162 | 3. `hygiene` (no GPU), then `mem` (section 8, one hold <= 10 min), then `q1` (three holds <= 20 min), |
| 163 | then `q2` (F0 in one hold, cases on CPU), then `q2w` (CPU). |
| 164 | 4. Every hold through `quietlock hold` with start and release whispers. Another lane's hold is waited |
| 165 | for, never interrupted. No chip test is killed. |
| 166 | |
| 167 | Receipts and what is never done: ACCEPTANCE-CAND4 section 7 unchanged (receipts in `receipts/`, no |
| 168 | launch repeated, no threshold changed after results, NOT_RUN / NOT_APPLICABLE / INCOMPLETE / |
| 169 | UNVERIFIED never PASS). |
| 170 | |
| 171 | SMOLLM2-Q PASS iff every digest check passed, H PASS (H1, H1c, H2, H3, H4, H4c, H5), Q1 PASS (section |
| 172 | 4.1 reading), Q2 PASS and Q2w PASS. The verdict (`VERDICT-SMOLLM2-Q.md`) also states the section 9 |
| 173 | class of every failing row and cites the section 8 records. |
| 174 | |
| 175 | ## 8. Memory observations (close issue #236; observations, not verdict rows) |
| 176 | |
| 177 | On the production `aien_cli` of section 1, `run-smol2q.sh mem` makes two daemon starts in one hold: |
| 178 | SmolLM2 (`model_dir`), then a Llama-3.2-1B control (`llama_control_dir`, files checked against CAND-4). |
| 179 | Each start records: `/proc/meminfo` before (MemTotal, MemAvailable, SwapFree, HugePages; NVIDIA DGX |
| 180 | Spark known issues: on this unified-memory machine `nvidia-smi` memory is "Not Supported" and |
| 181 | `cudaMemGetInfo` can under-report, so `/proc/meminfo` is the source), any process holding a GPU device |
| 182 | file, the KV pool plan line and the memory check line (#246), the warm-up line, any fatal or |
| 183 | session-open attempt line, and VmHWM after warm-up from `/proc/<pid>/status`. Every Q1 launch also |
| 184 | records both daemons' plan line, warm-up line, fatal lines and VmHWM (from `run.json`) in its attempt |
| 185 | record. |
| 186 | |
| 187 | Expected, from the #246 formula and each `config.json` (bytes = blocks x 16 tokens x layers x kv heads |
| 188 | x head_dim x 2 x 4 bytes): |
| 189 | |
| 190 | | model | expected plan line starts | before #246 | |
| 191 | |-------|---------------------------|-------------| |
| 192 | | SmolLM2 | `KV pool: 3221225472 bytes (3.00 GiB) = 512 blocks x 16 tokens x 24 layers x 32 kv heads x 64 head_dim x 2 (K,V) x 4 bytes; context 8192 tokens` | 8192 blocks, 51539607552 bytes (48.00 GiB); v1 repro VmHWM 61.1 GB | |
| 193 | | Llama-3.2-1B | `KV pool: 8589934592 bytes (8.00 GiB) = 8192 blocks x 16 tokens x 16 layers x 8 kv heads x 64 head_dim x 2 (K,V) x 4 bytes; context 131072 tokens` | the same 8.00 GiB (unchanged); v1 repro VmHWM 17.4 GB | |
| 194 | |
| 195 | Issue #236 is closed after `mem` runs, citing both records, whatever the Q1 result. If the 0x51 crash |
| 196 | appears in any start, #236 stays open with that record. |
| 197 | |
| 198 | ## 9. Classification of a FAIL (for decision D3; written before any run) |
| 199 | |
| 200 | Every failing row is put in exactly one class in `VERDICT-SMOLLM2-Q.md`: |
| 201 | |
| 202 | - **M, memory sizing:** a SmolLM2 daemon start (Q1, F0 or `mem`) that ends in `Fatal: shared KV pool`, |
| 203 | the KV pool memory refusal, a GPU session open that fails after its attempts, driver status 0x51, |
| 204 | or an out-of-memory kill; or a SmolLM2 KV pool plan line that differs from the expected one in |
| 205 | section 8. A row that fails because of such a start is class M. |
| 206 | - **U, unrelated to memory sizing:** every other failing row (task quality Q1 to Q4, authority A1 to |
| 207 | A6, v1..v4 rows, a recovery or window row, hygiene, a digest). |
| 208 | |
| 209 | If any class M event occurs, the verdict says so first: the memory fix did not hold for SmolLM2, the |
| 210 | fix is reworked, and the D3 step to Qwen3-4B is not taken on this result. If every failure is class U, |
| 211 | the verdict says so: D3 then names Qwen3-4B as the next model to evaluate. |
| 212 | |
| 213 | ## 10. Not in this suite |
| 214 | |
| 215 | NEXT-PHASE-1 v6 and v7 (the wider correctness campaigns) are not part of the CAND-4 qualification |
| 216 | suite and are not run here; a PASS here says nothing about them. |