Pragma-1-2B
Pragma-1-2B is a 1.54B-parameter open-weights language model developed by Yours Research, trained for fast mathematical reasoning, grounded reading, coding, and structured tool calling in a sub-1 GB browser footprint built for smartphones and client-side WebGPU inference.
- BF16 Weights (This Repository):
yours-research/Pragma-1-2B - WebGPU Q4 Quantization (920.30 MiB):
yours-research/Pragma-1-2B-WGSL - Flagship 4B Sibling (
3.78B):yours-research/Pragma-1-4B - Live In-Browser WebGPU Demo:
pragma.yours.sh· YBI-100 Benchmarks
Highlights
- +12.24 pt WebGPU Q4 Leap Over Upstream 2B: Scores 53.58 WGSL Q4 (100.00% Q4 retention, 51.41 BF16) on frozen YBI-100, outperforming
Qwen/Qwen3.5-2B(41.34Q4),LiquidAI/LFM2.5-1.2B-Instruct(38.27Q4), and even larger3B–5Bpeers under 4-bit browser quantization (MiniCPM5-2B47.60,Qwen2.5-3B-Instruct46.23,Gemma-4-E2B-it43.59,Phi-4-mini45.80,SmolLM3-3B32.47). - Compacted Vocabulary & Sub-1 GB Browser Footprint: Uses a lossless pruned 81,920-token tied vocabulary (
1.54Btotal parameters vs.2.27Bupstream) shared identically withPragma-1-4B, while keeping the full 262,144-token native context window. Under 4-bit WGSL quantization (yours-research/Pragma-1-2B-WGSL), the entire model packs into920.30 MiB(< 1 GiB). - Strong Reasoning & Tool Calling at 1.5B Scale: Achieves 100.0% tool-calling schema adherence, 100% 4K/32K NIAH passkey retrieval, 64.1% IFEval Strict Q4, 56.0% GSM8K Q4 (
55.0%BF16), and 52.0% MATH-500 BF16 (42.0%Q4). - Hybrid Linear + Full Attention: 24 layers interleaving Gated DeltaNet linear attention (18 layers) and grouped-query full attention (6 layers,
full_attention_interval=4) for memory-efficient long context.
Model Specifications
| Attribute | Value |
|---|---|
| Architecture | Qwen3_5ForCausalLM (qwen3_5_text) |
| Parameters | 1.54B (tied embeddings) |
| Precision | bfloat16 (safetensors) |
| Layers | 24 (18 linear_attention + 6 full_attention) |
| Hidden / Intermediate Size | 2,048 / 6,144 |
| Attention Heads | 8 Q / 2 KV (head_dim = 256) |
| Vocabulary Size | 81,920 |
| Native Context Length | 262,144 tokens |
| License | Apache-2.0 |
Benchmark Results
Single-Pass Suite Highlights (BF16 vs. WGSL Q4)
Evaluated on our zero-shot evaluation harness (gsm8k_100, math500_50, mmlu_pro_100, ifeval_100 [78 strict prompts], niah_4k, niah_32k, companion tool calling, and adaptive thinking):
| Benchmark | Pragma-1-2B (BF16) | Pragma-1-2B (WGSL Q4) |
|---|---|---|
| Tool-Calling Adherence | 100.0% | 100.0% |
| Adaptive Thinking Mode | 100.0% | 75.0% |
| NIAH 4K / 32K | 100% / 100% | 100% / 100% |
| GSM8K | 55.0% | 56.0% |
| MATH-500 | 52.0% | 42.0% |
| MMLU-Pro | 26.0% | 29.0% |
| IFEval (Strict) | 60.3% | 64.1% |
YBI-100 (Yours Research Browser-AI Index)
YBI-100 is Yours Research's frozen 2,128-case evaluation benchmark (40,960 context window) measuring end-to-end reliability across real browser-assistant workloads.
Sub-4B Peer Cohort Comparison
| Model | Total Params | BF16 | WGSL Q4 | Q4 Retention |
|---|---|---|---|---|
Pragma-1-2B (yours-research/Pragma-1-2B) | 1.54B | 51.41 | 53.58 | 100.00% |
openbmb/MiniCPM5-2B | 2.52B | 59.03 | 47.60 | 89.41% |
Qwen/Qwen2.5-3B-Instruct | 3.09B | 52.19 | 46.23 | 93.23% |
google/gemma-4-E2B-it | 5.12B (2.3B eff.) | 44.24 | 43.59 | 99.38% |
Qwen/Qwen3.5-2B | 2.27B | 49.34 | 41.34 | 92.38% |
LiquidAI/LFM2.5-1.2B-Instruct | 1.17B | 41.10 | 38.27 | 96.21% |
HuggingFaceTB/SmolLM3-3B | 3.08B | 38.37 | 32.47 | 94.08% |
Pragma-1-2B Pillar Breakdown (YBI-100)
| Pillar | Weight | BF16 | WGSL Q4 |
|---|---|---|---|
| Browser tools | 25% | 23.6% | 21.3% |
| Grounded reading | 20% | 77.8% | 83.3% |
| Instruction following | 15% | 42.5% | 42.3% |
| Practical knowledge | 15% | 42.1% | 43.7% |
| Browser readiness | 15% | 68.1% | 77.8% |
| Coding and sandbox | 10% | 70.5% | 70.1% |
| Weighted Total | 100% | 51.41 | 53.58 |
Optimized WebGPU Quantization
For zero-server browser and smartphone execution, use our pre-packed 4-bit WGSL quantization at yours-research/Pragma-1-2B-WGSL (920.30 MiB, < 1 GiB, 100.00% YBI-100 Q4 retention) with per-16 MiB SHA-256 chunk hashes for parallel OPFS streaming.
Quickstart (transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "yours-research/Pragma-1-2B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "user", "content": "Solve step by step: if x + 1/x = 5, find x^3 + 1/x^3."}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs,
max_new_tokens=1024,
temperature=0.6,
top_p=0.95,
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Set enable_thinking=False in apply_chat_template for low-latency direct answers without a <think>...</think> trace.
Repository Contents
model.safetensors— Full-precisionbfloat16weights (3.08 GB)config.json,generation_config.json— Model and default sampling configurationtokenizer.json,tokenizer_config.json,chat_template.jinja— Compacted81,920-vocab BPE tokenizer and Qwen3.5-compatible chat/tool-calling template
License
Released under the Apache 2.0 License.