OneJev1.6-0.8B ONNX int8 (multilingual decisions on CPU)
A CPU-oriented ONNX version of the text decoder of OmniJev/OneJev1.6-0.8B, a decision model by the OmniJev team, fine-tuned from Qwen/Qwen3.5-0.8B. You give it a state (text or JSON) and typed questions; it returns a probability for every option.
- Multilingual. On our 216 support-ticket decisions in six languages, it answers non-English tickets about as well as English ones (see Scores).
- int8 compute on CPU. The 96 projections run as ONNX Runtime's
DynamicQuantizeMatMul(int8 weights, activations quantized at run time), about three times the speed of the fp32 GEMM on arm64. We did no fine-tuning, distillation or calibration. - One graph. Decoder and readout together: a batch of prompts in, the logits of the option letters out.
- No PyTorch. Runs with
onnxruntime>=1.31,tokenizersandnumpy. - Answers two question types:
choice(a probability per option, 2 to 26 options) andnoul(yes/no, gives p(yes)). - Text only. OneJev1.6 also reads images and video; the vision tower is not included.
All credit for the model goes to the OneJev authors. See NOTICE and LICENSES.md.
Files
| file | what it is |
|---|---|
model/model.onnx |
text decoder + letter readout, int8 projections, fp16 embedding (1.01 GB) |
model/tokenizer.json |
OneJev1.6's tokenizer (copied unmodified) |
onejev_onnx.py |
the runner: DecisionModel (onnxruntime + tokenizers + numpy), and the prompt |
example.py |
a small tested example |
requirements.txt |
onnxruntime>=1.31, tokenizers>=0.20, numpy>=1.26 |
LICENSE, NOTICE, LICENSES.md, DATA_CARD.md |
licence (Apache-2.0), attribution and provenance |
The export code is scripts/export/export_onejev.py and onejev_prompt.py in
altertable-ai/duckdb-decision_tune@2b50dab.
Quick start
hf download altertable/onejev1.6-0.8b-onnx-int8 --local-dir onejev1.6-0.8b-onnx-int8
cd onejev1.6-0.8b-onnx-int8
pip install -r requirements.txt # onnxruntime, tokenizers, numpy
python example.py
# billing {'billing': 0.993, 'tech': 0.002, 'sales': 0.005} | refund p(yes) = 0.234 | ... ms
# billing {'billing': 0.991, 'tech': 0.005, 'sales': 0.005} | refund p(yes) = 0.284 | ... ms
# billing {'billing': 0.977, 'tech': 0.001, 'sales': 0.022} | refund p(yes) = 0.563 | ... ms
In Python (run from the downloaded folder, or add it to sys.path):
from onejev_onnx import DecisionModel
m = DecisionModel("model", threads=8) # folder with model.onnx and tokenizer.json
out = m.decide(
{"ticket": "J'ai été débité deux fois"}, # state: a string or a JSON object, in any language
{
"route": {"type": "choice", "instructions": "Which team should handle this ticket?",
"criteria": {"billing": "Payments, refunds, double charges",
"tech": "Bugs and login problems"}},
"refund": {"type": "noul", "instructions": "Does the customer ask for money back?"},
},
)
out["answers"]["route"]["choice"] # "billing"
out["answers"]["route"]["probabilities"] # {"billing": ..., "tech": ...}
out["answers"]["refund"]["noul"] # p(yes)
Tips:
- Give each option a short description (
"billing": "Payments, refunds, double charges"); the model readskey: description. - Each question is its own prompt. A call's questions run as right-padded rows of shared passes.
- Up to 32,768 tokens per question by default (
max_len); longer inputs raiseonejev_onnx.Unsupported, nothing is cut. Memory grows with the square of the length in the 6 full-attention layers (see CPU latency). scorequestions, choices of more than 26 options, and images or video are not supported here; OneJev's own server, Flide, handles them.
Using the ONNX file directly
| name | type | ||
|---|---|---|---|
| input | input_ids |
int64 [B, T] |
one prompt per row, each followed by padding (any token id) up to T |
| input | lengths |
int64 [B] |
each prompt's length |
| output | logits |
float32 [B, 26] |
the output-head logits of the letters A..Z at each prompt's last token |
A question with n options reads the first n logits; their softmax is its probabilities. The model is causal, so padding
after a prompt never affects it. One prompt is the chat template with thinking disabled, a fixed system turn, and a user
turn of <state>\n{state}\n</state>\n\nQuestion: ...\n\nOptions:\nA. key: description\n...\n\nAnswer with one letter: A, B.;
onejev_onnx.render builds it exactly as flide_onejev 0.1.7 does (prompt version onejev-labels-v2). A JSON state is
indented by 2. Yes/no is the choice {yes, no}, in that order.
The graph uses ONNX Runtime contrib ops (com.microsoft.LinearAttention, GroupQueryAttention, RotaryEmbedding,
DynamicQuantizeMatMul), so it needs ONNX Runtime 1.31 or later.
How it was made
export_onejev.pyexports the text decoder and the letter rows of the output head as one fp32 graph, on ONNX Runtime's own CPU kernels:- the 18 Gated DeltaNet layers run the delta rule as
com.microsoft.LinearAttention(update_rule=gated_delta), with q and k L2-normalized before it. Their short causal convolution is four shifted multiply-adds, which ONNX Runtime runs faster thanCausalConvWithStateor a depthwiseConv. (com.microsoft.GatedDeltaNethas no CPU kernel.) - the 6 full-attention layers are
GroupQueryAttention(8 query heads, 2 key/value heads, causal), after their per-head RMSNorm andRotaryEmbeddingon the first 64 of each head's 256 dims; - each layer's projections are one MatMul, and only each prompt's last token goes through the last layer's MLP and the readout.
The fp32 graph matches the unmodified transformers model to within 1.6e-5 in logits on 17 prompts of 2 to 3,000 tokens, and a right-padded batch gives exactly each prompt's own logits.
- the 18 Gated DeltaNet layers run the delta rule as
store_int8rewrites the 96 projections asDynamicQuantizeMatMul: int8 weights, symmetric, one scale per output column. The token embedding is stored in fp16 and only the gathered rows are cast to fp32. The letter rows of the output head stay fp32.
We tried and did not keep:
- fp32 compute: 1.6 times slower end to end (the fp32 GEMM runs at about 0.7 to 0.9 TFLOP/s on one M4 Pro core at these
shapes;
DynamicQuantizeMatMulat about 2.2). MatMulNBits(8-bit or 4-bit weights, every accuracy level): 3 to 20 times slower thanDynamicQuantizeMatMul, and 4 bits had 10% relative error per product.- fp16 compute: about 6 times slower than fp32 on this CPU.
- The MLP down projections in fp32: 214 instead of 212 of 216 answers equal to fp32, for about 13% more time.
Fidelity
On 216 decisions (72 support tickets in English, French, German, Spanish, Japanese and Chinese, 3 questions each: team, refund yes/no, tone), compared with the unmodified PyTorch model:
| int8 ONNX vs PyTorch fp32 | |
|---|---|
| same answer (argmax) | 212 / 216 |
| median absolute difference in probability (largest per decision) | 0.004 |
| largest difference | 0.14 |
| accuracy against our labels (204 labelled decisions) | 191, against 192 for fp32 |
The tickets and their labels are ours, not a benchmark. The runner's prompt text equals apply_chat_template's on 231 prompts,
and its token ids equal transformers' on 731 texts.
Scores
Upstream figures for the full-precision OneJev1.6-0.8B, not a run of this export, from the Jev Decision Index board (data of 29 October 2026, Decision Index 0.4.1):
| score | |
|---|---|
| Full score (the board's ranking; private tests) | 29.58 |
| Public index (37 public benchmarks, chance-corrected) | 48.76 |
| Knowledge | 26.1 |
| Language | 48.1 |
| Retrieval | 63.4 |
| Tools | 72.9 |
| Arts | 35.6 |
| Calibration error (ECE) | 0.035 |
The board has no benchmark in a language other than English. On our 216 ticket decisions (PyTorch fp32, English questions), the full-precision model answered 94% of non-English decisions right (160/170) and 94% of English ones (32/34); for comparison, vllm-sr/vela3-fast, an English model, answered 72% and 97%.
CPU latency
One prompt, Apple M4 Pro, onnxruntime 1.31.1. The machine was busy with other work while we measured (load average about 12), so expect somewhat better numbers on an idle one:
| input | 1 thread | 8 threads | peak RAM |
|---|---|---|---|
| 150 tokens (a short ticket and question) | 193 ms | 68 ms | 2.4 GB |
| 512 tokens | 0.77 s | 0.33 s | 2.4 GB |
| 2,048 tokens | 3.9 s | 1.4 s | 3.2 GB |
| 8,192 tokens | 27.7 s | 7.0 s | 6.7 to 7.6 GB |
The model loads in under a second. The template alone is about 80 tokens per question; a question with three described options
about a one-line ticket is about 150. Several questions in one decide call share passes.
Limitations
- Text only, decisions only. No images or video, no
scorequestions, at most 26 options per choice. - Slower than encoder decision models of the same size class. Each question is a chat prompt of about 80 tokens plus the question, options and state, through a 0.8B decoder. On one thread it was about 3.3 times slower per question than vela3-fast's ONNX export on the same ticket.
- Not yet optimized for repeated prefixes. The system prompt and the state are recomputed for every question.
- Provenance. We did not train these weights. Per its model card, OneJev1.6-0.8B averages three full fine-tunes of Qwen3.5-0.8B on 390,000 to 440,000 questions from real agent runs, videos, images and the training splits of public decision datasets. Some of those come from the same source datasets as Decision Index benchmarks, so treat Index results as in-distribution. See DATA_CARD.md.
Licence
Apache-2.0, as OneJev1.6-0.8B and Qwen3.5-0.8B. See LICENSE, NOTICE and LICENSES.md.
Citation
Please cite the upstream model:
@misc{onejev2026,
title = {{OneJev}: A Multimodal System One Decision Model},
author = {{OmniJev Team}},
year = {2026},
howpublished = {\url{https://github.com/OmniJev/OneJev}}
}