Commit da2ae95
committed
feat(jev): System One routing — single-pass Jev decision engine (model=jev-auto)
Implements the open Jev interface pattern (TypeSafe System One) as a
local decision engine distilled from our own System 2 heuristic router:
- src/routing/jev/types.ts — choice/score/noul question contract
- src/routing/jev/optionAttention.ts — hashed-trigram option-attention
engine (pure TS, zero deps, dynamic option sets, query cache)
- src/routing/jev/jevRouter.ts — RouteDecision-compatible head with
confidence guard → System 2 fallback below p<0.22
- src/routing/jev/remote.ts — Jev-compatible endpoint client
(ekzhang/openjev-sglang / api.typesafe.ai via A3M_JEV_URL)
- tools/distill.mjs — System2→System1 corpus generator
- tools/train_jev.py — vectorized numpy trainer (CE+MSE+CE)
- tools/calibrate_temp.py — binary-search temperature calibration
- weights: 97.8% train top-1, mean top-prob 0.90 calibrated, 1.1MB
- modelMapper: model="jev-auto" → jevRoute
- warm latency ~2ms/decision (32 options), 100 opts < 150ms guard
- tests: 10 new (engine contract, dynamic options, determinism,
fallback, perf); full suite 188/188
Sources: harshatheg/Qwen-2.5-1B-RLCD, TheoLeeCJ/SemIf (ex-OpenJev),
vinnylarouge/jevlike, ekzhang/openjev-sglang1 parent 2392ac0 commit da2ae95
15 files changed
Lines changed: 1462 additions & 1320 deletions
File tree
- data
- dist/server
- src
- routing/jev
- weights
- server
- tests/routing
- tools
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments