Instructions to use jbarney/circuit-1.7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jbarney/circuit-1.7b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
circuit-1.7b
A System One decision model: typed questions in, calibrated probability
distributions out, one forward pass, no text generation. It speaks
TypeSafe's POST /v1/systemone contract and is the open-weights backend
for decision-circuits.
circuit-1.7b is a LoRA adapter plus a pointer readout head on
Qwen/Qwen3-1.7B-Base. A request packs a state and a question; each
option is wrapped in delimiter tokens and the sequence ends with a decide
token. The head scores every option's closing delimiter against the
decide token and applies softmax. Those probabilities are the answer,
trained with cross-entropy against outcome labels, so calibration is
learned rather than derived.
Results
Same items for every model, human labels, accuracy / ECE (15 bins).
| cold eval (1,200 items) | MultiNLI | SMS spam | Civil toxicity | CLINC 151-way |
|---|---|---|---|---|
| Jev (TypeSafe, API) | 88% / 0.04 | 96% / 0.05 | 82% / 0.06 | 90% / 0.05 |
| Bespoke-Nimble-9B | 84% / 0.09 | 91% / 0.06 | 86% / 0.08 | not supported (26-option cap) |
| kev-0.5b | 46% / 0.28 | 50% / 0.30 | 62% / 0.16 | 62% / 0.17 |
| circuit-1.7b | 81% / 0.09 | 98% / 0.02 | 90% / 0.16 | 86% / 0.06 |
The four cold-eval tasks' train splits are in this model's training mix; they are presumably not in Jev's. Two checks nothing was trained on:
| out of distribution | Jev | Nimble-9B | kev-0.5b | circuit-1.7b |
|---|---|---|---|---|
| 100 water-utility calls, 11-way (Barney 2025) | 98% / 0.02 | 93% / 0.05 | 80% / 0.13 | 92% / 0.08 |
| generalization grid, 9 operations x 6 formats, code-labeled | 95% | 85% | 48% | 97%* |
| ClassicMiniDIY typesafe-bench, 546 production questions (agreement with Jev / ECE) | 1.0 by definition | 0.84 / 0.05 | 0.49 / 0.11 | 0.70 / 0.05 |
* the grid generator is ours, so this is held-out items, not held-out structure. Trained with an operation and a format withheld, the same recipe scores 91% on the unseen format and 57% on the unseen operation: layouts transfer, new kinds of judgment must be in the training data.
Known weakness shared with every model above, Jev included: on inputs built to be undecidable, mean confidence is 0.5 to 0.9 where it should be near 0. Calibration on ambiguity is the open problem.
Training
- Base:
Qwen/Qwen3-1.7B-Base(Apache 2.0), frozen. LoRA rank 16 on all attention and MLP projections (17.4M params). Pointer head: two 2048 x 256 linear maps. - Data, 16,738 items, every label computed by code or by humans, every source permissive (CC BY / CC0 / MIT / Apache): the generalization grid (8,100 + 838 oversampled ambiguous items with soft 0.5 labels), a commercial-safe slice of public classification tasks (2,100), and CC-licensed real data (MNLI, civil_comments, sms_spam, CLINC; 5,700). No teacher-model outputs.
- 2 epochs, batch 4, max 1,024 tokens, lr 1e-4 (LoRA) / 1e-3 (head), soft-target cross-entropy, early stopping on validation ECE. 61 minutes on one RTX 4090.
- Training code, data generators, and the evaluation harness: github.com/Barneyjm/circuit.
Use
Serve it with the circuit repo and point any System One client at it:
S1_MODEL=lora:runs/circuit-1.7b uv run python -m s1proto # :8901
from decision_circuits import Circuit, Q, argmax
from decision_circuits.backends import SystemOne
c = Circuit()
c.noul("pii", "Does the message contain personal information?")
c.choice("dept", "Which team?", {"billing": None, "technical": None, "other": None})
c.gate("redact", Q("pii") >= 0.7, on_uncertain="escalate")
c.gate("route", argmax("dept", min_confidence=0.35))
out = c.run(SystemOne("http://localhost:8901/v1/systemone", api_key="x"), "Card charged twice, my card ends in 4412")
Files: adapter/ (PEFT LoRA), head.pt (pointer head, keys q.weight, k.weight),
config.json (base, hidden size, head type, layout, training args).
Intended use and limits
Research and evaluation of calibrated decision models, and as a local backend for decision circuits. Not a production system for decisions that affect people. English only. Confidence on undecidable inputs is not yet reliable (see above); put thresholds inside an uncertainty band and route the band to a human, which is what decision-circuits does.
License
Adapter and head: Apache 2.0. Base model: Qwen license (Apache 2.0 for Qwen3).
- Downloads last month
- -
Model tree for jbarney/circuit-1.7b
Base model
Qwen/Qwen3-1.7B-Base