Instructions to use enver/rootformers_stage_v15.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use enver/rootformers_stage_v15.2 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="enver/rootformers_stage_v15.2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("enver/rootformers_stage_v15.2") model = AutoModelForCausalLM.from_pretrained("enver/rootformers_stage_v15.2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Rootformer Stage 15.2 (rootformers_stage_v15.2) โ Bฤb al-Naแบm wa-แธคidhฤสพ al-Alfฤแบ (ุจุงุจ ุงููุธู
ูุญุฐุงุก ุงูุฃููุงุธ)
Rootformer Stage 15.2 is a self-contained, BPE-Free Arabic-to-English scholarly translation and morphological-syntactic intelligence engine grounded in the non-concatenative morphological theory of al-Khalฤซl ibn Aแธฅmad al-Farฤhฤซdฤซ, the 16-state syntactic governance (สฟAmal) of Sฤซbawayh, and สฟAbd al-Qฤhir al-Jurjฤnฤซ's theory of al-Naแบm (Dalฤสพil al-Iสฟjฤz).
This repository is a 100% turnkey standalone deployment package: clone or download it onto any Linux GPU or CPU server and run two commands (./install.sh && ./run_standalone_server.sh) to launch the full Widescreen Desktop & Mobile Sovereign Workbench UI, REST JSON API, CLI, and Python SDK.
What Can Rootformer Stage 15.2 Do?
1. Asymmetric 64-Layer Maสฟnฤ Prefill + Fast Hub-Guided Lafแบ BPE Decode (Stage 15.2)
In al-Jurjฤnฤซ's Dalฤสพil al-Iสฟjฤz, deep relational deduction (ุชุฑุชูุจ ุงูู ุนุงูู ูู ุงูููุณ โ Tartฤซb al-Maสฟฤnฤซ fฤซ al-Nafs) occurs when comprehending the Arabic clause and its syntactic dependencies (Taสฟalluq), whereas uttering the target words (ุญุฐุงุก ุงูุฃููุงุธ โ แธคidhฤสพ al-Alfฤแบ) follows the already-constructed semantic blueprint:
- During Arabic Prefill (
seq_len > 16): Executes all 64 layers (100%ofQwen3.8-27B) together with the 12-Slot Stage 13.2 Books Mastery Bridge (scale = 0.65) + 6-Pillar GSCA MoE + Sabk Anaphora so the KV/recurrent cache holds the exact 64-layer semantic state $Z_{\text{maสฟnฤ}}$. - During English BPE Decode & Speculative Verification (
seq_len <= 16): Elides $K \in {4, 8, 12}$ upper linear-attention blocks and replaces each with a lightweight 64-rankHidhaAlAlfazResidualAdapter(120 MBtotal across 24 layers) conditioned on a cached Semantic Hub Summary ($z_8, z_{12}$) from Layers31and47. - Intact English BPE Vocabulary (
SibawayhSlicedLMHead): Preserves100%of the active English & Arabic tokens (148,891tokens,0.000000logit divergence) while pruning99,429unused CJK tokens (-1.95 GBVRAM saved). - 100% Pure Original Arabic Script (
ุงูุญุฑูู ุงูุฃุตููุฉ ุงูุนุฑุจูุฉ): Technical parenthetical anchors are always emitted in original Arabic script ((ุงูุตุงูุน),(ุญุงุฏุซ),(ุชุฑุฌูุญ ุจูุง ู ุฑุฌุญ),(ุชู ููุฏ),(ุถุฑูุฑุฉ),(ููุงุณ)), never Latin transliterations. - Bundled Native Triton
causal_conv1dKernel: Includes a zero-compile Tritoncausal_conv1d.pydrop-in module soQwen3.8-27B'sGatedDeltaNetlayers run at full hardware speed without C++ wheel compilation errors or slow fallback warnings.
2. Measured Benchmark Performance (Qwen3.8-27B 4-Bit NF4 on NVIDIA A40)
| Decode Mode | Active Decode Depth | Mean Speed (tok/s) |
Peak Speed (tok/s) |
Word Throughput (words/s) |
Total Time (10 Gold Passages) | Wall-Clock Speedup | Classical Gold chrF++ |
Classical Gold BLEU |
Modern MSA-12 chrF++ |
|---|---|---|---|---|---|---|---|---|---|
Pure Autoregressive Baseline (K=0) |
64L / 64L |
11.03 tok/s |
11.24 tok/s |
8.59 words/s |
124.03s |
1.00x |
60.102 |
32.52 |
92.090 |
Stage 15.2 Ultra-Fidelity (--ultra-fidelity, K=4) |
64L Prefill / 60L Decode |
28.82 tok/s |
52.87 tok/s |
22.49 words/s |
50.02s |
2.48x |
60.599 |
33.67 |
92.090 |
Stage 15.2 Balanced Default (--27b, K=8) |
64L Prefill / 56L Decode |
30.36 tok/s |
38.61 tok/s |
23.53 words/s |
43.77s |
2.83x |
59.734 |
32.86 |
92.090 (81.85 BLEU) |
Stage 15.2 Turbo Mode (--turbo, K=12) |
64L Prefill / 52L Decode |
34.57 tok/s |
49.50 tok/s |
26.90 words/s |
37.32s |
3.32x |
58.822 |
33.39 |
92.090 |
3. Core Capabilities Across Classical & Modern Arabic
- BPE-Free Non-Concatenative Morphological Factorization ($\phi(w_t) = (r_t, w_t, p_t, s_t)$):
- Deterministically decomposes Arabic surface words into 10,899 trilateral/quadrilateral roots (Judhลซr), 160 morphological templates (Awzฤn), proclitics, and enclitics via the 329,695-entry Farฤhฤซdฤซ Lookup Table (
O(1)latency) plus algorithmic fallback.
- Deterministically decomposes Arabic surface words into 10,899 trilateral/quadrilateral roots (Judhลซr), 160 morphological templates (Awzฤn), proclitics, and enclitics via the 329,695-entry Farฤhฤซdฤซ Lookup Table (
- 100% แนขarfฤซ Active vs. Passive Participle Disambiguation (
25/25):- Distinguishes unvocalized homographs such as
ู ุญุฏุซ(muแธฅdith [Originator] vs. muแธฅdath [originated]),ู ุคุซุฑ(muสพaththir [Effective Cause] vs. muสพaththar [effected]), andู ุฑุฌุญ(murajjiแธฅ [Determiner] vs. murajjaแธฅ [preponderated]) via Sฤซbawayhian governance and theological constraints (100.0%accuracy).
- Distinguishes unvocalized homographs such as
- 16-State Sฤซbawayhian Syntactic Governance ($B_{\text{Sฤซbawayh}}$) & Passive Voice (al-Mabnฤซ lil-Majhลซl):
- Tracks Ibtidฤสพ, Khabar, Fฤสฟil, Mafสฟลซl bihi, Nฤสพib al-Fฤสฟil, Iแธฤfah, and สฟAแนญf transitions across clauses (
100.0%passive voice accuracy).
- Tracks Ibtidฤสพ, Khabar, Fฤสฟil, Mafสฟลซl bihi, Nฤสพib al-Fฤสฟil, Iแธฤfah, and สฟAแนญf transitions across clauses (
- 6-Pillar Classical Mastery & Zero Modern Polysemy Drift (
0.00%Trap Leakage):- Separates Classical Kalฤm, Uแนฃลซl al-Fiqh, Mฤlikฤซ Fiqh, Taแนฃawwuf (Sฤซdฤซ Aแธฅmad Zarrลซq), Manแนญiq, and Balฤghah from Modern Standard Arabic (
92.09 chrF++on MSA-12;0.00%modern drift on classical polysemous terms likeุงูุนุงูู,ุงูุฏูุฑ,ุงูุดุงุฑุน,ุงููุงุนู,ุงูุญุงู,ุงูุนูู,ุงููุฏุฑ,ุงูู ุญู).
- Separates Classical Kalฤm, Uแนฃลซl al-Fiqh, Mฤlikฤซ Fiqh, Taแนฃawwuf (Sฤซdฤซ Aแธฅmad Zarrลซq), Manแนญiq, and Balฤghah from Modern Standard Arabic (
- Cross-Boundary Pronominal Anaphora (Sabk โ
100%on8/8Multi-Clause Chains):- Tracks enclitic pronouns (
ูู,ููุง,ููู) back to their exact antecedents across long multi-sentence passages.
- Tracks enclitic pronouns (
Quickstart (2 Commands on Any GPU or CPU Server)
git clone https://huggingface.co/enver/rootformers_stage_v15.2
cd rootformers_stage_v15.2
chmod +x install.sh run_standalone_server.sh
./install.sh
./run_standalone_server.sh
Or download with huggingface_hub (automatically tracked by Hugging Face download metrics):
from huggingface_hub import snapshot_download
local_dir = snapshot_download(repo_id="enver/rootformers_stage_v15.2")
print("Downloaded standalone release to:", local_dir)
Then open http://localhost:17800 in your desktop or mobile browser.
Server Launch Modes (./run_standalone_server.sh)
| Command | Hardware / Backbone Loaded | RAM / VRAM | Description |
|---|---|---|---|
./run_standalone_server.sh |
Auto (27B 4-Bit K=8 Naแบm on GPU / 1.7B on CPU) |
~14.2 GB VRAM (27B) or ~4.5 GB RAM (CPU) |
Automatically loads Stage 15.2 Qwen3.8-27B 4-Bit NF4 + Asymmetric Naแบm (K=8, 30.36 tok/s, 2.83x speedup) on CUDA GPUs, or Qwen3-1.7B Sovereign (3.3 GB) + BPE-Free Bridge on CPU. |
./run_standalone_server.sh --ultra-fidelity |
Qwen3.8-27B 4-Bit NF4 (K=4 Naแบm, 64Lโ60L) |
~14.2 GB VRAM |
Highest Classical Gold fidelity (60.599 chrF++ / 33.67 BLEU) at 28.82 tok/s mean (52.87 tok/s peak, 2.48x speedup). |
./run_standalone_server.sh --27b |
Qwen3.8-27B 4-Bit NF4 (K=8 Naแบm, 64Lโ56L) |
~14.2 GB VRAM |
Balanced default: runs all 64 layers + 12-Slot Bridge on Arabic prefill and 56 layers + แธคidhฤสพ al-Alfฤแบ Residual Adapters on English BPE decode (30.36 tok/s, 23.53 words/sec, 59.734 chrF++, 92.09 chrF++ on MSA-12). |
./run_standalone_server.sh --turbo |
Qwen3.8-27B 4-Bit NF4 (K=12 Naแบm, 64Lโ52L) |
~14.2 GB VRAM |
Turbo mode: 34.57 tok/s mean (49.50 tok/s peak, 26.90 words/sec, 33.39 BLEU, 3.32x speedup). |
./run_standalone_server.sh --8gb |
Strict 8GB VRAM Mode (27B 4-Bit) |
< 7.2 GB Peak VRAM |
Runs the 27B model on 8 GB consumer GPUs (RTX 3070/4060) using Dual-Stream Pinned-Memory Asynchronous Layer Prefetch (Taqdฤซm al-สฟฤmil). |
./run_standalone_server.sh --1.7b |
Force Qwen3-1.7B Sovereign (GPU or CPU) |
~4.0 GB VRAM/RAM |
Loads the bundled 3.3 GB 1.7B safetensors + 12-Layer BPE-Free Foundation + Tri-Layer Bridge. |
./run_standalone_server.sh --cpu |
Force CPU Full Neural (1.7B) |
~4.5 GB System RAM |
Runs full neural translation + 6-tab workbench 100% on CPU (zero GPU required). |
./run_standalone_server.sh --fast-cpu |
Instant Light CPU (<5 ms) |
< 800 MB RAM |
Runs the 12-Layer BPE-Free Foundation Model + Khalฤซlian Root/Wazn Analyzer + Sฤซbawayh 16-State Syntax + แนขarfฤซ Disambiguator in milliseconds on any laptop CPU. |
Python SDK & REST API Usage
1. Python SDK (rootformer_sdk.py)
from rootformer_sdk import RootformerStage12
# Mode A: Instant BPE-Free Analysis + 12-Layer Foundation Encoding (CPU or GPU, <5 ms)
rf = RootformerStage12(device="cpu", load_foundation=True, load_qwen=False)
analysis = rf.analyze(
"ุงูุนุงูู
ุญุงุฏุซ ููู ุญุงุฏุซ ููุง ุจุฏ ูู ู
ู ู
ุญุฏุซ ูู
ุคุซุฑ ุชุงู
ุจุงูุฐุงุช ูุฑุฌุญ ูุฌูุฏู ุนูู ุนุฏู
ูุ ูุฃู ุงูุชุฑุฌูุญ ุจูุง ู
ุฑุฌุญ ู
ุญุงู ูู ุงูุนูู."
)
print("Rational Triad:", analysis["rational_triad"])
print("Sarfi Homographs:", analysis["sarfi_homographs"])
# Mode B: End-to-End Scholarly Translation
rf_translator = RootformerStage12(device="cuda", load_foundation=True, load_qwen=True)
result = rf_translator.translate(
"ูุฏุนู ุฃู ู
ุญุฏุซ ุงูุนุงูู
ูุงุฏุฑุ ูุฃู ุงูุนุงูู
ูุนู ู
ุญูู
ู
ุฑุชุจ ู
ุชูู ู
ูุธูู
ู
ุดุชู
ู ุนูู ุฃููุงุน ู
ู ุงูุนุฌุงุฆุจ ูุงูุขูุงุช"
)
print("English Translation:\n", result["translation"])
2. HTTP JSON API (POST /api/translate)
When ./run_standalone_server.sh is running on port 17800:
curl -s http://localhost:17800/api/translate \
-H "Content-Type: application/json" \
-d '{
"text": "ุงูุนุงูู
ุญุงุฏุซ ููู ุญุงุฏุซ ููุง ุจุฏ ูู ู
ู ู
ุญุฏุซ ูู
ุคุซุฑ ุชุงู
ุจุงูุฐุงุช ูุฑุฌุญ ูุฌูุฏู ุนูู ุนุฏู
ูุ ูุฃู ุงูุชุฑุฌูุญ ุจูุง ู
ุฑุฌุญ ู
ุญุงู ูู ุงูุนูู.",
"mode": "translate"
}' | jq .
Repository Contents & Checkpoints
rootformers_stage_v15.2/
โโโ config.json # Root Hugging Face model configuration (enables Hub download tracking)
โโโ generation_config.json # Root generation configuration
โโโ tokenizer_config.json # Root tokenizer configuration
โโโ tokenizer.json # Root tokenizer vocabulary & merges
โโโ chat_template.jinja # Root chat template
โโโ model.safetensors # Root Qwen3-1.7B Sovereign safetensors (3.3 GB)
โโโ install.sh # One-click dependency & checkpoint verifier (27B GPU & 1.7B CPU/GPU)
โโโ run_standalone_server.sh # One-click server launcher (--ultra-fidelity, --27b, --turbo, --8gb, --1.7b, --cpu, --fast-cpu)
โโโ server_stage15_2.py # Stage 15.2 unified 27B 4-bit GPU & 1.7B CPU/GPU HTTP server & UI host
โโโ causal_conv1d.py # Native Triton causal_conv1d kernel (zero C++ wheel compilation needed)
โโโ rootformer_sdk.py # Self-contained Python SDK, CLI & Fast-CPU server
โโโ requirements.txt # Minimal Python dependencies
โโโ README.md # Hugging Face Model Card & Quickstart Guide
โโโ aynengine_web_ui_11/ # Responsive 3-Column Desktop IDE & Mobile Web UI (6 Interactive Tabs)
โโโ checkpoints/ # All safetensors & bridge weights included
โ โโโ qwen3_8_27b_4bit/ # Qwen3.8-27B 4-Bit NF4 safetensors + tokenizer (21 GB, for GPU)
โ โโโ stage15_2/ # Stage 15.2 Asymmetric Naแบm 24-Layer Residual Adapters (120 MB)
โ โโโ stage14_5/ # Stage 14.5 Learned Neural BPE-Free-to-BPE Drafter (50 MB)
โ โโโ stage13_2/ # Stage 13.2 Books Mastery 12-Slot Bridge + GSCA MoE (142 MB)
โ โโโ stage7_3_mujtahid_sovereign/ # Qwen3-1.7B Sovereign safetensors + tokenizer (3.3 GB, for CPU/GPU)
โ โโโ stage12_bpe_free_foundation_best.pt # 12-Layer (101.55M) BPE-Free Foundation Model (388 MB)
โโโ data/ # 329K Farฤhฤซdฤซ NMFE LUT, 2,469 Lexicon, Qur'an & Consensus Graph
โโโ engine/ # Deterministic Khalฤซlian, Sฤซbawayhian, แนขarfฤซ & Sabk engines
โโโ scripts/ # Self-contained Stage 11โ15.2 architecture & evaluation modules
โโโ stage15_2/ # Stage 15.2 evaluation suites, training scripts & benchmark logs
- Downloads last month
- 9