Skip to content
teilomilletPublic

About

Local decision models for Python: a small model on your machine scores the options your application allows and returns one, with a full probability distribution.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

wyat

wyat

Decisions, made locally.

wyat.io · wyat-1-800m · Documentation


wyat chooses between options your application defines. You provide a message and a set of candidates. A small local model returns the ID of one of them. The model was trained on French and English decisions. Nothing leaves your machine, and nothing runs until you act on the result.

The model is wyat-1 800M. It runs with PyTorch on CPU, CUDA or Apple MPS, or with MLX on Apple Silicon. Version 0.2.0 also loads wyat-2 1.4B from a downloaded model/ directory. Version 0.2.0 downloads its pinned release and verifies every file before loading.

Try it

No model required. The demo uses fixed scores to show the interface.

git clone https://github.com/teilomillet/wyat && cd wyat
uv run python examples/quickstart/main.py --demo
# Selected: cancel

Install

Python 3.12 or newer, with uv.

uv add wyat --extra inference   # PyTorch: CPU, CUDA or Apple MPS
uv add wyat --extra mlx         # MLX on Apple Silicon

Add --extra server to serve over HTTP. The core alone (uv add wyat) has no dependencies. Model weights are separate from the package. wyat.load() downloads and verifies wyat-1 800M on first use, then reuses the verified cache. Run uv run wyat download to fetch it ahead of time. Inference itself never uses the network.

The default backend is PyTorch on CPU. On Apple Silicon, install the mlx extra and select backend="mlx" in Python or --backend mlx on the CLI to use the Apple GPU. The examples below do this explicitly.

Use it

On Apple Silicon with the mlx extra:

import wyat

model = wyat.load("teilomillet/wyat-1-800m", backend="mlx")

decision = model.decide(wyat.Request(
    query="Choose the requested booking action.",
    context="Please cancel my booking.",
    candidates=[
        wyat.Candidate(id="create", text="Create a booking"),
        wyat.Candidate(id="cancel", text="Cancel the booking"),
    ],
))

decision.selected  # one of your IDs, such as "cancel"

Load once. Decide many times. The same request and result work in Python, JSONL, and HTTP:

uv run wyat decide teilomillet/wyat-1-800m --backend mlx < requests.jsonl > decisions.jsonl
uv run wyat serve  teilomillet/wyat-1-800m --backend mlx

For PyTorch with the inference extra, use backend="torch" in Python or --backend torch on the CLI. It uses CPU by default; add device="cuda" or --device cuda for CUDA, or device="mps" / --device mps for Apple MPS.

Besides choosing an option, wyat rates on an ordered scale (Request.score) and answers yes or no with a probability (Request.noul).

Workflow examples

Start with the workflow examples and integration guide: ten runnable examples show how inputs become decisions and application actions. Use the included sample data, then supply your own JSON with the file-input runner. The guide explains setup, output fields, and how to reuse each function in your application; the recorded model results include both successes and failures.

Documentation

Quickstart Your first decision, step by step
Embedded demo A coding agent acting on wyat's choice
Python API Requests, results, batching, serving, evaluation
Workflows Routing, review, recovery
Explaining decisions Reading scores and owning policy
Use cases Choice, Score and Noul in short scripts
Workflow examples and integration guide Ten workflows, editable sample data, custom JSON inputs, and recorded results
Expert use cases Triage, agents, RAG gates, calibration
Integrations LangChain, LangGraph, LlamaIndex, MCP, pandas
All documentation

Coding agents can start from llms.txt.

License

Code is licensed under Apache 2.0; see NOTICE. Model artifacts carry their own licenses. The 800M trained adapters and decision head are released for non-commercial use; its backbone and runtime use Apache 2.0. Contributions are welcome; see CONTRIBUTING.md.

About

Local decision models for Python: a small model on your machine scores the options your application allows and returns one, with a full probability distribution.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages