Skip to content

Commit da2ae95

Browse files
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-sglang
1 parent 2392ac0 commit da2ae95

15 files changed

Lines changed: 1462 additions & 1320 deletions

‎data/jev-distill.jsonl‎

Lines changed: 320 additions & 0 deletions
Large diffs are not rendered by default.

‎dist/server/modelMapper.js‎

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/server/modelMapper.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)