Wyat-2-1.4B
Decisions, made locally.
Website · Python library · Documentation
A local decision model for text and structured data. Provide your input and the choices you allow; Wyat returns structured answers and probabilities without free-form text generation through its decision API.
The bundled API scores supplied candidates, while the included upstream causal-language-model weights can be used separately.
Get started
Use Python 3.12. Download the complete repository, including its bundled runtime:
python -m pip install huggingface_hub==0.36.0
hf download wyat-io/wyat-2-1.4b --local-dir wyat-2-1.4b
Mac: Apple GPU or CPU
Install the pinned runtime, then select your device:
python -m pip install -r wyat-2-1.4b/runtime/requirements.txt
python -B wyat-2-1.4b/example.py --device mps
For CPU execution, use --device cpu. Without --device, the example selects
CUDA when available, then Apple MPS, then CPU. Apple GPU execution uses PyTorch
MPS; no MLX conversion is needed. Mac execution uses an FP32 backbone, adapters
and scoring head. See the measured scope and cross-device caveat below.
In your own code on a Mac, pass device="mps" to wyat.load for the Apple
GPU. Without a device, the loader follows the artifact's CUDA device policy and
falls back to CPU when CUDA is unavailable, without a message; example.py
selects MPS itself.
On macOS, Wyat checks available memory before loading and before each request.
If the work would take memory use past 90% of RAM, it still runs and shows a
MemoryHeadroomWarning saying how much memory it needs and how much is free;
close other applications if the Mac slows down. Pass max_resource_fraction
to wyat.load to refuse such work instead.
NVIDIA CUDA
Use a GPU supporting BF16 and install PyTorch's CUDA 12.8 build:
python -m pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cu128
python -m pip install -r wyat-2-1.4b/runtime/requirements.txt
python -B wyat-2-1.4b/example.py --device cuda
The CUDA evaluation used Python 3.12.13, PyTorch 2.8.0 / CUDA 12.8 and Transformers 4.57.6 on an RTX 4070 Ti with 12 GB VRAM.
For the fastest CUDA path, leave expandable_segments out of
PYTORCH_CUDA_ALLOC_CONF. The loader replays short candidate batches whose
shapes repeat as CUDA graphs, and graph capture needs the default allocator
segments. With expandable_segments set, capture fails, the loader falls back
to eager scoring without a message, and results stay identical; only those
repeated short batches run slower.
Earlier revisions of this repository keep the previous bundled runtimes. The current bundle adds Mac support and exact CUDA speed work in the bundled loader and example; model weights, tokenizer and manifest are unchanged.
Supported tasks
- Choice — select an option from your menu and return its probability distribution.
- Noul — estimate the probability that a supplied statement is true.
- Score — rate an input against an ordered rubric and return its expected ordinal value.
These are candidate-relative probabilities, not established calibrated confidence.
The same model can handle several questions about one input through model.predict().
Use with Wyat
Run the following from the parent directory of the downloaded wyat-2-1.4b folder.
It uses the bundled runtime so the loader matches the qualified artifact.
It does not depend on an independently installed version of the wyat package.
import json
import sys
from pathlib import Path
release = Path("wyat-2-1.4b").resolve()
sys.path.insert(0, str(release / "runtime"))
import wyat
model = wyat.load(release / "model", backend="torch", device="mps") # "cpu" or "cuda" also work
record = {
"state": "A customer asks to change the delivery address of an order.",
"questions": {
"route": {
"type": "choice",
"instructions": "Choose the support team for this request.",
"criteria": {
"delivery": "Delivery and shipping support",
"billing": "Billing and payment support",
},
},
"delivery_change": {
"type": "noul",
"instructions": "Does the customer request a delivery change?",
},
"urgency": {
"type": "score",
"instructions": "Rate urgency using these ordered levels.",
"criteria": ["Routine", "Time sensitive", "Emergency"],
},
},
}
answers = model.predict(record)
print(json.dumps({key: answer.to_dict() for key, answer in answers.items()}, indent=2))
The result contains one typed answer per question: choice for routing,
probability_true for Noul, and expected_ordinal_value for the ordered score,
plus the candidate probabilities. The complete runnable version is example.py.
Use a fresh Python process if another Wyat version has already been imported.
Model and execution
Built on ByteDance/Ouro-1.4B, a Universal Transformer with recurrent depth, with per-recurrent-step LoRA adapters and an FP32 scalar scoring head. The original base weights stay frozen. The model supports English and French inputs.
| Property | Configuration |
|---|---|
| Base | ByteDance/Ouro-1.4B |
| Base revision | 574fa66cb8bf5abdc979642d01cf2b79b16bfab1 |
| Shared-context recurrent steps | 4 |
| Candidate recurrent steps | 2 |
| Adaptation | Per-step rank-16 LoRA; FP32 scalar scoring head |
| Precision | CUDA: BF16 base; Mac: FP32 base; FP32 adapters and head on both |
| Candidate scoring | Shared-context batches |
| Maximum input | 32,768 tokens for complete context plus candidate |
Over-limit inputs are refused without silent truncation. The model is experimental; validate its behaviour for your application. The supplied runtime retains the verified long-context execution and FP32 rotary-position frequency handling.
Mac validation
The exact checkpoint was exercised on an Apple M4 Pro with 24 GB memory, macOS 27.2, Python 3.12.11, PyTorch 2.8.0 and Transformers 4.57.6.
- CPU and Apple MPS each completed 11 requests / 18 questions, covering Choice, Noul, Score, multiple questions and contexts above 1,024 tokens.
- All CPU/MPS rankings agreed. The maximum absolute logit difference was
0.000060, within the FP32 check's
atol=rtol=0.0001. - The three-question example repeated identically on each Mac device. Invalid tasks, empty candidate sets and over-limit inputs were refused on both.
- Separate fictional French examples and a 4,019-token context were tested on both Mac devices. These checks have no saved CUDA reference.
- The current bundled runtime returned bit-identical probabilities to the runtime above on CPU and Apple MPS for 9 questions, including a 3,942-token context. On a busy 24 GB Mac, all of them ran at the default settings, with memory warnings instead of refusals.
Cross-device results can differ. Compared with the saved CUDA BF16 outputs, 17 of 18 questions passed the chosen portability check: identical top candidate and maximum probability difference of 0.02. One near-tie long-input question changed its top candidate on both Mac paths, with a maximum probability change of approximately 0.060. The stricter CUDA portability check therefore failed; Mac execution is supported without a CUDA-equivalent-results claim. The full JDI suite was not rerun on Mac, and the 32,768-token limit was not stress-tested there. Validate the device and input sizes you intend to deploy.
Benchmarks
Public JDI 0.3 — completed evaluation of the selected checkpoint across 43 benchmarks. This is an exposed public evaluation, not a clean held-out estimate or an official leaderboard submission. Training exposure exists; the scores do not establish generalisation to unseen tasks or superiority over wyat-1.
| Overall result | Value |
|---|---|
| Decision Index | 27.58 |
| Balanced raw score | 46.11 |
| Completed requests | 140,620 |
| Answered | 140,603 |
| Unsupported due to input length | 17 |
| Scorer-eligible completions | 140,178 |
Selected component results from the same full run:
| Benchmark | Metric | Score | Scored requests |
|---|---|---|---|
| BFCL | Case exact accuracy | 73.38% | 1,694 |
| BANKING77 | Macro-F1 | 77.84% | 3,080 |
| CLINC150+OOS | Macro-F1 | 84.16% | 5,500 |
| WinoGrande | Accuracy | 69.38% | 1,267 |
| GSM8K | Accuracy | 42.61% | 2,638 |
Metrics differ by benchmark and should not be averaged directly. Runner totals and scorer eligibility use different denominators. No same-suite wyat-1 comparison is claimed. Evaluation used an RTX 4070 Ti; it is not an official latency result on the benchmark's reference hardware. Aggregate metrics.
The bundled loader was also checked against the evaluated engine: all 420 scoring checks matched logits bit-for-bit, including long-context paths, and all 86 adapter checks matched answers and probabilities across 43 public benchmarks. These checks establish runtime fidelity in the tested environment, not identity on every device.
Typed Decisions
On the Typed Decisions
all/test split, the model completed 400 cases and 2,000 decisions with no
recorded failures, using one RTX 4070 Ti. Each case was handled as five
independent Wyat decisions in one batch; each decision saw the shared state and
its own question and option descriptions.
| Metric | Result |
|---|---|
| Accuracy ↑ | 0.4545 |
| KL from gold ↓ | 0.6933 |
| Brier ↓ | 0.3341 |
| Top-label ECE ↓ | 0.2188 |
Accuracy measures agreement with the argmax of the benchmark's teacher distribution, not independent ground-truth correctness. Training exposure to this benchmark's training split and schemas is unknown, so this result is not claimed as zero-shot. The evaluation record includes the model and dataset identities, scoring conventions, full distributions and execution details.
License
See LICENSE, NOTICE and retained source-file headers for licensing and attribution. Project runtime, adapters and scoring head are Apache-2.0; the unchanged upstream base retains its Apache-2.0 grant. Research intent does not impose an additional noncommercial licence restriction.