Text Generation
PEFT
Safetensors
Transformers
Arabic
French
moroccan-darija
darija
arabizi
silma
sovereign
ary
lora
conversational
zero-hallucination
compound-ai
Instructions to use vext-ma/silma-darija-9b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use vext-ma/silma-darija-9b-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("silma-ai/SILMA-9B-Instruct-v1.0") model = PeftModel.from_pretrained(base_model, "vext-ma/silma-darija-9b-lora") - Transformers
How to use vext-ma/silma-darija-9b-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vext-ma/silma-darija-9b-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("vext-ma/silma-darija-9b-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vext-ma/silma-darija-9b-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vext-ma/silma-darija-9b-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vext-ma/silma-darija-9b-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/vext-ma/silma-darija-9b-lora
- SGLang
How to use vext-ma/silma-darija-9b-lora 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 "vext-ma/silma-darija-9b-lora" \ --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": "vext-ma/silma-darija-9b-lora", "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 "vext-ma/silma-darija-9b-lora" \ --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": "vext-ma/silma-darija-9b-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use vext-ma/silma-darija-9b-lora with Docker Model Runner:
docker model run hf.co/vext-ma/silma-darija-9b-lora
π²π¦ DerejLLM Sovereign 9B β Moroccan Darija LoRA (SILMA Base)
DerejLLM 9B is a Sovereign AI adapter for Moroccan Darija built on SILMA-9B-Instruct-v1.0, fine-tuned with QLoRA v3 Master on curated Moroccan civic, legal, monetary, and cultural data.
This adapter is best used as part of the
derej.Client()Compound AI system β which combines this neural backbone with deterministic Moroccan engines for zero-hallucination performance.
π Benchmark Results
Zero-Hallucination Red-Team Audit (29 adversarial scenarios)
| Metric | Score |
|---|---|
| Hallucination Rate | 0.0% |
| Pass Rate | 100.0% (29/29) |
| Fake law gating | β 4/4 |
| Mythical entity gating | β 2/2 |
| Fictitious institution gating | β 2/2 |
| Toxic safety gating | β 2/2 |
| Moroccan monetary math | β 5/5 |
| Civic/legal truth | β 7/7 |
| OOD epistemic humility | β 1/1 |
Out-of-Distribution Benchmark (6 unseen Moroccan scenarios)
| System | Score |
|---|---|
| Raw Neural Model (2B) | 0/6 (0.0%) |
| DerejLLM Compound System | 6/6 (100.0%) |
Darija HellaSwag-25
| Metric | Score |
|---|---|
| HellaSwag Accuracy | 100.0% (25/25) |
SFT Training β Bench-200
| Metric | Score |
|---|---|
| Bench-200 Accuracy | 75.0% |
| vs Qwen-2B baseline | +35 points |
π§ Quick Start
from derej import Client
client = Client()
response = client.chat("ΩΨ§Ψ΄ ΨΉΩΨ―Ω Ψ§ΩΨΩ ΩΨ¬Ψ―Ψ― Ψ§ΩΨ¨ΩΨ±Ω
Ω Ψ―ΩΨ§ΩΩ Ω
Ω Ψ¨ΩΩ Ψ§ΩΨ¨Ψ±ΩΨ―Ψ")
print(response)
Raw adapter (without Compound AI system)
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("silma-ai/SILMA-9B-Instruct-v1.0")
tokenizer = AutoTokenizer.from_pretrained("silma-ai/SILMA-9B-Instruct-v1.0")
model = PeftModel.from_pretrained(base, "vext-ma/silma-darija-9b-lora")
model = model.merge_and_unload()
ποΈ Architecture β Compound AI System
derej.Client.chat(prompt)
β
βββ Step 0: Sovereign Epistemic Shield
β βββ Fake law detection (19 verified laws only)
β βββ Mythical entity gating
β βββ Fictitious institution gating
β βββ Hazardous practice interception
β
βββ Step 1: Tool Routing (ONCF, BAM, CNSS)
βββ Step 2: Moroccan Monetary Engine (MAD/Ryal/Centimes)
βββ Step 3: Domain Handlers (civic, legal, tech, culinary, automotive)
βββ Step 4: Graph-RAG + ColBERT Fallback
βββ Knowledge Graph (18 legal entities, multi-hop BFS)
βββ Speculative Semantic Cache (cosine threshold 0.85)
π Training Details β Sovereign v3 Master
| Parameter | Value |
|---|---|
| Base model | silma-ai/SILMA-9B-Instruct-v1.0 |
| Method | QLoRA (4-bit NF4) |
| LoRA rank | 32 |
| LoRA alpha | 64 |
| Training data | Moroccan Darija Sovereign v3 Master + v4 Frontier |
| Dataset size | ~45,000+ curated examples |
| Training steps | ~2,900 |
| Training platform | Kaggle GPU (T4 x2) |
π Privacy
- No personal audio, voices, or biometric data in this repository
- No private training optimizer states (checkpoint optimizer.pt / rng_state removed)
- Community users bring their own voices for zero-shot TTS cloning
- Only model weights (
adapter_model.safetensors) and tokenizer config are published
π Citation
@misc{vext2026silma,
title={DerejLLM: A Sovereign Compound AI System for Moroccan Darija},
author={Vext Research Team},
year={2026},
publisher={HuggingFace},
url={https://huggingface.co/vext-ma/silma-darija-9b-lora}
}
- Downloads last month
- 4
Model tree for vext-ma/silma-darija-9b-lora
Base model
silma-ai/SILMA-9B-Instruct-v1.0Dataset used to train vext-ma/silma-darija-9b-lora
Updated β’ 91