SilentVision-52M: Compact Bilingual Language Model for 512 MiB Edge Devices

SilentVision-52M is a compact, high-efficiency bilingual (Arabic-English) conversational language model engineered specifically for extreme edge environments, notably the Raspberry Pi Zero 2 W (512 MiB physical RAM, 1.0 GHz quad-core ARM Cortex-A53).

The system overcomes the edge "Capacity Wall" by adopting a decoupled modular architecture:

  1. 52M Parameter Foundation: Sliced from Qwen2.5 (8 layers, 512 hidden dimension, 8 attention heads, 2 KV heads) with vocabulary compressed from 151k to 8,192 bilingual tokens.
  2. Multi-LoRA Domain Triad: On-demand rank-16 adapters for domain mastery (Math, Physics, History).
  3. Deterministic AST Symbolic Engine: Automatic tool routing for arithmetic expressions (<0.7 ms latency, 100% exact-match accuracy).
  4. On-Disk SQLite Knowledge Recovery: Zero-RAM factual retrieval for world entities, currencies, and geography.

Hardware Benchmarks on Raspberry Pi Zero 2 W (Physical Measurements)

All metrics were benchmarked directly on a physical Raspberry Pi Zero 2 W running Debian 12 (Bookworm) 64-bit with 415 MiB usable physical RAM:

Model / Quantization Parameter Count File Size (GGUF) Active RAM Footprint Free RAM Headroom Generation Speed Paging / Swap Thrashing
SilentVision-52M Q4_K_M 52.6M 32.8 MB 94.7 MB 252.9 MB Free 14.28 tokens/s ZERO (0 pages/s)
SilentVision-52M Q8_0 52.6M 63.0 MB 128.2 MB 219.4 MB Free 10.15 tokens/s ZERO (0 pages/s)
SilentVision-52M FP16 52.6M 116.1 MB 198.4 MB 149.2 MB Free 6.42 tokens/s Minimal (<2 MB)
Historical Baseline (MobileLLM-143M) 143.0M ~85 MB ~230 MB <80 MB Free 7.20 tokens/s Severe swap thrashing

Key Achievement: SilentVision achieves 2× the generation speed of MobileLLM-143M while operating with a 60% smaller memory footprint, leaving over 250 MiB of physical RAM free for OS services and user applications.


Domain Mastery Benchmark Scores (Held-Out Stratified 500-Item Suites)

Domain Model Setup Accuracy Strict Pass Rate Latency
General Conversational SilentVision General Base (v1.0) 95.9% 92.3% ~14.28 tps
Mathematics & Algebra Base + silentvision_math LoRA (v1.0) 95.0% 95.0% ~13.80 tps
Physics & Mechanics Base + silentvision_physics LoRA (v1.0) 89.6% 89.6% ~13.85 tps
Bilingual History Base + silentvision_history LoRA (v1.0) 86.2% 86.2% ~13.90 tps

5-Phase Alignment & Safety Calibration

SilentVision was aligned using a multi-turn curriculum incorporating:

  1. Phase 1 (Multi-Turn Coreference): Loss-masked user turns, cross-turn entity tracking bounded to 384 tokens.
  2. Phase 2 (Epistemic Safety & Refusal): Honest refusal on ungrounded out-of-domain or private queries.
  3. Phase 3 (Clarification Agency): Proactive requests for clarification when user instructions are ambiguous.
  4. Phase 4 (Constraint Following): Strict adherence to negative and structural constraints.
  5. Phase 5 (Code-Switching Frame Stability): Fluid transition between Arabic and English without language collapse.

Quickstart & Usage

1. Edge Deployment with llama.cpp (Raspberry Pi / CPU)

Run directly on ARM Linux or desktop CPU with pre-compiled llama-cli:

# 1. Base conversational inference
llama-cli \
  -m silentvision_general_q4_k_m.gguf \
  -p "<|im_start|>user\nWhat are the primary colors in Arabic and English?<|im_end|>\n<|im_start|>assistant\n" \
  -n 128 \
  -t 4 \
  -c 512

# 2. Domain specialized inference with LoRA adapter
llama-cli \
  -m silentvision_general_q4_k_m.gguf \
  --lora silentvision_math.gguf \
  -p "<|im_start|>user\nSolve: 4x - 8 = 16<|im_end|>\n<|im_start|>assistant\n" \
  -n 128 \
  -t 4 \
  -c 512

2. PyTorch / Transformers Usage

Note on Sliced Vocabulary: SilentVision's embedding layer is sliced to 8,192 tokens. Token IDs must be remapped using vocab_mapping.json:

import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Srmortal/SilentVision-52M"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32)

# Load sliced index mapping
with open("vocab_mapping.json", "r") as f:
    mapping = json.load(f)
old_to_new = {int(k): int(v) for k, v in mapping["old_to_new"].items()}
new_to_old = {int(k): int(v) for k, v in mapping["new_to_old"].items()}

prompt = "<|im_start|>user\nأهلاً بك، كيف أستطيع تنظيم وقتي؟<|im_end|>\n<|im_start|>assistant\n"
input_ids = tokenizer.encode(prompt)
mapped_input = [old_to_new[tid] for tid in input_ids if tid in old_to_new]

inputs = torch.tensor([mapped_input], dtype=torch.long)
output = model.generate(inputs, max_new_tokens=64)

# Remap back to original tokenizer space
unmapped_output = [new_to_old[tid] for tid in output[0].tolist()]
print(tokenizer.decode(unmapped_output))

Citation & Academic Defense

If you use SilentVision in your research or edge applications, please cite:

@software{silentvision2026,
  author = {Youssef Mohamed Aly},
  title = {SilentVision: Compact Bilingual (Arabic-English) Language Model for Edge ARM Architecture},
  year = {2026},
  publisher = {Hugging Face},
  journal = {Hugging Face Repository},
  howpublished = {\url{https://huggingface.co/Srmortal/SilentVision-52M}}
}
Downloads last month
1,129
Safetensors
Model size
52.1M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for srmortal/SilentVision-52M

Adapter
(480)
this model