verdict
Fast, local answers to typed questions about text: yes/no, pick one, or a level, each with a
probability, in about 30 ms of model time (a tenth of a second a call against a running server)
on Apple Silicon. Nothing is generated and nothing is run on
your behalf. verdict answers; you, or your agent, act.
Use it when the same judgment has to be made over hundreds or thousands of short texts (commands,
tickets, messages, agent turns) and a person or an LLM should read only what it flags.
Laya runs on your machine and sends nothing out. When a task needs a stronger model, TypeSafe's Jev
can answer instead (verdict serve --systemone), or only for the answers Laya is least sure of
(verdict cascade); both say what they send. What each is good at, and
where Laya is rough, are measured, not asserted.
Quick start
Apple Silicon, Python 3.11.
uv tool install --python 3.11 'verdict[mlx,laya] @ git+https://github.com/iksnerd/[email protected]'
verdict init # picks a free port and writes ~/.config/verdict/config.toml
verdict serve & # holds the model, so each call costs milliseconds
verdict ask "commit the fix and push it" "Is this an instruction to perform an action?"
# 0.94
verdict ask "why does the build fail on CI" "Is this an instruction to perform an action?"
# 0.05
kill $(lsof -ti TCP:8799 -sTCP:LISTEN) # holds the model in GPU memory; stop it when done
# (8799 unless `verdict config` shows another url)
The model, Laya (aac6fef/laya-mlx,
Apache-2.0), downloads itself on first use. verdict update moves to the newest release.
A yes/no comes back as P(yes), and 0.5 is not the line between yes and no: Laya's scores are shifted,
and a cut fitted on your own labelled examples (verdict calibrate labelled.jsonl -q bank.json --out fit.json, then --cut fit.json) took accuracy from 0.81 to 0.86 on five public suites
(FINDINGS §55).
The same thing from Python, with typed questions and a result grouped by type:
from verdict import Verdict, Noul
with Verdict() as v: # the server `verdict serve` started
r = v.decide({"text": "commit the fix and push it"},
{"act": Noul(instructions="Is `text` an instruction to perform an action?")})
r.nouls["act"].noul # 0.98
Hosted Jev is optional. Add TypeSafe's SDK by reinstalling with the jev extra, and let
TYPESAFE_API_KEY supply the key:
uv tool install --force --python 3.11 'verdict[mlx,laya,jev] @ git+https://github.com/iksnerd/[email protected]'
verdict is installed from GitHub, not PyPI: the name verdict there is an unrelated project, so
pip install verdict gets the wrong software. Nothing leaves your machine unless you choose a
command that says it will.
When it is the right tool
It fits a task with many items, short texts, a question about what the text shows, a yes/no or a
few named options, and a need for a number to rank or cut on, or for data to stay on the machine.
On public labelled sets the default model ranks sentiment at 0.97, spam at 0.98 and prompt
injection at 0.93 AUC (the 0.9.0 release scorecard, 200 items each; method in
FINDINGS §40).
It is the wrong tool for categories that need world knowledge (seven commit types: 0.44 accuracy,
where an LLM does better) or a maintainer's judgment (bug report or support question: 0.59, and two
rounds of fine-tuning did not fix it; FINDINGS §41, §45). It is also a
weak fit for a very large flat choice (Banking77's 77 options: 0.38; a tree or an embedding model
does better there, but not everywhere, see below), for long
documents (it reads the first 128 tokens), for comparing numbers
(which of four decks has the highest mean: chance, where "is this one negative" is perfect;
§46), and for questions about consequences or difficulty, which score at
chance. verdict refuses those questions rather than answer them badly, refuses more than 20 options
as a conservative default (--allow-unmeasured overrides it), and warns when a text runs past what
it reads.
Features