Run this model with HF Jobs
Run enver/rootformer-code-v25-khalilswe-27b 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-v25-khalilswe-27b. 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-v25-khalilswe-27b 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-v25-khalilswe-27b. 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-v25-khalilswe-27b. 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-v25-khalilswe-27b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use enver/rootformer-code-v25-khalilswe-27b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="enver/rootformer-code-v25-khalilswe-27b") 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-v25-khalilswe-27b") model = AutoModelForMultimodalLM.from_pretrained("enver/rootformer-code-v25-khalilswe-27b", 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-v25-khalilswe-27b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "enver/rootformer-code-v25-khalilswe-27b" # 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-v25-khalilswe-27b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/enver/rootformer-code-v25-khalilswe-27b
- SGLang
How to use enver/rootformer-code-v25-khalilswe-27b 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-v25-khalilswe-27b" \ --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-v25-khalilswe-27b", "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-v25-khalilswe-27b" \ --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-v25-khalilswe-27b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use enver/rootformer-code-v25-khalilswe-27b with Docker Model Runner:
docker model run hf.co/enver/rootformer-code-v25-khalilswe-27b
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("enver/rootformer-code-v25-khalilswe-27b")
model = AutoModelForMultimodalLM.from_pretrained("enver/rootformer-code-v25-khalilswe-27b", 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]:]))
Rootformer-Code v25 (Stage 25.2) & KhalilSWE v3.6 (27B BF16)
Rootformer-Code v25 is an open-weights, lossless Native-BF16 software engineering & bilingual coding model (Qwen/Qwen3.8-27B backbone with top-layer L48..63 rank=32 real-repo purified RFT + SK-01 Diff-DPO + clean single-file replay anchors) paired with our model-agnostic Classical-Grammarian engineering stack:
- Live Interactive Browser Demos (HTML5 Physics, Glassmorphism UI, SVGs & Code Side-by-Side vs.
Qwen4-35B-A3B):enver/rootformer-code-v25-showcase KhalilSWE v3.6(khalil_swe/): Real-repository autonomous bug-fixing agent inspired by 16 classical Arabic linguistic & jurisprudential texts (al-Jawharī, al-Azharī, al-Mubarrad, Ibn Jinnī, al-Zajjājī, al-Ghazālī, al-Shāṭibī) — featuringMB-03superclass/import root recovery,FM-05prose-stem localization,AZ-01pinned witnessed code spans & pre-finish audit, and a strict Test-Suite Immutability Guard.Shāṭibī v2Calibrated Gate (calibration/shatibi_v2_calibrated_gate.json): 5-fold stratified OOF logistic uncertainty gate overvLLMlogprobs=5token margins + AST/execution checks (ECE = 0.0413,AUROC = 0.8364) withGH-06domain routing.NWP-v4.6 CodeT + AZ-03Live Signatures: Runtimeinspect.signatureinjection +AK-02De Morgan prohibition probes for multi-library scientific Python.
1. Headline Benchmarks (Strict Zero-Leakage, Paired McNemar Tests)
A. Real GitHub Repositories — SWE-bench Verified 100 (24 Dev + 76 Unseen Held-Out)
Evaluated zero-Docker against official hidden FAIL_TO_PASS + PASS_TO_PASS test patches (66 Django + 34 SymPy; 0/60 overlap with Stage 25.2's real-repo training pool):
| System Configuration | All 100 (SWE-100) |
Unseen Held-Out (76) |
Dev (24) |
Django (66) |
SymPy (34) |
Exact McNemar (N=100) |
|---|---|---|---|---|---|---|
Qwen3.8-27B + Standard ReAct (K=1) |
10 / 100 (10.0%) |
7 / 76 (9.2%) |
3 / 24 (12.5%) |
4 / 66 (6.1%) |
6 / 34 (17.6%) |
Baseline |
Stage 25.2 Weights + KhalilSWE v3.6 (K=1, 1.5× faster) |
49 / 100 (49.0%) |
35 / 76 (46.1%) |
14 / 24 (58.3%) |
31 / 66 (47.0%) |
18 / 34 (52.9%) |
+39 vs ReAct ($p < 10^{-10}$) |
Qwen3.8-27B + KhalilSWE v3.6 (K=1 Single-Shot) |
60 / 100 (60.0%) |
47 / 76 (61.8%) |
13 / 24 (54.2%) |
38 / 66 (57.6%) |
22 / 34 (64.7%) |
+50 vs ReAct ($p < 10^{-12}$) |
GH-03 Istiṣḥāb Stack (Base -> Stage 25.2 on 0-patch only) |
62 / 100 (62.0%) |
48 / 76 (63.2%) |
14 / 24 (58.3%) |
39 / 66 (59.1%) |
23 / 34 (67.6%) |
+52 vs ReAct (+2W/0L vs Base) |
Honest Ablation Note: Moving from Stage 24's synthetic toy-repo weights (
38.2%) to Stage 25.2's60disjoint real-repo trajectories jumped+10.8pts (49.0%), beat Base onDev-24(14/24vs13/24,82.35%patch precision), ran1.5×faster, and solved5unique bugs Base missed (Oracle@2 = 65/100), while submitting fewer patches on 14–16 turn unseen issues standalone (73vs84). UsingGH-03Istiṣḥāb zero-leakage fallback (invokingStage 25.2only on the16%of issues where Base outputs an empty patch) achieves62.0%overall (63.2%on unseen held-out) with zero regressions.
B. Single-File, Classical Arabic (Turāth-40) & Multi-Library (Held-Out BCB-Hard 45)
| Checkpoint | Dev-615 Pure Fast |
Dev-615 Shāṭibī v2 OOF |
Calibration (ECE / AUROC) |
Classical Arabic Turath-40 (Fast) |
Unseen BCB-Hard 45 (CodeT v4.6) |
|---|---|---|---|---|---|
Qwen/Qwen3.8-27B Base |
460 / 615 (74.80%) |
498 / 615 (80.98%) |
0.0461 / 0.8092 |
27 / 40 (67.5%) |
16 / 45 (35.56%, 84.2% Oracle@6) |
Rootformer Stage 25.2 (This Repo) |
469 / 615 (76.26%, +9) |
502 / 615 (81.63%) |
0.0413 / 0.8364 |
30 / 40 (75.0%, +7.5%) |
17 / 45 (37.78%, 89.5% Oracle@6) |
2. Live Head-to-Head Shootout vs. Qwen4-35B-A3B (Same Hardware, Same Tasks!)
We ran a live head-to-head shootout on an NVIDIA A100-SXM4-80GB comparing Our Stack (Rootformer Stage 25.2 + KhalilSWE v3.6) directly against Alibaba's Qwen4-35B-A3B (qwen4:35b-a3b).
A. Unseen Held-Out SWE-bench Verified 6-Issue Slice (3 Django + 3 SymPy, 16-Turn Budget)
Task (khalil_split = heldout10) |
Qwen3.8-27B + ReAct |
Our Stack (KhalilSWE v3.6) |
Qwen4-35B-A3B + ReAct |
Bonus: Qwen4-35B-A3B + Our KhalilSWE v3.6 |
|---|---|---|---|---|
django__django-14725 |
FAIL | FAIL | FAIL | FAIL |
django__django-14771 |
FAIL | PASS | PASS | PASS |
django__django-14787 |
FAIL | PASS | PASS | PASS |
sympy__sympy-22456 |
FAIL | PASS | FAIL | PASS |
sympy__sympy-22914 |
FAIL | PASS | PASS | PASS |
sympy__sympy-23262 |
FAIL | FAIL | FAIL | PASS |
| Total Resolved | 0 / 6 (0.0%) | 4 / 6 (66.7%) | 3 / 6 (50.0%) | 5 / 6 (83.3%) |
(On official DeepSWE v1.1's 538–867 line greenfield feature-request repos cattrs, vulture, bandit, mobly, both our stack and Qwen4-35B-A3B scored 0/4 under a strict 16-turn budget — confirming DeepSWE v1.1 requires its 50–100 turn long-horizon budget rather than a 16-turn bug-fix cap. Notably, plugging Qwen4-35B-A3B into our KhalilSWE v3.6 lifted DeepSWE patch generation from 0/4 under ReAct to 3/4 and unlocked 5/79 passing F2P tests on mobly.)
B. Viral Internet Visual & Engineering Prompts (Side-by-Side Chrome Renders)
| Prompt | Ours (Rootformer Stage 25.2 Qaṭʿ) |
Qwen4-35B-A3B |
|---|---|---|
Classical Arabic Turāth DAG (10 hidden asserts) |
PASS (10/10) — clean 2.1 KB, zero stdout spam |
PASS (10/10) (3.5 KB) |
Unseen Multi-Lib BigCodeBench-Hard (5 unittests) |
PASS (5/5) — crisp 1.0 KB (3× leaner) |
PASS (5/5) (3.1 KB) |
| Spinning Neon Hexagon + 18 Gravity Balls (HTML5 Canvas) | 33.0 FPS, crisp HUD, clean bounce trails (39.5s) |
21.5 FPS, overlapping HUD label & smeared outline (35.6s) |
Glassmorphism Agent Telemetry Card (Equal 10,240-tok cap) |
100% Complete (Forge-7, 7,088 tok) — 4 sparkline KPIs, dual-series bar+line chart, PR pills |
100% Complete (Aurora-7, 7,800 eval tok) — full chart + PR feed |
Animated Moving Pelican on a Bicycle (Equal 10,240-tok cap) |
40 FPS live animation (6,567 tok) — pedaling legs, sunset boardwalk, Speed/Pause HUD (2.1× leaner) |
46 FPS live animation (13,805 eval tok) — larger beak pouch, Speed/Pause HUD |
Live Rendered Side-by-Side Comparisons (demos/)
3. Repository Contents & Quickstart
- Root directory: Full lossless merged BF16
Stage 25.2weights (18.safetensorsshards + tokenizer &chat_template.jinja) ready for direct serving withvLLM,SGLang, orTransformers. khalil_swe/: CompleteKhalilSWE v3.6real-repo agent package (khalil_swe_agent.py,jawhari_ast_index.py,spec_compiler.py,mubarrad_context.py,zajjaji_debugger.py,azhari_witness.py).calibration/shatibi_v2_calibrated_gate.json: Trained 5-fold OOF logistic uncertainty gate (ECE = 0.0413,AUROC = 0.8364).checkpoints/stage25_2_real_repo_60_l48_63_lora_27b.pt: Standalone83 MBL48..63rank=32LoRA adapter + training telemetry.benchmarks/: Raw per-task JSON bitvectors & paired McNemar summaries (SWE-100,Dev-615,BCB-Hard 45,DeepSWE v1.1,SWE-HO6).demos/: High-DPI side-by-side PNG screenshots plus runnable standalone.htmland.svgfiles from the shootout.
Quickstart (vLLM + KhalilSWE v3.6)
# 1. Serve with vLLM (FP8 online quantization fits on a single 48GB L40S / RTX 6000 Ada / 80GB+ GPU)
vllm serve enver/rootformer-code-v25-khalilswe-27b --trust-remote-code --dtype bfloat16 --quantization fp8 --max-model-len 16384
# 2. Run KhalilSWE v3.6 autonomously on any local GitHub repository & issue description
PYTHONPATH=. python3 khalil_swe/khalil_swe_agent.py --repo /path/to/your/repo --issue /path/to/issue.md --base-url http://127.0.0.1:8000 --model enver/rootformer-code-v25-khalilswe-27b --mode khalil_swe --reasoning-mode qata
- Downloads last month
- -
Model tree for enver/rootformer-code-v25-khalilswe-27b
Base model
Qwen/Qwen3.8-27B


# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="enver/rootformer-code-v25-khalilswe-27b") 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)