Skip to content

v7.10.0

Choose a tag to compare

@github-actions github-actions released this 02 Jun 00:39
· 259 commits to main since this release

styxx.spec_exec — epistemic speculative execution (integrity-gated model routing)

Draft with a cheap model by default; escalate a single call to a stronger model only when a styxx behavioral-honesty signal flags the cheap output as low-validity — not when raw confidence is low (models are confidently wrong, so confidence is a poor validity oracle). The speculative-cascade pattern, lifted from the token level to the action level and gated on a behavioral signal.

from styxx import EpistemicSpeculativeRouter, calibrate_threshold

router = EpistemicSpeculativeRouter(drafter=cheap, verifier=strong, gate=entropy_gate, tau=tau)
out = router.run(prompt)        # out.answer / out.escalated / out.signal
tau = calibrate_threshold(train_records, cost_cap=0.7)   # calibrate on train, verdict on test

Validated (held-out, 2026-06-01)

A Qwen2.5-1.5B drafter gated by span_confab, escalating to a 7B verifier on arithmetic, recovered the full quality gap (median 1.00 across 20/20 random splits) at ~0.70× the verifier's always-on cost — with the escalation threshold calibrated on a disjoint train split. Generalized to a second task (sorting) via the complementary signal channel.

Honest bounds

Small open models / narrow tasks only — not frontier-scale or arbitrary task types yet. span_confab has two channels (margin vs entropy) and the right one is task-dependent. Routing pays only when the param gap dwarfs gate overhead and the cheap model is competent on a real fraction of calls. Behavioral gates catch uncertainty errors — they are blind to confident shared-belief errors (use styxx.retrieval_check there). A control law, not an oracle.

pip install -U styxx==7.10.0

Full Changelog: v7.9.0...v7.10.0