English | 简体中文
Give it context, a natural-language question, and candidate answers—get a normalized probability distribution locally, with zero LLM fine-tuning.
Open JEV builds on frozen Qwen3-4B-Instruct-2507 (revision cdbee75f17c01a7cc42f958dc650907174af0554) to return normalized probabilities strictly over your supplied options, without training weights or parsing brittle JSON prose. Both the web UI and the /decide HTTP API now support switching freely among base, kv-debias+dyncal, and adaptive-think+dyncal inference modes.
Non-Affiliation Notice: Open JEV is an independent open-source alternative project inspired by TypeSafe's Jev. It is not affiliated with, sponsored by, or endorsed by TypeSafe and contains no proprietary Jev code, weights, or RLCD implementation.
-
Evaluation Suite (
778items): DecideBench (450items,225contrastive pairs across 9 task families); S1MB (200items across 5 configs:contract_nli,ethics,laya__typed_decisions,laya__enron_spam,laya__ag_news); and Belebele (128items: 32 passage families$\times$ 4en/zhviews). Open JEV skips6s1mb/contract_nliitems exceeding4,096tokens (n=772; S1MBn=194). -
Hardware & Metrics: Google Colab Tesla T4 (
16 GBVRAM,14.56 GiBusable, FP16), reporting Accuracy, Pair Accuracy, Selective Accuracy at confidence$\ge 0.85$ ([email protected]), NLL, multiclass Brier sum, 10-bin ECE, Order-flip rate (n=99Open JEV;n=100competitors), single-queryp50, 8-question shared-contextp50(8Q p50), and peak VRAM.
| Variant | Acc | Pair acc | [email protected] (cov) | NLL | Brier | ECE | Flip | Esc% | p50 ms | 8Q p50 ms | VRAM MB |
|---|---|---|---|---|---|---|---|---|---|---|---|
openjev-base |
69.3% | 30.2% | 70.1% (96.8%) | 4.552 | 0.598 | 0.294 | 14.1% | - | 🔵 205 |
1,117 | 🔵 8,004 |
openjev-kv-debias |
71.0% | 31.1% | 72.1% (93.9%) | 3.930 | 0.556 | 0.267 | 🟢 11.1% |
- | 437 | 🟢 792 |
8,499 |
openjev-kv-debias+tempcal |
71.0% | 31.1% | 92.3% (32.0%) | 0.814 | 0.415 | 0.046 | 🟢 11.1% |
- | 438 | 🟢 792 |
8,499 |
🟢 openjev-kv-debias+dyncal |
71.0% | 31.1% | 🟢 93.9% (32.0%) |
0.798 | 0.405 | 🟢 0.034 |
🟢 11.1% |
- | 438 | 🟢 792 |
8,499 |
openjev-adaptive-think |
🟢 72.9% |
🟢 37.8% |
74.0% (97.7%) | 4.142 | 0.527 | 0.262 | 18.2% | 29.1% | 536 | 849 | 8,499 |
🟢 openjev-adaptive-think+dyncal |
🟢 72.9% |
🟢 37.8% |
93.0% (36.9%) | 🟢 0.782 |
🟢 0.386 |
0.042 | 18.2% | 29.1% | 538 | 849 | 8,499 |
Highlight legend: 🟢 = best Open JEV metric or recommended variant; 🔵 = lowest latency, VRAM, or order-flip rate.
Notes: (1) Post-calibration [email protected] operates at a stricter coverage point (32.0% / 36.9% vs. 96.8%), trading coverage for precision. (2) Two-pass debiasing and System 2 thinking increase single-query p50 from 205 ms to 437–538 ms (2.1×–2.6×). (3) Step-2 pure KV ablation (reports/step2-ablation-comparison.json, n=578): enabling prefix_kv alone (qwen3-4b-kv) cuts 8Q p50 from 904 ms to 623 ms (-31.1%) at identical 67.6% accuracy.
| Model |
|
Acc | Pair acc | [email protected] (cov) | NLL | Brier | ECE | Flip | p50 ms | 8Q p50 ms | VRAM MB |
|---|---|---|---|---|---|---|---|---|---|---|---|
🟢 Open JEV (KV+Debias+DynCal)
|
772 (6) | 71.0% | 31.1% | 93.9% (32.0%) | 0.798 | 0.405 | 🟢 0.034
|
11.1% | 438 | 792 | 8,499 |
🟢 Open JEV (Adaptive+DynCal)
|
772 (6) | 🟢 72.9%
|
🟢 37.8%
|
93.0% (36.9%) | 🟢 0.782
|
🟢 0.386
|
0.042 | 18.2% | 538 | 849 | 8,499 |
laya-421m |
778 (0) | 45.8% | 14.2% | 100.0% (0.8%) | 1.210 | 0.651 | 0.066 | 32.0% | 🔵 45
|
🔵 148
|
2,409 |
gliclass-multilang |
778 (0) | 37.0% | 8.4% | N/A* | N/A* | N/A* | N/A* | 20.0% | 108 | 446 | 3,480 |
bge-reranker-v2-m3 |
778 (0) | 34.6% | 4.9% | 42.6% (7.8%) | 1.519 | 0.764 | 0.126 | 🔵 0.0%
|
53 | 164 | 🔵 1,789
|
Methodology & scope notes:
gliclass-multilangmarkedN/A*: The frozen T4 run usedZeroShotClassificationPipeline(..., classification_type="single-label"), returning only the top-1 label and zeroing remaining probabilities, which distortsSelAcc,NLL,Brier, andECE. Fixed toclassification_type="multi-label"ineval/competitors.pyfor future reruns.- Parameter & compute asymmetry: Open JEV is a
4BFP16 model (8,499 MBVRAM,438–538 mssingle-queryp50), compared against421M–~2Blightweight baselines (1,789–3,480 MBVRAM,45–108 msp50) without separate dev-set adapter tuning per competitor. - Language coverage (
laya-421m):laya-421mis English-only (language: en), scoring18.8%–31.2%on Chinese-involved Belebele views; on the English-onlyen→ensubset (n=676vs.682),openjev-adaptive-think+dyncalscores69.2%vs.48.7%(+20.5 pprather than+27.1 pp). - Interface, denominator & calibration asymmetry:
bge-reranker-v2-m3is a retrieval cross-encoder adapted via pairwise logit softmax (0.0%flip by design); Open JEV skips 6 long items (n=772vs.778; flipn=99vs.100) and fits its 5-fold OOF calibrator, priors, and gating thresholds on the same 772-item suite (without family-level bootstrap CIs), whereas competitors run zero-shot. - Other baselines:
gliner2.5-decideandgliner2.5-multi-decidehit CUDA OOM on the fulln=778T4 run (in Step 1 onn=500,78skipped, they scored33.8%/37.8%Acc,0.252/0.178ECE,2,242/1,527 MB).kev-4bandkev-0.8bfailed to start due to apeft/transformers 5.xBloomPreTrainedModelimport conflict.
| Model | DecideBench ( |
S1MB ( |
Belebele ( |
en→en ( |
Operating Role |
|---|---|---|---|---|---|
openjev-base |
59.1% | 74.2% (194) | 97.7% | 65.1% (676) | Uncalibrated single-pass baseline (205 ms p50) |
🟢 Open JEV (KV+Debias+DynCal)
|
60.4% | 🟢 77.8% (194) |
97.7% | 67.2% (676) | Best OOF ECE (0.034, 11.1% flip, 792 ms 8Q p50) |
🟢 Open JEV (Adaptive+DynCal)
|
🟢 63.6%
|
77.3% (194) | 🟢 99.2%
|
🟢 69.2% (676) |
Highest accuracy (72.9% / 37.8% Pair, 0.782 NLL) |
laya-421m |
44.2% | 59.5% (200) | 29.7% | 48.7% (682) | Ultra-low-latency English edge (45 ms, 2.4 GB), -20.5 pp en→en
|
gliclass-multilang |
33.6% | 46.5% (200) | 34.4% | 37.7% (682) | Zero-shot multilingual classifier (108 ms, 3.5 GB) |
bge-reranker-v2-m3 |
30.0% | 44.5% (200) | 35.2% | 34.8% (682) | Order-invariant (0.0% flip) reranker (53 ms, 1.8 GB) |
English UI and example rendered with real Qwen3-4B-Instruct-2507 (CUDA FP16) outputs in kv-debias+dyncal mode. The web UI lets you switch directly between Base, KV + Debias + DynCal, and Adaptive + DynCal modes and displays per-question metadata such as temperature $T$, permutation TV, and System 2 thinking tokens.
decisionmaking/modes.py wires all three inference modes (base, kv-debias+dyncal, adaptive-think+dyncal) into decisionmaking/server.py, supporting both PyTorch (instruction) and local Apple Silicon (mlx) backends. Built-in online presets are full-fit on the 772-item Colab T4 FP16 suite (whereas Table 1 ECE 0.034 / 0.042 is 5-fold OOF) and include PriDe position priors for M=7 uses the 2-pass cyclic fallback), overridable via DECISION_CALIBRATOR or data/calibrator-{mode}.json.
Given serialized context
-
Shared-Prefix KV Reuse (
eval/prefix_kv.py): Prefills common prefix$x_{1:L}$ ($L \ge 16$ ) once intoDynamicCacheand crops in-place (cache.crop(-(cur_len - L))) per question or permutation, cutting8Q p50by-31.1%(904 ms → 623 ms) in Step 2 (n=578). -
Unlabeled PriDe + 2-Pass Cyclic Debiasing (
eval/debias.py): Estimates position priors on unlabeled items and fuses canonical order$C^{(0)}$ with half-period shift$C^{(1)}$ in log-probability space, emittingperm_tv_distance. -
Group-CV Dynamic Calibration (
eval/calibrator.py): Predicts$T(x) = \mathrm{clip}(\exp(w^\top \tilde{x} + b), 0.5, 25.0)$ from 6 diagnostic features via 5-foldGroupKFoldL-BFGS (n_groups = 451), preserving 100% of Top-1 choices. -
Entropy-Gated Adaptive Thinking (
eval/adaptive_think.py): Escalates items with$u \ge 0.35$ or$\mathrm{TV}_{\mathrm{perm}} \ge 0.08$ (29.1%) to$\le 96$ -token greedy thinking, then reads exactA..Jlogits after\nAnswer:.
Context → your questions and candidate answers → normalized probabilities → your application's next step.
| Capability | What you can do with it | Status |
|---|---|---|
| Free-form questions & candidates | Change decisions at request time without intent registration or retraining | Shipped (server.py) |
| Multi-question shared context | Submit multiple questions in one request | Shipped (server.py) |
| Choice & Binary outputs | Compare 2–8 supplied options with stable candidate IDs | Shipped (server.py) |
| English & Chinese input | Monolingual and cross-language workflows (en→en, en→zh, zh→en, zh→zh) |
Shipped (server.py) |
| Local HTTP API & JSON | Run locally without sending data to a hosted API | Shipped (server.py) |
| Shared-prefix KV & PriDe debiasing | Reuse context KV cache and reduce option-order bias | Integrated in Web UI & /decide API (kv-debias+dyncal) |
| Dynamic temperature & adaptive thinking | Calibrated confidence and selective System 2 verification | Integrated in Web UI & /decide API (adaptive-think+dyncal) |
| Scenario | Example question and supplied choices | Application integration |
|---|---|---|
| Customer-support routing | "Which queue should handle this?" → billing / delivery / account access | Route ticket to the right queue |
| Email triage | "What does the sender need next?" → reply / schedule meeting / acknowledge | Prioritize inbox and draft action |
| Community moderation | "Which review queue fits this post?" → normal / promotion / personal attack | Triage moderator workload |
| Agent tool routing | "Which available tool fits this request?" → search / calculator / calendar | Select tool in an agent loop |
| Document compliance | "Does the submission include the budget?" → included / missing | Flag incomplete submissions |
| Workflow branching | "What step follows under this policy?" → request info / review / close | Advance state-machine branch |
Tested locally on Apple M3, 16 GB unified memory, Python 3.14. The pinned source download (Qwen/Qwen3-4B-Instruct-2507, revision cdbee75f17c01a7cc42f958dc650907174af0554) is ~8 GB; the MLX 8-bit copy is ~4 GB.
python3 -m venv .venv-mlx
.venv-mlx/bin/python -m pip install -r requirements-mlx.lock.txt
.venv-mlx/bin/python scripts/fetch_instruction.py \
--repo Qwen/Qwen3-4B-Instruct-2507 \
--revision cdbee75f17c01a7cc42f958dc650907174af0554 \
--out data/instruction-4b-assets.json
.venv-mlx/bin/python scripts/convert_instruction_mlx.py
DECISION_BACKEND=mlx \
DECISION_ASSETS=data/instruction-4b-mlx8-assets.json \
.venv-mlx/bin/python -m uvicorn decisionmaking.server:app \
--host 127.0.0.1 --port 8766Open http://127.0.0.1:8766/ or query the HTTP API (/docs schema, /status readiness). mode accepts "base" (default), "kv-debias+dyncal", or "adaptive-think+dyncal":
curl http://127.0.0.1:8766/decide \
-H 'Content-Type: application/json' \
-d '{
"state": "The parcel will arrive on Thursday. Do not call the recipient.",
"mode": "kv-debias+dyncal",
"questions": [{
"id": "arrival",
"type": "choice",
"question": "When will the parcel arrive?",
"options": [
{"id": "tue", "description": "Tuesday"},
{"id": "thu", "description": "Thursday"}
]
}]
}'Limits: 2–8 candidates/question, 4,096 prompt tokens/question, 16 questions in the UI, 100 in the API. Overlength inputs are rejected rather than silently truncated. (In kv-debias+dyncal and adaptive-think+dyncal, log_probs—and raw_label_logits for backwards compatibility—return pre-calibration fused log-probabilities rather than single-pass raw logits.)
Frozen 2026-09-17 snapshot (release/benchmark-summary.json, PERFORMANCE.md): MLX 8-bit achieves 533 ms median latency across 8 sequential HTTP requests (555 ms first request, 4.60 GB allocator peak). Across 364 baseline items spanning 91 distinct families (same_top1_on_364_cases: true; 236 dev items = 59 families 89.8%, 128 Belebele items = 32 families 97.7%), top-1 choices match FP16 identically, though probability distributions are not bit-identical (max absolute candidate-probability difference 0.1854 on dev, 0.0633 on Belebele).
# 1. Local unit tests (52 passing without GPU;
# 36 historical tests recorded in release/VALIDATION.json)
pytest -q tests/test_modes_api.py tests/test_prefix_kv.py tests/test_debias.py \
tests/test_calibrator.py tests/test_adaptive_think.py tests/test_competitors.py \
tests/test_eval_harness.py
# 2. Generate self-contained Colab T4 evaluation bundles
python eval/colab_bundle.py bundle --mode step3 --out /tmp/openjev_step3.py
python eval/colab_bundle.py bundle --mode competitors --out /tmp/openjev_competitors.pyFrozen evaluation artifacts: reports/step1-baseline-comparison.json, reports/step2-ablation-comparison.json, reports/step3-full-competitor-comparison.json, reports/step3-full-competitor-comparison.md.
-
4,096-token prompt cap (
772vs.778denominator): Open JEV enforcesMAX_INPUT_TOKENS = 4096and skips6longs1mb/contract_nliitems (n=772), whereas encoder/reranker baselines truncate or chunk to evaluate all778items. -
Evaluation protocol boundary: Dynamic calibrators were fitted via 5-fold
GroupKFoldOOF (n_groups = 451) on the 772-item suite, while adaptive-thinking gating thresholds (0.35 / 0.08) are fixed constants chosen on the same suite (no independent held-out test set or family-level bootstrap CIs yet); no commercial API or TypeSafe Jev run was conducted, and no competitor superiority is claimed. -
Adaptive thinking latency & flip-rate cost (
11.1% → 18.2%): System 2 runs greedy thinking on a single option order, raising single-queryp50to538 msand increasing order-flip sensitivity on borderline items; fusing System 2 logits across 2 cyclic passes is a direct next step. -
Online preset & FP16→MLX boundary:
decisionmaking/modes.pyships full-fit 6-feature dynamic calibration weights and PriDe position priors from Colab T4 FP16 (covering$M \in {2,3,4,5,6,8,9,10}$ ;M=7uses the 2-pass cyclic fallback; Table 1 ECE0.034 / 0.042is 5-fold OOF). Calibration quality (ECE / selective accuracy) on MLX 8-bit has not been separately verified; refit viaDECISION_CALIBRATORon target backend data for production use. -
Local Apple M3 multi-mode latency: Observed Apple M3 MLX 8-bit results cover
basemode latency (533 ms) and top-1 agreement only; local Apple M3 latency and calibration quality forkv-debias+dyncalandadaptive-think+dyncalhave not yet been benchmarked (incremental KV cache is enabled in MLX adaptive decoding).
- Project Code: Apache-2.0. Does not grant rights to TypeSafe/Jev branding.
- Foundation Model: Qwen3-4B-Instruct-2507 (
cdbee75f17c01a7cc42f958dc650907174af0554), Apache-2.0. - Datasets & Related Work: Belebele (
CC-BY-SA-4.0), DecideBench (CC-BY-4.0, credit to DecideBench authors), S1MB (other, see upstream dataset card), TypeSafe Jev, PriDe (Zheng et al., ICLR 2024), CAPPr, LMQL, GLiClass, GLiNER2, Laya, BGE-Reranker-v2-m3, and Kev.

