feat(intern-decision-serve): Intern-Decision-4B behind semif-serve's HTTP surface

Contract, service and tests (fake engine, no GPU). Scores through the checkpoint's own
inference.py (DecisionEngine.predict, sha256-pinned); maps semif decisions onto Jev choice
questions, packs /decide/shared into calls of at most 16, runs orderings in waves, and keeps
semif's error mapping, admission, body limit and hard VRAM cap. Deltas from semif-serve are
listed in the contract.
This commit is contained in:
vh
2026-09-30 09:04:39 -07:00
parent bb806e3596
commit 5bbf0aaeba
18 changed files with 3196 additions and 0 deletions
@@ -0,0 +1,10 @@
"""Torch-free exceptions shared by the HTTP layer and the engine."""
class OutOfMemory(RuntimeError):
"""The engine ran out of GPU memory during a call and has already released its cache (INV-4)."""
class ScoringFailed(RuntimeError):
"""A call failed for a reason other than validation or OOM. Raised unchained, after the failed
call's memory has been released; the original traceback is logged, not carried (INV-4)."""