Rootformer-Code v19.2 (Qwen3.8-27B + Qaṭʿ al-Waswasa / NWP-v2)
A standalone, lossless BF16 vLLM-ready 27B coding & agentic release built on official Qwen/Qwen3.8-27B using classical Arabic grammatical and legal-reasoning (uṣūl al-fiqh) algorithms formalized in our companion open dataset enver/KhalilAlgoWorks (16 classical books, 84 machine-verified 121/121 AI/SWE principles).
- Live Side-by-Side Interactive Web/Physics Comparison Space:
enver/rootformer-code-v19-2-showcase (compare Official Qwen/Qwen3.8-27B Base Fast & Base Blind xhigh vs. Rootformer-Code v19.2 directly in your browser!)
- Pure Weight-Only
Pass@1 (0 wrapper): 466/615 (75.77%) vs. Official Qwen/Qwen3.8-27B 462/615 (75.12%) (+4, zero regressions across all 4 suites; 99.97% of parameters bit-identical to official base).
- Single-Shot Two-Phase Qaṭʿ al-Waswasa (
0 tests, 0 retries, 1 pass!): 495/615 (80.49%) — +33 tasks over Official Qwen3.8-27B Base, jumping HumanEval+ to 150/164 (91.46%), MBPP+ to 306/378 (80.95%), and TurāthCode-40 to 29/40 (72.50%) in a single pass!
- Full Bundled Stage 19.2
NWP-v2 Runtime: 506/615 (82.28%) (+44 tasks over Official Qwen3.8-27B Base) + 12/12 (100.0%) on TurāthAgent-Hard-12 = 518/627 (82.62%)!
TurāthCode-40: 37/40 (92.50%) (ALL-TIME RECORD — api 8/8, morphology 8/8, compiler_ast 7/8 up from 2/8, systems 7/8, arabic 7/8; 97.4% capture of 38/40 Oracle ceiling!)
MBPP+-378: 311/378 (82.28%) (ALL-TIME RECORD — +27 vs Base; 92.3% capture of 337/378 Oracle ceiling!)
HumanEval+-164: 154/164 (93.90%) (v18.8 True-Diction) / 150/164 (91.46%) (v19.2 single-shot Qaṭʿ-xhigh@1, 0 tests!) / 148/164 (90.24%) (v19.2 NWP-v2)
Stage 19.2 Breakthroughs (Qaṭʿ al-Waswasa + NWP-v2)
- Two-Phase Qaṭʿ al-Waswasa (Eliminating Blind
<think> Dithering Truncation — 0 Extra Training!):
- Our Stage 19.1
Pass@8 diagnostic proved that under blind Next-Token Prediction (xhigh, max_tokens=5120), 76/237 (32.1%) of reasoning runs — 70.0% on TurāthCode-40 (28/40) and 39.4% on BigCodeBench-Hard-33 (13/33) — burned their entire token budget dithering inside <think> and emitted zero code. Even at 10,240 tokens on our 3-app one-shot HTML5 showcase, stock Qwen/Qwen3.8-27B Blind xhigh burned 10,240/10,240 tokens inside <think> with 0 bytes of HTML on all 3/3 apps.
- Two-Phase Qaṭʿ al-Waswasa caps Phase-1 thinking cleanly (
stop=["</think>"], think_budget=1600–2200), deterministically closes </think> if the budget hits, and generates complete code cleanly post-</think> via vLLM prefix caching.
- Measured single-shot impact (
0 tests, 0 retries):
TurāthCode-40: 9/40 (22.5%) blind xhigh → 29/40 (72.5%, +50.0 pp!)
HumanEval+-164: 106/164 (64.6%) blind xhigh → 150/164 (91.5%, +26.8 pp!)
MBPP+-378: 284/378 (75.1%) Fast → 306/378 (81.0%, +22 tasks!)
- Total
615 tasks: 495/615 (80.49%) in a single pass!
- Post-
</think> Extraction Fix (eval_code_sandbox.py):
Qwen3.8's chat template places <think>\n inside the prompt, so completions contain </think> without an opening <think>. Strictly splitting raw.rsplit("</think>", 1)[-1] prevents extracting abandoned buggy drafts sketched inside <think>.
- Position-Invariant Line-1
VERDICT: Symmetric Al-Sibr wa-l-Taqsīm Adjudication (NWP-v2):
- Runs
Judge(A, B) and order-swapped Judge(B, A) on top behavioral clusters disagreeing on concrete al-Farq probes, accepting flips only on unanimous symmetric agreement (18/19 = 94.7% unanimity on HumanEval+, 78/97 = 80.4% on MBPP+, 20/39 on TurāthCode-40), pushing TurāthCode-40 to 37/40 (92.5%) and MBPP+ to 311/378 (82.3%).
- Honest Finding on
BigCodeBench-Hard-33:
- Qaṭʿ al-Waswasa pushed
BCB-Hard Oracle@8 to 16–17/33 (48.5–51.5%), proving the solutions exist inside the 27B model — yet on ambiguous BCB library/mock docstrings, a 27B self-judge shares the same spec-interpretation blind spots as the generator (10–11/33). Real repositories with real pytest suites (TurāthAgent-Hard-12) do not suffer from that ambiguity (12/12 = 100.0%).
Verified Zero-Leakage Benchmark Results (627 Tasks Total, vLLM 0.34.0 FP8 on H100 80GB)
A. Single-Turn Coding Suites (615 Tasks)
| Model & Mode | TurāthCode-40 | HumanEval+ (164) | MBPP+ (378) | BCB-Hard (33) | ALL 615 Tasks | Δ vs Official 3.8 Base |
|---|
Official Qwen/Qwen3.8-27B Base (Pure Fast Pass@1, 0 wrapper) | 25/40 (62.50%) | 142/164 (86.59%) | 284/378 (75.13%) | 11/33 (33.33%) | 462/615 (75.12%) | — |
Rootformer v18.7 (Pure Fast Pass@1, 0 wrapper — Weights Alone) | 27/40 (67.50%) | 143/164 (87.20%) | 285/378 (75.40%) | 11/33 (33.33%) | 466/615 (75.77%) | +4 (0 regressions) |
Rootformer v18.7 (Blind xhigh Pass@1, Stage 19.1) | 9/40 (22.50%) | 106/164 (64.63%) | — | 7/33 (21.21%) | — | 32.1% truncated in <think> |
Rootformer v19.2 (Single-Shot Qaṭʿ-xhigh@1, 0 tests, 1 pass!) | 29/40 (72.50%) | 150/164 (91.46%!) | 306/378 (80.95%!) | 10/33 (30.30%) | 495/615 (80.49%!) | +33 in 1 shot! |
Official Qwen/Qwen3.8-27B + Adaptive Runtime (v18.7) | 34/40 (85.00%) | 145/164 (88.41%) | 303/378 (80.16%) | 11/33 (33.33%) | 493/615 (80.16%) | +31 |
| Rootformer v18.7 + Adaptive Runtime (v18.7) | 32/40 (80.00%) | 147/164 (89.63%) | 309/378 (81.75%) | 11/33 (33.33%) | 499/615 (81.14%) | +37 (+6 vs 3.8+v18.7) |
| Rootformer v18.7 + Al-Khalīl True-Diction Runtime (v18.8) | 33/40 (82.50%) | 154/164 (93.90%!) | 307/378 (81.22%) | 11/33 (33.33%) | 505/615 (82.11%) | +43 |
| Rootformer v18.7 + Frontier Interactive al-Sibr (v18.9) | 36/40 (90.00%) | 153/164 (93.29%) | 304/378 (80.42%) | 10/33 (30.30%) | 503/615 (81.79%) | +41 |
Rootformer-Code v19.2 (NWP-v2: Qaṭʿ + Symmetric Al-Sibr) | 37/40 (92.50%!) | 148/164 (90.24%) | 311/378 (82.28%!) | 10/33 (30.30%) | 506/615 (82.28%!) | +44 (ALL-TIME HIGH!) |
Post-Qaṭʿ Oracle@8 Ceiling (3 Fast + 5 Qaṭʿ-Think) | 38/40 (95.00%) | 155/164 (94.51%) | 337/378 (89.15%) | 16/33 (48.48%) | 546/615 (88.78%) | 92.7% captured by NWP-v2! |
B. Multi-File Agentic Software Engineering (TurāthAgent-Hard-12, 4–6 File Zero-Hint Repos)
| Model & Agent Arm | Resolved | Avg Turns | Categories |
|---|
Official Qwen/Qwen3.8-27B (Think Plain / Grammarian) | 12/12 (100.0%) | 2.50 / 2.33 | 100% across all 9 domains |
| Rootformer v18.7 (Think Plain / Grammarian) | 12/12 (100.0%) | 2.75 / 2.83 | 12/12 (100.0%, 518/627 = 82.62% combined!) |
C. One-Shot Single-File HTML5 Showcase Comparison (Official Qwen3.8 Sampling T=0.6, top_p=0.95, top_k=20, 16,384-Token Budget)
All completed demos verified live in headless Chromium (0 pageerrors, animated Canvas pixels verified) and hosted live at enver/rootformer-code-v19-2-showcase:
| Showcase Prompt | Official Qwen3.8-27B (Blind xhigh) | Official Qwen3.8-27B (Base Fast) | Rootformer-Code v19.2 (Qaṭʿ) |
|---|
| 01. Bouncing Balls in a Rotating Hexagon | 0 B (16,384/16,384 toks burned in <think>!) | Complete (578L, 23.4 KB, 0 pageErr) | Complete (593L, 23.8 KB, 0 pageErr, all 5 balls contained + collapsible HUD!) |
02. KhalilAlgoWorks Interactive Website | 0 B (16,384/16,384 toks burned in <think>!) | Complete (788L, 41.1 KB, 0 pageErr) | Complete (689L, 41.8 KB, 0 pageErr, interactive triliteral ف ع ل orbital canvas + modal explorer!) |
03. MIZAN CORE Neon Orbital Defense | 0 B (16,384/16,384 toks burned in <think>!) | Complete (906L, 33.9 KB, 0 pageErr) | Complete (821L, 37.0 KB, 0 pageErr, full Canvas + WebAudio synth arcade game!) |
Quickstart: Two-Phase Qaṭʿ al-Waswasa (vLLM FP8 or BF16)
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
model_id = "enver/rootformer-code-v19.2-qwen38-nwp"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
llm = LLM(model=model_id, quantization="fp8", dtype="bfloat16", language_model_only=True, max_model_len=12288, trust_remote_code=True)
msgs = [
{"role": "system", "content": "You are an expert Python 3 software engineer. Output clean, bug-free Python 3 code inside ```python ... ```."},
{"role": "user", "content": "Implement an O(1) LRU cache with TTL expiration in Python."},
]
prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True, enable_thinking=True, reasoning_effort="xhigh")
# Phase 1: Bounded <think> (prevents infinite dithering truncation!)
p1 = llm.generate([prompt], SamplingParams(temperature=0.0, max_tokens=2000, stop=["</think>"], include_stop_str_in_output=True))[0].outputs[0].text
closed = (p1.rsplit("</think>", 1)[0] + "</think>\n\n") if "</think>" in p1 else (p1.rstrip() + "\n\nI have finished the analysis. Emitting final clean code now.\n</think>\n\n")
# Phase 2: Guaranteed clean post-</think> code emission (uses vLLM prefix cache!)
code_reply = llm.generate([prompt + closed], SamplingParams(temperature=0.0, max_tokens=2048))[0].outputs[0].text
print(code_reply)
Bundled Ecosystem & Classical Lineage
- Base Architecture:
Qwen/Qwen3.8-27B (Apache 2.0) — standalone merged BF16 (18 safetensors shards, top-16 executive layers 48..63 adapted in 100% Native BF16).
- Classical Algorithm Atlas Dataset:
enver/KhalilAlgoWorks (16 classical Arabic grammar & uṣūl books distilled into 84 machine-verified 121/121 AI/SWE algorithm guides + CLI lookup engine).
- Live Interactive Showcase Space:
enver/rootformer-code-v19-2-showcase.
- Arabic Classical Translation Sibling Model:
enver/rootformer-v17.12-muhaqqiq-musaddiq.
- Full Runtime Bundle (
rootformer_code_runtime/): Includes Stage 18.7 & Stage 18.10 (16.5 MB) sparse BF16 adapters, khalil_code_wazn_calculator.py, nwp_code_wazn_engine.py, eval_stage19_2_nwp_v2_gpu.py, eval_stage19_2_oneshot_showcase_gpu.py, fixed eval_code_sandbox.py, and all verified Stage 18.7–19.2 JSON benchmark logs.