Sifr 0.8B v3.1 — a typed decision engine
Sifr (Arabic صفر, "zero") is a System-1 decision engine: it takes a state and a question with explicit options and returns one decision with a calibrated probability for every option — in a single forward pass, no generation, no chain-of-thought.
Decision Index 0.2.1 (official kit run, complete: true): index 26.88 · raw 44.2 ·
coverage 100% · median latency 46.9 ms/request.
That is the best sub-1B score on the board (next: 19.22), 1.9× the previous 0.8B release (v2: 13.86), and 2.1 points from the best 2B entrant (29).
How it answers
One fixed rendering for every benchmark (State / Question / Options with explicit keys,
"Reply with exactly one option key"). Every option is scored as the length-normalized
log-probability of its key tokens (summed key-token logprob ÷ key token count,
acc_norm convention), softmaxed across options. No truncation, no option filtering, no
prompt tuning, no per-benchmark hacks; the policy is declared in environment.json and
in the engine's provenance.
Results (Decision Index 0.2.1, official kit scorers)
| Area | skill |
|---|---|
| Retrieval & Classification | 0.455 |
| Tools & Automation | 0.360 |
| Knowledge & Reasoning | 0.185 |
| Language Understanding | 0.226 |
| Arts & Human Taste | 0.060 |
Selected families (raw): PhishNChips 0.999 · ARC-Easy 0.859 · FinEntity 0.857 · CLINC150 0.728 ★ · BFCL 0.796 ★ · BANKING77 0.680 ★ · GSM8K 0.717 · HellaSwag 0.730 ★ · ARC-Challenge 0.688 · ToolRet 0.506 · API-Bank 0.408 ★ · SGD 0.604.
(★ = gold benchmarks, ×1.2 weight.)
Training
- Base: Qwen3.5-0.8B (full fine-tune, bf16)
- Objective: answer-only cross-entropy on the gold option key given the exact Decision-Index rendering; soft targets (proper-scoring style) for yes/no questions
- Data: 126,371 rendered rows from train splits only (never suite rows): BANKING77, CLINC150, ANLI, XNLI, HellaSwag, GSM8K, MMLU-aux, WinoGrande, ARC, AG News, SST-5, Emotion, FinEntity, iSarcasmEval, PhishNChips, CLadder, ContractNLI, RAGTruth (class-rebalanced), SATA-Bench, VAST, BPoMP, Humicroedit, Amazon ESCI, ForecastBench (resolved historical question sets), chess, board-game synthetics, typed-decisions, binary-verify synthetics, HumanEval
- Schedule: 3 epochs scheduled, early-stopped at epoch 1.28 by held-out probes (in-distribution + unseen-family NLL, checked every 600 steps); best-2 checkpoint selection; AdamW lr 1e-5, cosine
- Hardware: 2× RTX 5060 Ti (16 GB), DDP, ~3.5 h
How to use
import json, math, torch
from transformers import AutoProcessor, AutoModelForMultimodalLM
model_id = "mohamedlotfy50/sifr-0.8b-v3"
processor = AutoProcessor.from_pretrained(model_id)
tok = processor.tokenizer
model = AutoModelForMultimodalLM.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="cuda:0").eval()
SYSTEM = ("You are a decision engine. Read the state, then answer the question "
"by replying with exactly one option key from the list. Do not explain.")
def render(state, q):
s = state if isinstance(state, str) else json.dumps(
state, ensure_ascii=False, separators=(",", ":"))
body = ["State:", s if s else "(empty)", "", "Question:", q["instructions"], "",
"Options:"]
for key, desc in q["criteria"].items():
body.append(f"{key}: {key if desc is None else desc}")
body += ["", "Reply with exactly one option key."]
prompt = tok.apply_chat_template(
[{"role": "system", "content": SYSTEM},
{"role": "user", "content": "\n".join(body)}],
tokenize=False, add_generation_prompt=True)
return tok(prompt, add_special_tokens=False)["input_ids"]
@torch.inference_mode()
def score(prompt_ids, criteria):
"""Length-normalized P(key | prompt) for every option."""
keys, sums, lens = list(criteria), [], []
for k in keys:
kids = tok(k, add_special_tokens=False)["input_ids"]
out = model(input_ids=torch.tensor([prompt_ids + kids], device=model.device),
logits_to_keep=len(kids) + 1)
lsm = torch.log_softmax(out.logits[0].float(), dim=-1)
sums.append(sum(lsm[t, kt].item() for t, kt in enumerate(kids)))
lens.append(len(kids))
norm = [s / l for s, l in zip(sums, lens)]
top = max(norm); w = [math.exp(x - top) for x in norm]; z = sum(w)
return {k: wi / z for k, wi in zip(keys, w)}
state = {"task": "sentiment classification"}
q = {"instructions": "Classify the sentiment of this review:\n"
"One star. The screen arrived cracked and support never replied.",
"criteria": {"A": "negative", "B": "positive"}}
probs = score(render(state, q), q["criteria"])
# -> {'A': 0.755, 'B': 0.245}
print("choice:", max(probs, key=probs.get)) # -> A
Notes:
- Keep the rendering and system prompt exactly as shown — the model is trained on this fixed format; changing the wording costs accuracy.
- The
score()convention is length-normalized (summed key-token logprob ÷ token count); for equal-length option sets it reduces to plain summed logprobs. - Yes/no questions use the same machinery with criteria
{"false": "False", "true": "True"}. - For the full Decision-Index reproduction (155k rows, checkpoint/resume, official
scorers), see the decision-index kit;
sifr_engine.pyin this repo plugs in directly as--engine sifr_engine:SifrEngine.
Intended use
Typed decisions with calibrated probabilities where the answer space is explicit: classification, retrieval verdicts, tool selection, verification (supported/not), routing, binary judgment. The engine returns the full option distribution, so thresholds, abstention and cascades can be built on top.
Limitations
- Knowledge-recall families (GPQA, HLE, MMLU-Pro, BBH) saturate low at 0.8B — the index's remaining gap to larger entrants
- Option-key scoring is length-sensitive; the length-normalized readout corrects the documented prefix bias but very-long-key options remain disadvantaged
- Aesthetic-taste families (cfcolor, Humicroedit) sit at chance
- Text-only in this release (the base model has a vision tower — multimodal decision data is the next training round)
Files
model.safetensors— the checkpoint (best_7800)sifr_engine.py— the Decision-Index engine (policy inprovenance)probe.json,temperatures.json,tokenizer.json,config.json— supporting files
Citation
@misc{sifr2026,
title={Sifr: a calibrated System-1 decision engine at 0.8B},
author={Lotfy, Mohamed},
year={2026},
howpublished={\url{https://huggingface.co/mohamedlotfy50/sifr-0.8b-v3}}
}
License: Apache 2.0 for our additions; the base model's license applies to the inherited weights and tokenizer.