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

branch main Branches Tags History

aien-sovereign-core-mv / docs / campaigns / open-model-qwen3 / EVAL-qwen3-8b.md

137 lines · 17241 bytes Raw Blame History Source

Evaluation of Qwen/Qwen3-8B as the next public-model candidate (D1)

Status: EVALUATION ONLY. Nothing here promotes the model. Owning issue: aien-spark/aien-sovereign-core#384 (Drake ruling 2026-10-11, aien-architecture#190 comment 6109731585, sc#384 comment 6109731974: Qwen3-4B-Instruct-2507 is retired after the frozen FAILs v5 and v6). Written 2026-10-11 on the sovereign-core main at 5886f91. No GPU use was intended; one slip is disclosed in Section 7.

Tags: OBSERVED = read from a file or command output on this machine today. SOURCE(url) = taken from the cited page. UNVERIFIED = reasoning or estimate, with a confidence. Revision pinned for every Hugging Face fact: b968826d9c46dd6066d109eabc6255188de91218 (SOURCE https://huggingface.co/api/models/Qwen/Qwen3-8B, lastModified 2025-07-26).

0. Verdict

engine compatibility = SUPPORTED (updated 2026-10-11 16:10Z): template pinned sc#436, SMOKE-8B-v1 PASS attempt 2 (GB10 ids equal CPU golden, fallback 0).
license              = Apache-2.0, redistribution allowed
size                 = 16.38 GB of bf16 weights in 5 shards (2.04 times the 4B)
weights on disk      = ~/models/qwen3-8b, all five shards re-hashed and equal to Hugging Face's own sha256 (Section 1)
next step            = v7 campaign driver with ALLEN engaged + complete dry-run gate, then freeze v7 (334 rows unchanged)

1. Provenance and license

model.safetensors.index.json  f9fdbcb91c23971c13ec5d5f2573d2349e8f61f2f049371ec699281748fdb1bc   (total_size 16,381,470,720 bytes)
model-00001-of-00005          31d6a825ae35f11fb85b195b4c42c146c051e446433125a215336abdf95cbf5f   3,996,250,744
model-00002-of-00005          5991236cea6fe21f3d43cab0f0e84448734fbbe0789816202989f2ddc9d18282   3,993,160,032
model-00003-of-00005          c5185c4794be2d8a9784d5753c9922db38df478ce11f9ed0b415b7304d896836   3,959,604,768
model-00004-of-00005          b5ee7de71fbf17db3d5704e0c8f2bc7d005ca9e1d7ca2aeb19827b0cfcaa917a   3,187,841,392
model-00005-of-00005          20c2d6366ab85c90786ccdd829cd2b9e7d30ef3b2ebbb998280e7e4014b542ff   1,244,659,840
config.json                   f7c4eadfbbf522470667b797a3c89be2524832d2d599797248dc304fff447c30
generation_config.json        2325da0f15bb848e018c5ae071b7943332e9f871d6b60e2ed22ca97d4cb993d2
tokenizer_config.json         d5d09f07b48c3086c508b30d1c9114bd1189145b74e982a265350c923acd8101
tokenizer.json                aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4

2. Architecture against the 4B

OBSERVED from ~/models/qwen3-4b-instruct-2507-cdbee75/config.json and the 8B config.json above. The two files carry the same set of keys.

field4B-Instruct-25078Bengine effect
architectures / model_typeQwen3ForCausalLM / qwen3sameaccepted (model_dir.rs QWEN3_ARCHITECTURE)
num_hidden_layers3636same
hidden_size25604096all matmul shapes change; derived from the config, not hard-coded (SOURCE gb10_serving.rs serving_matmul_shapes, gb10_serving_bounds)
intermediate_size972812288widest GB10 matmul input becomes 12288 (was 9728); derived (max_k = max(hidden, q_dim, intermediate))
num_attention_heads / num_key_value_heads32 / 832 / 8same
head_dim128128same; here q_dim 4096 equals hidden_size, for the 4B it was 4096 against 2560
vocab_size151936151936same (logit width 151936)
tie_word_embeddingstruefalsethe 8B ships a separate lm_head.weight (OBSERVED in the index). The loader supports an untied head (SOURCE weights.rs lines 757-759, 822-825; resident.rs line 249). Not exercised on the Qwen3 GB10 path before: UNVERIFIED, see Section 8.
rope_theta5,000,0001,000,000read from config; value changes, mechanism does not
rope_scalingnullnullsame
max_position_embeddings26214440960the product caps the context at 4096 (AIEN_KV_CONTEXT_TOKENS), below both
rms_norm_eps, hidden_act, bias flags, sliding window1e-6, silu, no bias, offsamesame

3. Tokenizer

4. Chat template and thinking mode

5. Engine compatibility verdict: NEEDS WORK (at writing; CLOSED 2026-10-11, see the update under each gap)

Gaps, each with the code place:

  1. Chat template (blocks the daemon). tokenizer.rs parse_chatml and the ChatTemplate enum need a second pinned Qwen layout, for example ChatMlQwen3Hybrid (name open), that (a) pins the 8B template text byte for byte as a fixture next to the 4B's with a PROVENANCE.md and a render oracle, (b) always appends <think>\n\n</think>\n\n after the generation prompt (thinking off as a fixed product setting, no per-call switch), and (c) refuses prior assistant turns that carry <think> blocks rather than approximating. Tests: extend tests/qwen3_chat_template.rs and tests/tool_boundary.rs. Also spine.rs line 1151 matches ChatMlQwen3 by name for the "filename:" prompt label and needs the new variant.
  2. Untied output head on the qualified GB10 path (OBSERVED fine 2026-10-11: SMOKE-8B-v1 attempt 2 PASS, GB10 ids equal CPU golden on both prompts). weights.rs/resident.rs handle lm_head.weight generally; the Qwen3 parity and GB10 tests were written with the tied 4B. Needs the smoke test of Section 8 to turn this into OBSERVED either way. Extra resident bytes if streamed: vocab 151936 x 4096 x 2 = 1.24 GB (arithmetic).
  3. Sampling mismatch (not a code gap). The model card advises against greedy decoding; the campaigns are greedy. This can only be measured by running, and cannot be a reason to change a threshold.

Not gaps (OBSERVED or SOURCE): Qwen3ForCausalLM accepted; all config keys known; 36 layers, 8 KV heads, head_dim 128 same as the 4B; GB10 serving bounds computed from the config (gb10_serving_bounds); safetensors sharded checkpoints with an index are the engine's format (the 4B is loaded that way, three shards, OBSERVED in its folder and in the v6 evidence).

6. Resource estimate

7. Disk, download and a disclosed slip

8. Plan for the correctness smoke test (run only after the template gap is closed)

Goal: show that the 8B produces correct tokens on the native engine, with the evidence kinds of the 4B work (examples/qwen3_parity_check.rs, tests/qwen3_forward_parity.rs, R1 reference leg of the campaign).

  1. Tokenizer ids. Encode 3 fixed strings (an ASCII sentence, a code line, a multi-byte string) with the engine and compare to ids produced once by the Hugging Face tokenizer for the same tokenizer.json. Since tokenizer.json equals the 4B's, the existing tokenizer tests already cover it: only the template differs.
  2. Template render. The golden conversation [system "You are a careful assistant.", user "Say OK."] must render to <|im_start|>system\nYou are a careful assistant.<|im_end|>\n<|im_start|>user\nSay OK.<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n (OBSERVED 2026-10-11: render_oracle.json produced by jinja2 3.1.6 off-repo from the publisher template, 10/10 cases byte-equal to the engine in qwen3_8b_chat_template.rs; re-rendered independently from ~/models/qwen3-8b/tokenizer_config.json the same day, 10/10 equal).
  3. Golden prompt to ids. Off-repo, once, with the Hugging Face reference (scratch Python allowed outside the repo, enable_thinking=False, greedy, 16 new tokens, bf16) record the 16 token ids for the prompt "Reply with the single word OK." Commit them as the expected ids.
  4. Engine CPU reference. Run the CPU reference leg (np1_reference style, no GPU) for the same 16 tokens: expected equal to step 3 token for token or equal up to a bf16 near-tie, which is then reported with the logit margin (as qwen3_noise_floor.rs does for the 4B). Do not accept a mismatch by raising a tolerance.
  5. GB10 leg, quiet hold only. Same prompt on the GB10 backend: tokens must equal the CPU reference leg (the R1 identity rule). Record VmHWM, warm-up ms, decode ms per token.
  6. Untied head check. Step 4 and 5 are the check for gap 2; an untied-head failure shows as logits from the wrong matrix (all tokens wrong), not as a small drift.

Smoke PASS means steps 2 to 5 pass. It is not a qualification and not a promotion.

9. Limits of this document