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
release: 0.3.12
Nandakishor7e8fff3c82bd
diff --git a/README.md b/README.mdindex 12ff4f4c..be30f1ad 100644--- a/README.md+++ b/README.md@@ -34,6 +34,17 @@ Three checkpoints, and a `Router` that picks between them per request:| [`laya-multilingual`](https://huggingface.co/convaiinnovations/laya-multilingual) | mmBERT-base | 322M | 1024 | 100+ languages, 2x faster || [`laya-typed-decisions`](https://huggingface.co/convaiinnovations/laya-typed-decisions) | ModernBERT-large | 421M | 1024 | the typed-decisions workflows |+### What's new in 0.3.12++* **Correct routed batches.** `Router.predict_batch` now keeps two requests apart when their `choice` options are the same but in a different order, so every request gets the same answer as its own `predict` call (#166). The Router's predict hooks now run for every request in a batch, so a redaction hook also covers batched traffic.+* **Schema-driven decisions.** `agent.decide(state, schema=...)` takes a JSON schema or pydantic model and returns typed values in one forward pass.+* **Faster, same answers.** The state is tokenized once per call instead of once per question, `predict_batch(..., sort_by_length=True)` cuts padding work on mixed-length batches, and Apple GPUs use fp16 once a call has enough question rows.+* **More hooks.** `BaseHook` to subclass, and process-wide default hooks for tracers and metrics.+* **Per-language calibration.** `lang_temperatures=` lets you apply your own per-language temperatures, and the Router passes the detected language through. Nothing ships with values, so defaults are unchanged.+* **`answer_confidence`.** Every answer also reports `max(p)`, next to the existing `confidence`, which is unchanged.+* **Fixes.** A blank `lang=` now falls through to detection instead of pinning the multilingual checkpoint, `laya-serve` enforces its body-size limit on chunked uploads, and mixed-width training batches reject targets longer than their own options.+* **CLI, TypeScript and docs.** `laya "..." --preset triage`; `laya-ts` gains hooks, one-pass state tokenization, and routing and e-mail parity with Python; CONTRIBUTING, a code of conduct and issue templates; an API reference generated from docstrings.+### What's new in 0.3.11* **Routed batches.** `Router.predict_batch(requests)` routes each request, groups them by checkpoint and question set, and scores each group in shared forward passes, with answers identical to one `predict` call per request. Each request can set its own `model`, `task`, `lang` or `lang_guess`. See [Heterogeneous routed batches](#heterogeneous-routed-batches).diff --git a/laya/__init__.py b/laya/__init__.pyindex e726b6cc..e8b207ac 100644--- a/laya/__init__.py+++ b/laya/__init__.py@@ -14,7 +14,7 @@ from .presets import (from .router import DEFAULT_MODELS, RouteDecision, Routerfrom .structured import DecisionResult, decide-__version__ = "0.3.11"+__version__ = "0.3.12"# Routing, language detection and email cleaning are pure Python. The torch-backed names are# resolved lazily so that `import laya` -- and therefore `from laya import Router` ordiff --git a/pyproject.toml b/pyproject.tomlindex 67e7094d..09b35d4f 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "laya"-version = "0.3.11"+version = "0.3.12"description = "Fast, non-autoregressive System 1 decision engine with calibrated probabilities"readme = "README.md"requires-python = ">=3.10"