Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.
Python calibrationclassificationdecision-modelhuggingfacejevmodernbertmultilingualnlppythonpytorchroutingtyped-decisionszero-shot
docs(examples): the marker guard no longer re-renders the options
Nandakishor37d7a36dda82
diff --git a/examples/39_error_handling.py b/examples/39_error_handling.pyindex 5e85e19d..d42259c7 100644--- a/examples/39_error_handling.py+++ b/examples/39_error_handling.py@@ -81,7 +81,7 @@ for name, criteria in (("120 options", VERY_LARGE), ("160 options", LARGE)):% (name, answer["choice"], answer["confidence"]))except ValueError as e:print(" %s -> raised ValueError: %s" % (name, e))-print(" -> the guard is `len(markers) != len(render_options(q))`: markers past max_len are")+print(" -> the guard is `len(markers) != stats['options']`: markers past max_len are")print(" dropped, so it fires only when whole option blocks fall out of the window. 120")print(" options slip through with a tiny per-label budget -- low accuracy, no warning.")diff --git a/tests/test_load_errors.py b/tests/test_load_errors.pyindex 76e73d6c..57a0e687 100644--- a/tests/test_load_errors.py+++ b/tests/test_load_errors.py@@ -366,13 +366,20 @@ check_true("39/what it reports is the question, as the page says","'q'" in SECTION.get(3, ""), SECTION.get(3, "")[:120])# case 4 quotes the guard as an expression, so the expression has to be the code's -- under any-# name `render_options` is bound to, and any name its count is stored in.-_assign = re.search(r"(\w+) = len\(render_options\((\w+)\)\)", AGENT_SRC)+# name the option count is read from, and any name it is stored in. #1231 moved the right-hand+# side from `len(render_options(q))` to the count `build_head` already returned, so the pattern+# reads the assignment rather than naming one source.+_assign = re.search(r"(\w+) = (stats\[.options.\]|len\(render_options\(\w+\)\))", AGENT_SRC)check_true("39/the guard it quotes is the guard the code compares",_assign is not None and "len(markers) != %s:" % _assign.group(1) in AGENT_SRC,AGENT_SRC[AGENT_SRC.find("len(markers)"):][:60] if "len(markers)" in AGENT_SRC else "")+# Quote style is the example's to choose: it prints the expression inside a double-quoted+# `print`, so `stats['options']` there is the same expression as `stats["options"]` here.+_bare = lambda text: text.replace('"', "").replace("'", "")check_true("39/quoted rather than paraphrased",- "len(markers)" in PROSE and "render_options" in PROSE, "")+ "len(markers)" in PROSE and _assign is not None+ and _bare(_assign.group(2)) in _bare(PROSE),+ PROSE[PROSE.find("len(markers)"):][:90] if "len(markers)" in PROSE else "")# the crash class, statically: `MODELS` values can be `(repo, subfolder)` (witnessed above), so no# filesystem call may take one, and the missing-path case must come from `LOCAL_MODELS`.