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.18, long-document callout for laya-multilingual
Nandakishor84ca7240348e
diff --git a/README.md b/README.mdindex ec72b63d..304c1162 100644--- a/README.md+++ b/README.md@@ -31,6 +31,14 @@ Python 3.10 or newer. Optional extras: `laya[serve]` (HTTP server), `laya[mcp]`## Quickstart+> **Long documents: `laya-multilingual` reads up to 8,192 tokens.** It ships with a 1,024-token limit; raise it per call:+>+> ```python+> result = router.predict(long_document, questions, model="multilingual", max_len=8192)+> ```+>+> **Accuracy does not drop.** Short inputs give identical answers at either limit. On long inputs it improves: with the request placed after about 6,300 tokens of other text, 8 of 10 test requests were answered correctly at 8,192, against 3 of 10 at the default limit, which cuts the request off. **Speed:** short inputs run at the same speed, because the cost follows the input's real length, not the limit. Long inputs take longer in proportion to their length: a 6,300-token input took 2.5 s instead of 0.18 s on an Apple GPU (8 s instead of 0.35 s on CPU). Name the checkpoint with `model="multilingual"`, since long mostly-English text would otherwise route to the English checkpoint.+```pythonfrom laya import Router@@ -76,8 +84,9 @@ 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.3.17+## What's new in 0.3.18+* **Long documents on `laya-multilingual`.** The Quickstart now shows how to read up to 8,192 tokens with `max_len=8192`, with measured speed and accuracy.* **Installation, quickstart and documentation first.** This README now opens with how to install Laya, runnable English and multilingual examples, how fine-tuning improves accuracy, and where the docs are.* **Documentation site** at [nandhakishorm.github.io/laya](https://nandhakishorm.github.io/laya/), with an API reference generated from the docstrings.@@ -100,7 +109,7 @@ Three checkpoints, and a `Router` that picks between them per request:| | encoder | params | context | use it for ||---|---|---|---|---|| [`laya`](https://huggingface.co/convaiinnovations/laya) | ModernBERT-large | 421M | 512 | English |-| [`laya-multilingual`](https://huggingface.co/convaiinnovations/laya-multilingual) | mmBERT-base | 322M | 1024 | 100+ languages, 2x faster |+| [`laya-multilingual`](https://huggingface.co/convaiinnovations/laya-multilingual) | mmBERT-base | 322M | 1024 (up to 8,192) | 100+ languages, 2x faster || [`laya-typed-decisions`](https://huggingface.co/convaiinnovations/laya-typed-decisions) | ModernBERT-large | 421M | 1024 | the typed-decisions workflows |diff --git a/laya/__init__.py b/laya/__init__.pyindex d96504ab..e5dc80df 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.17"+__version__ = "0.3.18"# 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 c4ab3bb6..2776fed6 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "laya"-version = "0.3.17"+version = "0.3.18"description = "Fast, non-autoregressive System 1 decision engine with calibrated probabilities"readme = "README.md"requires-python = ">=3.10"