Pragma-1-4B
Pragma-1-4B is a 3.78B-parameter open-weights language model developed by Yours Research, trained for fast mathematical reasoning, grounded reading, coding, and structured tool calling in a compact footprint that also runs natively in Chromium WebGPU at 63+ tok/s.
- Flagship BF16 Weights (This Repository):
yours-research/Pragma-1-4B - Desktop WebGPU Q4 Quantization + Speculative Draft Head (2.37 GB):
yours-research/Pragma-1-4B-WGSL - Smartphone WebGPU Q3 Quantization (1.48 GB):
yours-research/Pragma-1-4B-Mobile-Q3-WGSL - Live In-Browser WebGPU Demo:
pragma-demo-production.up.railway.app
Highlights
- Strong Reasoning & Knowledge at ~3.8B Scale: Leads our unified peer comparison cohort on MATH-500 (62.0%) and MMLU-Pro (34.0% BF16 / 36.0% Q4) while achieving 86.0% BF16 / 89.0% Q4 on GSM8K and 100% on 32K NIAH passkey retrieval.
- Compacted Vocabulary & Tight Memory Footprint: Uses a pruned 81,920-token tied vocabulary (~3.78B total parameters vs. 4.66B upstream) while preserving a 262,144-token native context window.
- Built for Client-Side Browser Execution: Preserves 98.71% of full-precision quality under 4-bit WGSL quantization (
yours-research/Pragma-1-4B-WGSL), fitting inside 2.26 GiB (2,313 MiB) VRAM with 63.25 tok/s mean Chrome WebGPU decode and 101.8 ms mean TTFT. - Hybrid Linear + Full Attention: 32 layers interleaving Gated DeltaNet linear attention (24 layers) and grouped-query full attention (8 layers,
full_attention_interval=4).
Model Specifications
| Attribute | Value |
|---|---|
| Architecture | Qwen3_5ForCausalLM (qwen3_5_text) |
| Parameters | 3.78B (tied embeddings) |
| Precision | bfloat16 (safetensors) |
| Layers | 32 (24 linear_attention + 8 full_attention) |
| Hidden / Intermediate Size | 2,560 / 9,216 |
| Attention Heads | 16 Q / 4 KV (head_dim = 256) |
| Vocabulary Size | 81,920 |
| Native Context Length | 262,144 tokens |
| License | Apache-2.0 |
Benchmark Results
Known Benchmarks vs. Peer Models
Evaluated across models under the same single-pass zero-shot harness (gsm8k_100, math500_50, mmlu_pro_100, ifeval_100 [78 strict prompts], plus 4K/32K passkey NIAH):
| Model | Params | GSM8K | MATH-500 | MMLU-Pro | IFEval (Strict) | NIAH 4K / 32K |
|---|---|---|---|---|---|---|
| Pragma-1-4B (BF16) | 3.78B | 86.0% | 62.0% | 34.0% | 57.7% | 100% / 100% |
| Pragma-1-4B (WGSL Q4) | 3.78B | 89.0% | 60.0% | 36.0% | 61.5% | 100% / 100% |
microsoft/Phi-4-mini-instruct (BF16) | 3.84B | 90.0% | 52.0% | 15.0% | 57.7% | — |
Qwen/Qwen3-4B (BF16) | 4.02B | 36.0% | 16.0% | 17.0% | 60.3% | — |
Qwen/Qwen3.5-4B (BF16) | 4.66B | 19.0% | 2.0% | 31.0% | 66.7% | 100% / 100% |
HuggingFaceTB/SmolLM3-3B (BF16) | 3.08B | 66.0% | 16.0% | 11.0% | 59.0% | — |
On single-pass structured checks in the same evaluation suite, Pragma-1-4B also scores 100.0% on tool-calling schema adherence and 75.0% on adaptive thinking mode selection (vs. 25.0% for the upstream base).
YBI-100 (Yours Research Browser-AI Index)
YBI-100 is Yours Research's 2,128-case evaluation benchmark (40,960 context window) measuring end-to-end reliability on real browser-assistant workloads across six pillars: Browser tools, Grounded reading, Coding and sandbox, Practical knowledge, Browser readiness, and Instruction following.
Overall Cohort Comparison
| Model | Total Params | BF16 | WGSL Q4 | Q4 Retention |
|---|---|---|---|---|
Pragma-1-4B (yours-research/Pragma-1-4B) | 3.78B | 75.36 | 74.11 | 98.71% |
Qwen/Qwen3-4B | 4.02B | 59.38 | 64.46 | 100.00% |
Qwen/Qwen3.5-4B | 4.66B | 61.07 | 60.49 | 99.45% |
google/gemma-4-E4B-it | 8.00B (4.5B eff.) | 60.18 | 46.07 | 86.17% |
microsoft/Phi-4-mini-instruct | 3.84B | 52.71 | 45.80 | 92.13% |
HuggingFaceTB/SmolLM3-3B | 3.08B | 38.37 | 32.47 | 94.08% |
Pragma-1-4B Pillar Breakdown (YBI-100)
| Pillar | Weight | BF16 | WGSL Q4 |
|---|---|---|---|
| Browser tools | 25% | 73.4% | 71.8% |
| Grounded reading | 20% | 86.5% | 91.7% |
| Instruction following | 15% | 63.8% | 58.8% |
| Practical knowledge | 15% | 71.9% | 68.1% |
| Browser readiness | 15% | 76.4% | 74.6% |
| Coding and sandbox | 10% | 79.0% | 76.0% |
| Weighted Total | 100% | 75.36 | 74.11 |
Optimized WebGPU Quantizations & Browser Telemetry
For client-side WebGPU deployment without a server GPU, we release two pre-packed browser quantizations:
- Desktop WebGPU (
yours-research/Pragma-1-4B-WGSL—2.37 GBQ4): Pre-quantized Q4 shards (<=128 MiBWebGPU storage-buffer chunks) plus a35.4 MBQ4 speculative draft head (mean τ = 2.61tokens/step overall,2.75on math,3.64on tool calling):- Mean Chrome WebGPU Decode:
63.25 tok/s(70.77 tok/speak workload) - Mean Time to First Token (TTFT):
101.8 ms - Estimated Browser VRAM Footprint:
2,313.47 MiB(2.26 GiB) - Allocated Int8 KV Capacity:
33,280tokens
- Mean Chrome WebGPU Decode:
- Smartphone WebGPU (
yours-research/Pragma-1-4B-Mobile-Q3-WGSL—1.48 GBQ3): Pre-packed 3-bit planarQ3_B128transformer weights with 4-bit tied embeddings (1,511 MiBweights /1,583 MiBtotal GPU footprint with compact Int8 KV cache), engineered to fit comfortably inside strict iOS (WKWebView/ Safari) and Android mobile browser memory ceilings.
Quickstart (transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "yours-research/Pragma-1-4B"
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 (7.56 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.