Downloads · 30 days
305
54% of all-time downloads
enver/aynengine-v3-arabic-standalone
aynengine-v3-arabic-standalone is a text generation model from enver. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
AynEngine-V3-Arabic-Standalone is a specialized sovereign language model trained on 72 Classical Arabic Masterworks (83 MB, 9.17 Million Words, ~15.4 Million Tokens) and equipped with an independent 9,057-dimensional…
Downloads · 30 days
305
54% of all-time downloads
All-time downloads
566
Public
Parameters
605M
1.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.2 GB · 96%
From the Hugging Face model README
AynEngine-V3-Arabic-Standalone is a specialized sovereign language model trained on 72 Classical Arabic Masterworks (83 MB, 9.17 Million Words, ~15.4 Million Tokens) and equipped with an independent 9,057-dimensional Epistemic Next-Root Invariant Head (RootPredictionHead).
Merging Ghazalian demonstrative logic (Mantiq al-Burhan) and Razian philosophical dialectics (Al-Matalib al-'Aliyah) with the foundational grammatical and lexical treatises of Arabic (Kitab Sibawayh, Kitab al-'Ayn, Lisan al-Arab), AynEngine V3 operates as a dual-stream cognitive engine:
AynEngine V3 was fine-tuned across 82.98 MB of authentic classical manuscripts curated from local scholarly archives:
Unlike standard Transformers that operate purely on statistical subwords, AynEngine V3 incorporates a dedicated Hierarchical Root Projection:
Input Prompt / Context
│
▼
[ Transformer Hidden Representation h_t (Dim: 1024) ]
│
├───► [ Epistemic Root Head (1024 -> 9057) ] ───► P(Root Invariant) in 176 ms
│ [Top-3 Invariant Milestones]
│
└───► [ Surface LM Head (1024 -> 160807) ] ───► P(Surface Tokens) at ~11.5 TPS
[Grammatical Prose & Code]
v3_root_head.pt)During benchmarks, the root prediction head demonstrated spontaneous semantic mapping to modern technical concepts:
ذات (essence / self-identity) with 25.51% confidence.صفا (purification / filtering) with 52.32% confidence.صفا (clear distinction) with 55.19% confidence.صفا (order) and رسم (indexing/tracing).In alignment with classical Islamic epistemology:
"من قال لا أدري فقد أفتى" ("Whoever says 'I do not know' has demonstrated true knowledge.")
AynEngine V3 incorporates an explicit anti-hallucination constraint. When queried about citations or factual records outside its verified weights, it is calibrated to output:
"I do not know. I lack verified records for this."
rather than confabulating synthetic book titles or attributions.
Tested on dual-socket Intel Xeon Gold 6226R CPU (64 cores, AVX-512):
| Metric | Measured Value | Note |
|---|---|---|
| Model Size | 1.2 GB (model.safetensors) | Standalone merged, no adapter required |
| Vocabulary Size | 160,807 tokens | 151,750 base + 9,057 <root_XXX> tokens |
| Next-Root Head Size | 36 MB (v3_root_head.pt) | 1024 -> 9057 float32 weights |
| Root Prediction Latency | 176 ms | Single forward pass on CPU |
| 5-Root Invariant Trajectory | 865 ms | Conceptual reasoning sequence |
| CPU Generation Throughput | 11.41 tokens/sec (16 Threads) | Host utilization < 25% |
| Peak CPU Throughput | 11.60 tokens/sec (24 Threads) | Host utilization ~ 37% |
| Python AST Integrity | 100% Valid Syntax | Zero catastrophic forgetting on code |
pip install transformers torch
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "enver/aynengine-v3-arabic-standalone"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32)
prompt = (
"<|im_start|>system\n"
"أنت 'عين إنجن' (AynEngine v3)، النموذج السيادي المستند إلى المنطق البرهاني وجذور اللسان العربي الأصيل. "
"قدّم أجوبة محررة دقيقة باللغة العربية الفصحى الرصينة.<|im_end|>\n"
"<|im_start|>user\n"
"ما هو تعريف العلم عند الإمام أبي حامد الغزالي؟<|im_end|>\n"
"<|im_start|>assistant\n"
)
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=250,
temperature=0.2,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
import torch
import torch.nn as nn
import torch.nn.functional as F
from transformers import AutoModelForCausalLM, AutoTokenizer
# 1. Load base model & tokenizer
model = AutoModelForCausalLM.from_pretrained("enver/aynengine-v3-arabic-standalone", torch_dtype=torch.float32)
tokenizer = AutoTokenizer.from_pretrained("enver/aynengine-v3-arabic-standalone")
# 2. Load 1024 -> 9057 Root Head
root_head = nn.Linear(1024, 9057, bias=False)
root_head.load_state_dict(torch.load("v3_root_head.pt", map_location="cpu"))
root_head.eval()
# 3. Predict Next-Root Invariant
inputs = tokenizer("البرهان في النظر العقلي", return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs, output_hidden_states=True)
last_hidden = outputs.hidden_states[-1][:, -1, :]
root_logits = root_head(last_hidden)
top_root_probs, top_root_indices = torch.topk(F.softmax(root_logits[0], dim=-1), k=3)
print("Top Predicted Root Indices:", top_root_indices.tolist())
print("Top Root Probabilities:", top_root_probs.tolist())
@misc{aynengine_v3_2026,
author = {AynEngine Sovereign Research Team},
title = {AynEngine V3: Pure Classical Arabic Sovereign LLM and Next-Root Epistemic Architecture},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/enver/aynengine-v3-arabic-standalone}}
}
This model, its architecture (including BPE-Free Farāhīdian/Sībawayhian tokenization, RootAttention, and Ishtiqāq-Attention), and its weights are released under the AynEngine & University of Prishtina Sovereign Academic License.
LICENSE in this repository.