Downloads ยท 30 days
352
30% of all-time downloads
asjadilahi/danAI-55M-Reasoning
danAI-55M-Reasoning is a text generation model from asjadilahi. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Downloads ยท 30 days
352
30% of all-time downloads
All-time downloads
1.2K
Public
Parameters
54.5M
1.2 GB on disk
Likes
11
Public
Click a slice to open those files.
.gguf646 MB ยท 55%
From the Hugging Face model README
An Ultra-Lightweight 54.5M Agentic & Reasoning Language Model for Edge Devices, Mobile Intelligence, and Microcontrollers
Created by Asjad Ilahi (@asjadilahi)
</div>danAI-55M-Reasoning is an ultra-compact 54.5 Million parameter Small Language Model (SLM) designed from the ground up to bring high-grade reasoning, instruction following, and autonomous agentic capabilities to low-power edge hardware, mobile processors, and IoT devices in an ultra-low 13 MB to 104 MB memory footprint.
Named after the Urdu word Dฤnฤ (ุฏุงูุง) meaning wise or intelligent, danAI proves that extreme efficiency and agentic intelligence can coexist without requiring multi-gigabyte models.
All official quantizations and weights are hosted directly in this repository:
| Bit Width | Format | Target File | File Size | Memory Footprint | Recommended Use Case / Target Hardware |
|---|---|---|---|---|---|
| 16-bit | PyTorch Safetensors | model.safetensors | 104 MB | 104 MB | Standard PyTorch / Hugging Face BF16 inference |
| 16-bit | PyTorch Safetensors | model.fp16.safetensors | 104 MB | 104 MB | Standard Half-Precision CUDA GPUs |
| 16-bit | Master FP32 | model.fp32.safetensors | 208 MB | 208 MB | Research, analysis & master precision benchmarking |
| 16-bit | GGUF F16 | danAI-55M-Reasoning-F16.gguf | 137 MB | 137 MB | llama.cpp / Ollama unquantized reference baseline |
| 16-bit | GGUF BF16 | danAI-55M-Reasoning-BF16.gguf | 137 MB | 137 MB | Apple Silicon Metal & modern CPU engines |
| 8-bit | GGUF Q8_0 | danAI-55M-Reasoning-Q8_0.gguf | 73.5 MB | ~74 MB | โญ Recommended for Ollama / llama.cpp (Near 0% quality loss) |
| 8-bit | PyTorch INT8 | danAI-55M-Reasoning-INT8.safetensors | 52.2 MB | ~52 MB | High-speed PyTorch 8-bit symmetric weight inference |
| 6-bit | GGUF Q6_K | danAI-55M-Reasoning-Q6_K.gguf | 57.1 MB | ~57 MB | High-precision K-quant balance |
| 5-bit | GGUF Q5_K_M | danAI-55M-Reasoning-Q5_K_M.gguf | 50.9 MB | ~51 MB | Compact balanced K-quant |
| 4-bit | GGUF Q4_K_M | danAI-55M-Reasoning-Q4_K_M.gguf | 45.0 MB | ~45 MB | โญ Optimal Edge Balance: Mobile chips, Raspberry Pi, Edge AI |
| 4-bit | GGUF Q4_0 | danAI-55M-Reasoning-Q4_0.gguf | 43.7 MB | ~44 MB | Universal 4-bit block quant for embedded platforms |
| 4-bit | PyTorch INT4 | danAI-55M-Reasoning-INT4.safetensors | 26.4 MB | ~26 MB | Ultra-compact 4-bit packed weights for PyTorch on-device |
| 3-bit | GGUF Q3_K_M | danAI-55M-Reasoning-Q3_K_M.gguf | 38.6 MB | ~39 MB | Sub-40MB K-quant compression |
| 2-bit | GGUF Q2_K | danAI-55M-Reasoning-Q2_K.gguf | 32.8 MB | ~33 MB | 2-bit K-quant for microcontrollers & extreme RAM limits |
| 2-bit | PyTorch INT2 | danAI-55M-Reasoning-INT2.safetensors | 13.4 MB | ~13 MB | Ultra-low 2-bit packed representation (4 weights/byte) |
# Download GGUF and Modelfile
huggingface-cli download asjadilahi/danAI-55M-Reasoning danAI-55M-Reasoning-Q8_0.gguf Modelfile --local-dir .
# Create and run with Ollama
ollama create danai -f Modelfile
ollama run danai "What is 5 + 7?"
# Download any GGUF quant (e.g. Q8_0 or Q4_K_M)
huggingface-cli download asjadilahi/danAI-55M-Reasoning danAI-55M-Reasoning-Q8_0.gguf --local-dir .
# Run with llama-cli (>300 tokens/sec on Apple Silicon / CPU)
llama-cli -m danAI-55M-Reasoning-Q8_0.gguf -p "System: You are danAI, a helpful AI assistant.\n\nUser: Solve 25 * 4.\n\nAssistant: <think>" -n 128
# Clone repository
git clone https://github.com/Asjad-Ilahi/danAI-55M.git
cd danAI-55M
pip install torch safetensors huggingface-hub tokenizers
# Run interactive assistant (automatically pulls weights from Hugging Face)
python scripts/chat.py
import torch
from tokenizers import Tokenizer
from safetensors.torch import load_file
from scripts.quantized_chat import load_quantized_model
# Load 8-bit, 4-bit, or 2-bit quantized safetensors
model, mode = load_quantized_model("hf_export/danAI-55M-Reasoning-INT8.safetensors")
tokenizer = Tokenizer.from_file("tokenizer/tokenizer.json")
prompt = "System: You are danAI, a helpful AI assistant.\n\nUser: What is 2 + 2?\n\nAssistant: <think>"
input_ids = torch.tensor([tokenizer.encode(prompt).ids], dtype=torch.long)
with torch.no_grad():
for _ in range(30):
logits = model(input_ids)[0]
next_token = torch.argmax(logits[0, -1, :]).item()
input_ids = torch.cat([input_ids, torch.tensor([[next_token]])], dim=1)
if next_token in [0, tokenizer.token_to_id("<|endoftext|>")]:
break
print(tokenizer.decode(input_ids[0].tolist()))
<tool_call> JSON blocks to offload exact multi-digit math to a calculator tool (123433 * 564332 = 69657191756) and live real-time queries to search_web.<think>) Step-by-Step Reasoning:
<think> tokens before emitting the final answer.Evaluated across 100% of all official test and validation samples (>20,000+ test questions) against all major sub-150M open models:
| Model | Active Params | Training Scale | GSM8K (Direct) | Agentic Tools | ARC-Challenge (Hard Science) | ARC-Easy (2,376 q) | ARC (Avg) | MMLU (1,520 q) | RAM Footprint | PIQA (1,838 q) |
|---|---|---|---|---|---|---|---|---|---|---|
| danAI-55M-Reasoning | 54.5M | ~3B tokens | 3.0% | 100.0% (Native) | 25.2% | 39.2% | 32.2% | 27.4% | 13MB โ 104 MB | 56.1% |
| Pythia-70M (EleutherAI) | 70M | 300B tokens | 0.0% | 0.0% | 18.1% | 37.4% | 27.8% | 25.1% | 140 MB | 59.5% |
| GPT-2 Small (OpenAI) | 124M | 40B tokens | 0.0% | 0.0% | 21.4% | 35.8% | 28.6% | 26.2% | 248 MB | 63.3% |
| MobileLLM-125M (Meta AI) | 125M | 1,000B tokens | 0.5% | 0.0% | 27.7% | 45.5% | 36.6% | - | 250 MB | 64.6% |
| SmolLM-135M (Hugging Face) | 135M | 600B tokens | 1.0% | 0.0% | - | - | 42.4% | 30.2% | 270 MB | 68.4% |
| SmolLM2-135M (Hugging Face) | 135M | 2,000B tokens | 1.4% | 0.0% | - | - | 43.9% | 31.5% | 270 MB | 68.4% |
danAI-55M-Reasoning@misc{ilahi2026danai55m,
author = {Asjad Ilahi},
title = {danAI-55M-Reasoning: Ultra-Lightweight Agentic and Reasoning Language Model},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/asjadilahi/danAI-55M-Reasoning}}
}