OEV is a small (184M params) neural decision engine. Instead of generating text, it scores answer options directly. The state, the question, and every option are packed into one sequence. One forward pass returns a calibrated probability distribution.
The single 184M model scores 0.7705 on typed-decisions, slightly above laya's published 0.766 from a 421M checkpoint. An ensemble of four 184M checkpoints reaches 0.7760, the highest reported result. It also scores 0.8303 on Banking77 and 0.0298 ECE. Jev leads only on Banking77.
At a glance
| claim | result |
|---|---|
| best accuracy | 0.7705 single model, 0.7760 ensemble - typed-decisions (laya 0.766 from 421M) |
| best soft accuracy | 0.7020 sharpened (laya 0.471, Jev 0.580) |
| high-cardinality | 0.8303 Banking77 (laya 0.425) |
| speed | 22.2 ms single question (laya 32.8 ms) |
| size | 184M params, 0.44x laya |
| calibration | ECE 0.0298 (laya 0.213) |
| weights & checkpoints | Apache 2.0 - huggingface.co/divyanshudhruv/oev-typed |
22.2 msper question on aT4(GPU); CPU latency not yet characterizedECE 0.0298on typed-decisions after temperature fitting - measured confidence tracks actual accuracy, so it can gate automation0.8303on 77-labelBanking77: each option is embedded as its own anchor with full tokens, so accuracy scales with label count (Jev still leads there)184Mparams,Apache 2.0weights
Architecture
flowchart LR
S["state\n(text / JSON)"] --> P["packer:\nstate + questions + anchors\none sequence"]
P --> E["encoder\nDeBERTa-v3-base (184M)\nor char transformer"]
E --> H["one linear head\nscores every ANCHOR"]
H --> D["softmax per question\n= calibrated distribution"]
D --> O["choice / noul / score"]
- One anchor mechanism covers all three primitives - options, yes/no pairs, and score levels are each embedded as anchors in one packed sequence
- No text generation - nothing to parse, nothing to hallucinate
New question types need no new heads
Benchmarks: OEV vs the published field
Fine-tuned on each benchmark's train split, following the same protocol as Laya's published runs. Complete tables in BENCHMARKS.md.
| benchmark | OEV | laya | Jev | note |
|---|---|---|---|---|
| typed-decisions | 0.7760 | 0.766 | 0.727 | highest reported (ensemble); single model 0.7705 |
| Banking77 (77 labels) | 0.8303 | 0.425 | 0.870 | 2x laya; Jev still leads |
| AG News | 0.9489 | 0.950 | 0.910 | label-noise ceiling (~0.95) |
| DAIR Emotion | 0.9300 | 0.595 | 0.480 | laya's number is zero-shot |
Quickstart
pip install -e .
Optional extras:
pip install -e ".[dev]"- pytestpip install -e ".[data]"- dataset converterspip install -e ".[backbone]"- DeBERTa fine-tuning
from oev.infer import OEV
agent = OEV("checkpoints_td5/oev-tiny.pt", device="cpu")
result = agent.decide("We were charged twice for the same order.", {
"department": {"type": "choice", "options": ["billing", "technical", "sales", "other"],
"instructions": "Which department should handle this?"},
"refund_requested": {"type": "noul"},
"severity": {"type": "score", "levels": [1, 2, 3, 4, 5]},
})
{
"department": {
"choice": "billing",
"probabilities": {
"billing": 0.94,
"technical": 0.04,
"sales": 0.01,
"other": 0.01
},
"confidence": 0.94
},
"refund_requested": 0.91,
"severity": {
"value": 3,
"probabilities": { "1": 0.02, "2": 0.08, "3": 0.61, "4": 0.22, "5": 0.07 }
}
}
Confidence gating - automate when confident, escalate when not:
from oev.presets import triage_questions, gate
for name, payload, confident in gate(result, threshold=0.85):
automate(name, payload) if confident else escalate_to_human(name)
HTTP server (native + Jev-compatible /v1/systemone endpoint - TypeSafe clients work by changing baseUrl):
pip install -e ".[serve]"
oev-serve --checkpoint checkpoints_td5/oev-tiny.pt --port 8000
curl -X POST localhost:8000/decide -H "Content-Type: application/json" \
-d '{"state": "My payment failed twice", "questions": {"urgency": {"type": "score", "levels": [1, 2, 3]}}}'
Docker:
docker compose up # checkpoint at ./checkpoints/oev-tiny.pt
Training
python -m oev.convert_typed
python -m oev.train --backbone microsoft/deberta-v3-base --epochs 4 --batch-size 8 --max-len 768 --data-dir data/typed --out checkpoints_td5
python -m oev.rlcd --checkpoint checkpoints_td5/oev-tiny.pt --data-dir data/typed --epochs 2 --batch-size 8 --out checkpoints_rlcd
python -m oev.ensemble --ckpts checkpoints_td5/oev-tiny.pt,checkpoints_rlcd/oev-tiny.pt,checkpoints_rlcd_soup/oev-tiny.pt --data-dir data/typed
python -m pytest -q # 38 tests passing
train_colab.ipynb runs the entire pipeline end to end. Full training docs in BENCHMARKS.md.
Limitations
- every benchmark number is from a checkpoint fine-tuned on that benchmark's train split; zero-shot performance is much weaker
- the headline ensemble result is an average of four checkpoints; the best single model is
0.7705 - CPU latency is uncharacterized - all timings are T4 GPU
- Banking77 calibration (
ECE 0.186) is markedly worse than typed-decisions (0.0298) - English only
Roadmap
- distill the ensemble into one 184M model (single-model general skills currently erode after per-benchmark fine-tuning)
- INT8 / ONNX export for CPU deployment
- multi-question shared-state encoding (one pass, many questions)
- b77 confidence-sharpening sweep (ECE
0.186-> target <0.10) - robustness: reduce mild overconfidence on out-of-distribution and garbage inputs
- non-English checkpoints (the interface is language-agnostic; the weights are not yet)
Credits
The interface and benchmark protocol follow Laya and the System One model category introduced by TypeSafe's Jev. Their published numbers are quoted here for comparison and remain their measurements.
Release files for oev 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oev-0.1.0.tar.gz | 44.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oev-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.1 kB
Release files / oev-0.1.0.tar.gz
| Download URL | oev-0.1.0.tar.gz |
|---|---|
| Size | 44.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cd74100498581675cb78f1380f949b92727cac9308a34a2cdd42e16df3651f1
|
|
BLAKE2b-256 checksum How to use checksums |
2e2627f2a00104de9365a834799019ff2e794e2db7d4900a343bca38c47ffa2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / oev-0.1.0-py3-none-any.whl
| Download URL | oev-0.1.0-py3-none-any.whl |
|---|---|
| Size | 39.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30f6a428907679861139fb618e3fe6e53f8534c0cad713fe94b85e8546e849da
|
|
BLAKE2b-256 checksum How to use checksums |
155ccdb5717b2f01e942dfbbf45f00b9345a8584b9d03e9eb37fc2a0e21d2fc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|