Instructions to use srmortal/SilentVision-52M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use srmortal/SilentVision-52M with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf srmortal/SilentVision-52M:Q4_K_M # Run inference directly in the terminal: llama cli -hf srmortal/SilentVision-52M:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf srmortal/SilentVision-52M:Q4_K_M # Run inference directly in the terminal: llama cli -hf srmortal/SilentVision-52M:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf srmortal/SilentVision-52M:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf srmortal/SilentVision-52M:Q4_K_M
Use Docker
docker model run hf.co/srmortal/SilentVision-52M:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use srmortal/SilentVision-52M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "srmortal/SilentVision-52M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "srmortal/SilentVision-52M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/srmortal/SilentVision-52M:Q4_K_M
- Ollama
How to use srmortal/SilentVision-52M with Ollama:
ollama run hf.co/srmortal/SilentVision-52M:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use srmortal/SilentVision-52M with Docker Model Runner:
docker model run hf.co/srmortal/SilentVision-52M:Q4_K_M
- Lemonade
How to use srmortal/SilentVision-52M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull srmortal/SilentVision-52M:Q4_K_M
Run and chat with the model
lemonade run user.SilentVision-52M-Q4_K_M
List all available models
lemonade list
- Atomic Chat
- SilentVision-52M: Compact Bilingual Language Model for 512 MiB Edge Devices
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:
- 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.
- Multi-LoRA Domain Triad: On-demand rank-16 adapters for domain mastery (Math, Physics, History).
- Deterministic AST Symbolic Engine: Automatic tool routing for arithmetic expressions (<0.7 ms latency, 100% exact-match accuracy).
- 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:
- Phase 1 (Multi-Turn Coreference): Loss-masked user turns, cross-turn entity tracking bounded to 384 tokens.
- Phase 2 (Epistemic Safety & Refusal): Honest refusal on ungrounded out-of-domain or private queries.
- Phase 3 (Clarification Agency): Proactive requests for clarification when user instructions are ambiguous.
- Phase 4 (Constraint Following): Strict adherence to negative and structural constraints.
- 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
Model tree for srmortal/SilentVision-52M
Base model
Qwen/Qwen2.5-0.5B