Run this model with HF Jobs
Run enver/rootformer-code-v19.2-qwen38-nwp on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/enver/rootformer-code-v19.2-qwen38-nwp. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/enver/rootformer-code-v19.2-qwen38-nwp on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/enver/rootformer-code-v19.2-qwen38-nwp. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/enver/rootformer-code-v19.2-qwen38-nwp. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use enver/rootformer-code-v19.2-qwen38-nwp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use enver/rootformer-code-v19.2-qwen38-nwp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="enver/rootformer-code-v19.2-qwen38-nwp") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("enver/rootformer-code-v19.2-qwen38-nwp") model = AutoModelForMultimodalLM.from_pretrained("enver/rootformer-code-v19.2-qwen38-nwp", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use enver/rootformer-code-v19.2-qwen38-nwp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "enver/rootformer-code-v19.2-qwen38-nwp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "enver/rootformer-code-v19.2-qwen38-nwp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/enver/rootformer-code-v19.2-qwen38-nwp
- SGLang
How to use enver/rootformer-code-v19.2-qwen38-nwp with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "enver/rootformer-code-v19.2-qwen38-nwp" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "enver/rootformer-code-v19.2-qwen38-nwp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "enver/rootformer-code-v19.2-qwen38-nwp" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "enver/rootformer-code-v19.2-qwen38-nwp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use enver/rootformer-code-v19.2-qwen38-nwp with Docker Model Runner:
docker model run hf.co/enver/rootformer-code-v19.2-qwen38-nwp
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 OfficialQwen/Qwen3.8-27BBase Fast & Base Blindxhighvs.Rootformer-Code v19.2directly in your browser!) - Pure Weight-Only
Pass@1(0wrapper):466/615 (75.77%)vs. OfficialQwen/Qwen3.8-27B462/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 (
0tests,0retries,1pass!):495/615 (80.49%)—+33tasks over OfficialQwen3.8-27BBase, jumpingHumanEval+to150/164 (91.46%),MBPP+to306/378 (80.95%), andTurāthCode-40to29/40 (72.50%)in a single pass! - Full Bundled Stage 19.2
NWP-v2Runtime:506/615 (82.28%)(+44tasks over OfficialQwen3.8-27BBase) +12/12 (100.0%)onTurā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/8up from2/8,systems 7/8,arabic 7/8;97.4%capture of38/40Oracle ceiling!)MBPP+-378:311/378 (82.28%)(ALL-TIME RECORD —+27vs Base;92.3%capture of337/378Oracle ceiling!)HumanEval+-164:154/164 (93.90%)(v18.8 True-Diction) /150/164 (91.46%)(v19.2 single-shotQaṭʿ-xhigh@1, 0 tests!) /148/164 (90.24%)(v19.2NWP-v2)
Stage 19.2 Breakthroughs (Qaṭʿ al-Waswasa + NWP-v2)
- Two-Phase Qaṭʿ al-Waswasa (Eliminating Blind
<think>Dithering Truncation —0Extra Training!):- Our Stage 19.1
Pass@8diagnostic proved that under blind Next-Token Prediction (xhigh,max_tokens=5120),76/237 (32.1%)of reasoning runs —70.0%onTurāthCode-40(28/40) and39.4%onBigCodeBench-Hard-33(13/33) — burned their entire token budget dithering inside<think>and emitted zero code. Even at10,240tokens on our 3-app one-shot HTML5 showcase, stockQwen/Qwen3.8-27BBlindxhighburned10,240/10,240tokens inside<think>with0bytes of HTML on all3/3apps. - 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>viavLLMprefix caching. - Measured single-shot impact (
0tests,0retries):TurāthCode-40:9/40 (22.5%)blindxhigh→29/40 (72.5%, +50.0 pp!)HumanEval+-164:106/164 (64.6%)blindxhigh→150/164 (91.5%, +26.8 pp!)MBPP+-378:284/378 (75.1%)Fast →306/378 (81.0%, +22 tasks!)- Total
615tasks:495/615 (80.49%)in a single pass!
- Our Stage 19.1
- Post-
</think>Extraction Fix (eval_code_sandbox.py):Qwen3.8's chat template places<think>\ninside the prompt, so completions contain</think>without an opening<think>. Strictly splittingraw.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-swappedJudge(B, A)on top behavioral clusters disagreeing on concrete al-Farq probes, accepting flips only on unanimous symmetric agreement (18/19 = 94.7%unanimity onHumanEval+,78/97 = 80.4%onMBPP+,20/39onTurāthCode-40), pushingTurāthCode-40to37/40 (92.5%)andMBPP+to311/378 (82.3%).
- Runs
- Honest Finding on
BigCodeBench-Hard-33:- Qaṭʿ al-Waswasa pushed
BCB-HardOracle@8to16–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 realpytestsuites (TurāthAgent-Hard-12) do not suffer from that ambiguity (12/12 = 100.0%).
- Qaṭʿ al-Waswasa pushed
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 (18safetensors shards, top-16 executive layers48..63adapted in 100% Native BF16). - Classical Algorithm Atlas Dataset:
enver/KhalilAlgoWorks(16classical Arabic grammar & uṣūl books distilled into84machine-verified121/121AI/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, fixedeval_code_sandbox.py, and all verified Stage 18.7–19.2 JSON benchmark logs.
- Downloads last month
- 1,820
Model tree for enver/rootformer-code-v19.2-qwen38-nwp
Base model
Qwen/Qwen3.8-27B