An open-weight, local decision model for software: typed probabilistic decisions from arbitrary state.
pip install open-decision-ai==0.2.0 Copy PIP instructions
LLMs return strings. Software needs a branch: which path, how sure, act or escalate. OpenDecision takes arbitrary state — text, JSON, logs, key/value dumps, conversations — plus a typed question, and returns a typed, probabilistic decision with calibrated confidence.
State + Typed Question -> Probabilistic Decision curl -s localhost:8000/v1/decisions -H 'content-type: application/json' -d '{ "state": {"customer_message": "When will my new card arrive?"}, "question": {"type": "choice", "question": "What is the customer'\''s intent?", "options": ["card_arrival", "card_not_working", "exchange_rate", "top_up_failed"]}}' {"type": "choice", "decision": "card_arrival", "probabilities": {"card_arrival": 0.978, "card_not_working": 0.018, "exchange_rate": 0.002, "top_up_failed": 0.003}, "confidence": 0.978, "abstained": false, "model": "open-decision-150m"} It runs entirely on your machine: ~150M parameters, ~10 ms per decision on a GPU, no API key, no telemetry, no data leaving the host.
A general LLM can answer that question, but you pay for it in latency, cost, and — most importantly — you get prose you must parse, with a confidence number that means nothing. For the narrow, repetitive decisions that make up real workflows:
which queue does this ticket go to? -> choice is this incident customer-impacting? -> binary should we auto-approve, review, or reject? -> choice + confidence threshold …a small encoder is the right tool. OpenDecision gives you:
OpenDecision explores the same broad problem as recent "machine-native" / "System One"-style decision models, from an open, local-first perspective. It is an independent implementation, not a reproduction of any proprietary system.
The weights are not in this repository. Download the archive and point the server at it — it is fetched once, verified, extracted and cached under ~/.cache/open-decision/.
Model: open-decision-150m v0.2.0 · ModernBERT-base · Apache-2.0 · 558 MB zip Download: https://drive.google.com/file/d/ /view sha256:
open-decision serve --model 'gdrive: #sha256= ' gdrive: works with a bare id or a full Drive share link. Any plain URL works too, so you can host the archive anywhere:
open-decision serve --model 'https://example.com/open-decision-150m-v0.2.0.zip#sha256= ' The #sha256= fragment is optional but recommended — the download is rejected on a mismatch. Re-running is instant; the cache is reused and the network is never touched again. Set OPEN_DECISION_CACHE to move the cache, and --offline to forbid any download.
unzip open-decision-150m-v0.2.0.zip -d ./models open-decision serve --model ./models/model The directory must contain config.json, model.safetensors, open_decision.json and the tokenizer files. Only safetensors weights are loaded and trust_remote_code is never enabled, so nothing in a model directory can execute code.
Heads-up before you run anything: pip install open-decision / uv tool install open-decision will not work yet — the package is not on PyPI. And a default install pulls the CUDA build of PyTorch: ~5.4 GB, which downloads for minutes with almost no output and looks like a freeze. Every command below pins the CPU build (~950 MB, ~1 minute) unless you actually need a GPU.
curl -LsSf https://astral.sh/uv/install.sh | sh # macOS / Linux # Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex" Restart the shell, then check: uv --version (0.8 or newer).
Until the package is published, install from a checkout:
git clone https://github.com/ /open-decision.git cd open-decision Step 3 — install Pick one.
A. As a command-line tool (a global open-decision binary, isolated environment):
uv tool install --index pytorch-cpu=https://download.pytorch.org/whl/cpu \ --index-strategy unsafe-best-match . Note uv tool install ignores UV_TORCH_BACKEND, so the --index flags above are how you get the small CPU build. Without them you get the 5.4 GB CUDA build.
B. As a project (for development, or to use it as a library):
uv sync --torch-backend cpu # ~950 MB, about a minute uv run open-decision --version C. In your own virtualenv:
uv venv && uv pip install --torch-backend cpu . With a GPU — drop the CPU pins and let uv detect your CUDA version. Expect a multi-GB download; run it with -v so you can see progress:
uv sync --torch-backend auto -v Verify whichever you chose:
open-decision --version # or: uv run open-decision --version Step 4 — get the model and serve it See Get the model above for the download link and checksum.
curl -s localhost:8000/v1/decisions -H 'content-type: application/json' -d '{ "state": {"customer_message": "My card is not working at the ATM"}, "question": {"type": "choice", "question": "What is the customer'"'"'s intent?", "options": ["card_arrival", "card_not_working", "exchange_rate"]}}' Troubleshooting installs symptom cause and fix uv tool install open-decision hangs, then fails not on PyPI yet — install from a checkout (Step 3) install seems frozen for minutes downloading the CUDA PyTorch build (~5.4 GB). Ctrl-C and add the CPU pins above, or add -v to watch progress open-decision: command not found ~/.local/bin is not on PATH; run uv tool update-shell and restart the shell server returns HTML error on model download the Drive file is not shared as "Anyone with the link", or the daily quota is exhausted — download it manually and pass the directory /ready returns 503 for a long time still downloading or loading the model; watch the server log slow decisions on CPU expected — CPU is roughly 10x slower than GPU. Use --device cuda with a CUDA install, or Docker No-install option: Docker Nothing to install but Docker itself — the model is fetched on first start and cached in the mounted volume:
# GPU docker run --gpus all -p 8000:8000 -v ~/.cache/open-decision:/root/.cache/open-decision \ -e OPEN_DECISION_MODEL='gdrive: ' ghcr.io/ /open-decision:latest # CPU docker run -p 8000:8000 -v ~/.cache/open-decision:/root/.cache/open-decision \ -e OPEN_DECISION_MODEL='gdrive: ' ghcr.io/ /open-decision:cpu Using it Python SDK from open_decision import Client client = Client("http://localhost:8000") result = client.decide( state={"customer_message": "My card is not working at the ATM"}, question={"type": "choice", "question": "What is the customer's intent?", "options": ["card_arrival", "card_not_working", "exchange_rate"]}, ) print(result.decision, result.confidence, result.probabilities) AsyncClient has the same methods; concurrent calls are batched into one forward pass.
from open_decision import DecisionEngine engine = DecisionEngine.load("gdrive: ") # or a local directory decision = engine.decide( state="status=failed retry_count=4 region=eu-west", question={"type": "binary", "question": "Should this job be retried again?"}, ) print(decision.decision, decision.probability) Several decisions about one state Workflows usually need more than one narrow decision. They are all batched into a single forward pass:
{"state": {"...": "..."}, "questions": [ {"id": "intent", "type": "choice", "options": ["refund", "reship", "investigate"]}, {"id": "urgent", "type": "binary", "question": "Is this urgent?"} ], "abstain_threshold": 0.7} {"decisions": {"intent": {"...": "..."}, "urgent": {"...": "..."}}, "model": "open-decision-150m"} Acting on confidence The whole point is that you can branch on the number:
d = client.decide(state=ticket, question={"type": "choice", "options": [...]}) if d.abstained or d.confidence < 0.60: route_to_human(ticket) elif d.confidence < 0.80: queue_for_review(d.decision, ticket) else: execute(d.decision, ticket) Benchmarks v0.2.0, on a held-out test set of 4,660 examples (synthetic + Banking77 + CLINC150 + TREC). Reproduce with the training repo's evaluate command; full numbers in runs/v0.2/eval.json.
+30 accuracy points over a bag-of-words cross-encoder on the same data.
The headline 0.670 blends supervised intent classification with zero-shot transfer. For in-domain intent classification the model is in the low 90s.
Selective accuracy — the model answers only when confident enough:
Confidence separates answerable from unanswerable input: feeding it garbage ("asdf qwer", {"a": 1}, "ok") yields 0.29–0.59 confidence versus ~1.00 on a clear intent — an AUC of 1.00 on banking intents and 0.84 on open-ended routing questions.
confidence >= 0.80 -> execute automatically (97.2% accurate, ~35% of traffic) 0.60 - 0.80 -> execute with review confidence route to a human Calibrate these on your own labelled sample — the numbers above come from this test set.
Below abstain_threshold the decision is null and abstained is true; the probabilities are still returned so your application can apply its own policy.
Full schema in docs/api.md; runnable samples in examples/.
open-decision serve --model [--port 8000] [--abstain-threshold 0.7] open-decision health open-decision model-info echo '{"state":"...","question":{"type":"binary","question":"..."}}' | open-decision decide echo '{...}' | open-decision decide --model ./models/model # no server needed Architecture ┌──────────────────── OpenDecision model ─────────────────────┐ state ─────┐ │ per option: "[CLS] question / option [SEP] state [SEP]" │ question ──┼──▶ │ ModernBERT encoder ──▶ [CLS] ──▶ choice head ──▶ logit│──▶ softmax options ───┘ └────────────────────────────────────────────────────────────┘ over options │ temperature scaling (optional) ──▶ abstention threshold ──▶ typed decision Choice and binary questions are scored one option at a time by a cross-encoder, which is why the model is invariant to option order by construction and accepts any option strings rather than a fixed label set. See docs/model-format.md.
Every setting is a CLI flag or an OPEN_DECISION_* environment variable:
uv sync uv run pytest -q uv run ruff check src tests && uv run mypy src Tests build a tiny random model on the fly; no downloads required.
Apache-2.0 for the code. Model weights are released under Apache-2.0 and carry their own model card; third-party datasets used in training keep their own licenses.
calibration classification decision fastapi inference local
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




