Run your first decision.
One checkpoint, a local playground, and the same typed interface in Python or JSON.
1. Install the package and weights
Use Python 3.10–3.12 and PyTorch 2.8.0 for your device. The commands below use CPU inference, so you can begin without a GPU. The download command requires the GitHub CLI and access to the repository.
git clone https://github.com/erphq/smalldecide.git
cd smalldecide
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
gh release download v0.3.0 -R erphq/smalldecide \
-p openauditor-model.tar.gz -p SHA256SUMS -D artifacts
cd artifacts
shasum -a 256 -c SHA256SUMS --ignore-missing && tar -xzf openauditor-model.tar.gz
cd ..SmallDecide was previously named openauditor. The v0.3.0 archive keeps its original filename and checksum. Existing openauditor commands and imports remain supported.
Only extract the archive after the checksum reports OK. If your system has sha256sum instead, use sha256sum -c SHA256SUMS --ignore-missing. The checkpoint is approximately 967 MB compressed and includes the tokenizer and merged weights. This installs current main source with frozen v0.3.0 weights (ec832471…). The release wheel is an older source snapshot. The public-data experiment uses different weights and is not this download.
2. Open the local playground
smalldecide playground --model artifacts/model --device cpuOpen http://127.0.0.1:8080 in your browser. Edit the state, add Choice, Score, or Noul questions, and inspect the actual checkpoint’s response. Keep the command running while using the playground.
The server binds to loopback and has no authentication. It is intended for local use. There is no hosted SmallDecide API.
3. Use it from Python
Load the checkpoint once, then reuse it across reviews. State can be text or JSON.
from smalldecide import SmallDecide, Choice, Noul, Score
model = SmallDecide.from_pretrained("artifacts/model", device="cpu")
result = model.review(
{"message": "Please refund the duplicate charge on my invoice."},
{
"team": Choice("Which team handles this?", {
"billing": "Charges and refunds",
"technical": "Software faults",
}),
"refund": Noul("Is a refund requested?"),
"priority": Score("Rate urgency.", [
"Routine", "Time-sensitive", "Emergency",
]),
},
)
print(result.to_dict())Choice returns a label and probabilities; Noul returns P(true); Score returns the expected zero-based rubric index. Read the complete API reference →
4. Send a JSON request
smalldecide infer --model artifacts/model \
--request examples/request.json --device cpuThe CLI defaults to CUDA when --device is omitted; the Python loader defaults to CPU. The examples explicitly select CPU.
The repository includes a request with all three question types. See a recorded CPU response from the released checkpoint. Model probabilities can vary slightly across devices.
5. Train on your own examples
Start with reviewed labels or a trustworthy verifier. Keep related records together using group, and separate train, validation, and test data. The repository includes an editable data generator:
python examples/generate_data.py --output data/custom \
--train 3000 --validation 400 --test 400 --heldout 400
smalldecide validate --data data/custom
smalldecide train --data data/custom --output runs/my-model \
--steps 1800 --updates 90 --max-length 4096 \
--environments route,workflow,control \
--policy-temperature 2 --device cudaThe generator teaches simple threshold rules. Replace its sampling and verifier functions with your own task. Training combines supervised learning, built-in environment RL, and validation-only calibration. Custom supervised data does not automatically create an RL reward for that domain. This command starts from the pinned Qwen base; it does not fine-tune the downloaded merged checkpoint. For continuation, --initial-checkpoint requires a compatible training adapter. The output checkpoint is runs/my-model/model; load it with the same playground or Python commands.
The released checkpoint used 28,234 prepared training decisions from public datasets, verifier-labelled tasks, and converted/redacted session execution examples. Private session rows are not distributed. A public-data recipe and your own data can train the same architecture, but cannot exactly reproduce this mixed-data checkpoint.
Full training recipe, provenance, and resume instructions ↗
Hardware and limits
| Device | Inference | Training |
|---|---|---|
| CUDA GPU | Supported · BF16 | Supported runtime; evaluated on an H100 |
| CPU | Supported · float32 | Not practical for a full run |
| Apple MPS | Experimental; M4 Max measurements | Experimental |
Use --device cuda with a compatible GPU and PyTorch installation. Runtime memory grows with context length and candidate batch size. Each candidate repeats the state; a long candidate list is more expensive than a short one.
The checkpoint rejects prompts over 16,384 tokens per candidate. Training used a 4,096-token guard, so the larger inference limit does not establish long-context reliability.