DEV Community

CaoHaoWei
CaoHaoWei

Posted on

Jev-LCT: Free Calibrated Confidence from Looped Transformer Trajectories

Small decision models have two bad options today: generate text token-by-token (slow, fragile to parse), or "introspect" their confidence verbally (systematically miscalibrated). Jev-LCT is an open-source System-One decision engine that takes a third route — extracting calibrated probabilities directly from a transformer's internal recurrent dynamics.

How it works

  • Parallel Looped Prefill: recurrently recomputes only the top k=2 layers of a causal transformer, preserving full representation fidelity.
  • Endogenous Trajectory Confidence: reads calibrated probabilities from hidden-state convergence dynamics (cosine delta, entropy reduction, softmax margin trajectories) — no RL, no extra generation tokens.
  • Adaptive Dual-Channel Early Exit: 85%+ of simple queries exit after a single loop in ~45ms; ambiguous ones iterate up to 4 loops.

Benchmarks

Measured on an RTX 3090 Ti, across a 300-item benchmark (Banking77, ARC, TruthfulQA, BoolQ, MMLU):

  • Jev-LCT-Qwen2.5-0.5B — 50.8ms
  • Jev-LCT-Qwen2.5-1.5B — 61.9ms, ~70% overall accuracy (recommended balance)
  • Jev-LCT-Qwen3-8B — 89.2ms

It's compatible with TypeSafe AI's Jev POST /v1/systemone spec and ships with a FastAPI server plus a typed Python SDK. Apache 2.0, 52/52 tests passing, weights on HuggingFace. Built for agent decision-making, security routing, fraud detection, and edge robotics — anywhere you need a fast decision instead of a paragraph.

I'm an independent developer — try it out, and issues are welcome: https://github.com/gitchw/LCT

Top comments (0)