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.21
Nandakishor8c42cf351274
diff --git a/README.md b/README.mdindex 15539f7e..efd02a3d 100644--- a/README.md+++ b/README.md@@ -94,24 +94,20 @@ 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.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).+## What's new in 0.4.21++* **`laya-ts` scans long documents locally.** `Agent.predictLong` and `Router.predictLong` size+ overlapping windows from the checkpoint budget, run the existing batch path, and keep the+ strongest per-question answer with its window of origin, matching Python's `predict_long`+ against committed parity fixtures (#1436).+* **A `binning_map` value wider than a double is refused by name.** `apply_calibration_payload`+ raised a raw `OverflowError` for a 401-digit integer where every other unreadable value got the+ named `values must be numbers` refusal; the wide integer now gets the same named refusal, in+ Python and the .NET port (#1440).+* **The .NET and Rust ports follow 0.4.20's temperature fallback.** A temperature too wide for a+ double loads as the neutral 1.0 with Python's warning instead of failing the load, and the+ .NET model-free lane is green again (#1437, #1438).+* **`laya-ts` runs on onnxruntime-web 1.31.1** (#1429).Earlier releases are in the [GitHub releases](https://github.com/NandhaKishorM/laya/releases).diff --git a/laya/__init__.py b/laya/__init__.pyindex b3453b48..ae097df1 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.20"+__version__ = "0.4.21"# 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 00faf5b3..fb985c82 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.20";+ version = "0.4.21";src = ../.;format = "setuptools";propagatedBuildInputs = with python3Packages; [diff --git a/pyproject.toml b/pyproject.tomlindex 41e9001e..23fb5a2d 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "laya"-version = "0.4.20"+version = "0.4.21"description = "Fast, non-autoregressive System 1 decision engine with calibrated probabilities"readme = "README.md"requires-python = ">=3.10"