DECISIONS, NOT TOKENS

The model already decided.
minojev just reads it.

Ask a chat model a routing question and it writes you a paragraph — which your code then parses back into a label. minojev skips the paragraph. One forward pass returns a typed, calibrated probability distribution with zero output tokens.

Chat model

generate token by token, then parse
output tokens 0 time 0 ms

minojev

one forward pass, read the distribution
0.79
0.14
0.07
✓ typed · calibrated · decode_steps = 0
output tokens 0 time ~12 ms

The whole insight, in one sentence

After reading your question, the model has already formed an opinion. Making it write that opinion out as text is the slowest possible way to hear it. So minojev reads the opinion straight from the model's hidden states, and reports it as probabilities over the candidates you declared.

0output tokens per decision
1forward pass for every question
2–255candidates, defined at request time
0.016calibration error on the maze model

How it works

Three steps, no generation loop, no output parser.

Build candidate paths

Each option becomes a path: state + question + that candidate. Related questions share one state prefix.

One forward pass

Paths are batched through the backbone. Every decision head reads hidden states; no token is sampled, ever.

Read & calibrate

Choice, boolean, and score questions return distributions. Dev-fitted temperatures keep confidence honest.

Different by design

What makes this project more than a demo.

Runs offline, from scratch

A 547k-parameter transformer and a byte tokenizer train on a laptop CPU in minutes — no downloads, no API keys, no GPU.

Every claim has an artifact

Datasets, teacher targets, per-question predictions, metrics, and replay bundles are committed in the repo.

Calibration is first-class

Temperature scaling is fitted on dev and stored in the checkpoint. ECE is measured before and after.

Two engines

Train decision heads from scratch, or read native logits from a pretrained Hugging Face model with zero training.

Parallel + reusable state

Many questions per state in one pass; one KV prefill per distinct state, then cheap branches.

Small enough to read

The whole model, trainer, calibration, and demos fit in one afternoon of reading. Bilingual docs included.

Live demos

Both replay committed bundles — no server model required.

Measured on held-out data

547k parameters, CPU, fully reproducible via scripts/build_results.sh.

83.8%maze accuracy · 89.5% teacher top-set
97.7%distance score top-set
0.016maze ECE after calibration (was 0.090)
366/sdecisions per second, reused state
5/6mazes solved by the agent
41tests passing offline

Train one in a minute

minojev synth  --out data/train.jsonl --count 512 --seed 17 --split train
minojev train  --train data/train.jsonl --dev data/dev.jsonl \
  --output-dir runs/synth --steps 800 --calibrate gold --device cpu
minojev score  --checkpoint runs/synth/checkpoint \
  --input examples/decisions.jsonl --output results.jsonl --mode reuse