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.4.20
Nandakishor03179e818f59
diff --git a/README.md b/README.mdindex dee16061..15539f7e 100644--- a/README.md+++ b/README.md@@ -94,19 +94,24 @@ The shipped checkpoints work zero-shot, but fine-tuning on decisions from your o**[nandhakishorm.github.io/laya](https://nandhakishorm.github.io/laya/)**: guides for [prediction hooks](https://nandhakishorm.github.io/laya/hooks/), [schema-driven decisions](https://nandhakishorm.github.io/laya/structured/), [Docker](https://nandhakishorm.github.io/laya/docker/) and [LangChain and LangGraph](https://nandhakishorm.github.io/laya/langchain/), plus a full [API reference](https://nandhakishorm.github.io/laya/reference/).-## What's new in 0.4.19--* **Routing snapshots over HTTP.** `POST /v1/route` returns the model, repo and reason a request- would route to without running inference or loading a checkpoint. It shares the inference worker- but deliberately not the idle clock, so polling diagnostics cannot keep a server resident, and it- withholds the detection mapping because that copies caller text verbatim (#1422).-* **`LAYA_CUDA_AMP` accepts `fp32` and refuses a typo.** Full precision is now selectable, and a- value that does not parse fails the load instead of silently serving the checkpoint's own dtype.- The value is trimmed, so a stray space no longer changes the precision you get (#1424).-* **Routing skips the hook machinery when nothing is listening.** `route` and `route_batch` build- no context and draw no OS entropy unless a hook actually implements `on_route`, and a Router- subclass that overrides `route` still goes through it (#1386).-* **Every CI job is bounded.** The TypeScript SDK job was the last one without a timeout (#1423).+## What's new in 0.4.20++* **A guardrail no longer passes an answer it cannot score.** A `probabilities` value of `NaN` or+ `-Infinity` made `score_violation_probability` return a non-finite number, and every threshold+ comparison against it is false, so the integration guards reported such an answer as passing. The+ non-finite cases now take the same normalised-score fallback a malformed answer already took, and+ a probability too wide for a double falls back instead of raising (#1431).+* **A truncated state is visible even under `LAYA_JEV_STRICT`.** `laya-serve` logs one warning when+ a request drops state tokens, and one aggregate line per batch naming which results were cut. It+ logs before the strict projection removes `usage.truncated`, which is the only mode where the+ response carried no sign of the cut (#1426).+* **A temperature too wide for a double falls back to 1.0.** JSON has no double limit, so a+ temperature written as a 401-digit integer parses as an `int` that `float()` refuses; the clamp+ now reads that as "not a number" like every other unreadable value, instead of raising after the+ checkpoint was already read off disk (#1433).+* **`laya-ts` validates `hooksTimeout`.** The port installed deadlines the Python reference refuses,+ including an instant one for `hooksTimeout: 0`, and silently skipped the deadline for a value+ arriving from a config body as a string, bool or object (#1432).Earlier releases are in the [GitHub releases](https://github.com/NandhaKishorM/laya/releases).diff --git a/laya/__init__.py b/laya/__init__.pyindex 99fccb8a..b3453b48 100644--- a/laya/__init__.py+++ b/laya/__init__.py@@ -35,7 +35,7 @@ from .presets import (from .router import DEFAULT_MODELS, RouteDecision, Routerfrom .structured import DecisionResult, decide, decide_batch-__version__ = "0.4.19"+__version__ = "0.4.20"# 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/nix/package.nix b/nix/package.nixindex aca5a384..00faf5b3 100644--- a/nix/package.nix+++ b/nix/package.nix@@ -12,7 +12,7 @@ let# side, where tests/test_packaging.py compares all three declarations (this one,# pyproject.toml and laya.__version__) and fails CI when they diverge. Nothing# did, which is how this sat at 0.3.4 while the package reached 0.3.20.- version = "0.4.19";+ version = "0.4.20";src = ../.;format = "setuptools";propagatedBuildInputs = with python3Packages; [diff --git a/pyproject.toml b/pyproject.tomlindex 99c603e6..41e9001e 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "laya"-version = "0.4.19"+version = "0.4.20"description = "Fast, non-autoregressive System 1 decision engine with calibrated probabilities"readme = "README.md"requires-python = ">=3.10"