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.

★ 35,325⑂ 3,168👁 122⑃ 1,202● 219▤ 63◈ 29
PythonApache-2.0Created 2026-09-18huggingface.co/convaiinnovations/laya
35,325
stars
+62+446+4,392
3,168
forks
122
watchers
1,202
prs
219
issues
63
releases
29
discussions

README

Cite this work. M, N.; M, A. From Laya to Vega: Open Non-Autoregressive Decision Models with Calibrated Probabilities. Preprints 2026, 2026110781. https://doi.org/10.20944/preprints202611.0781.v1


BibTeX

bibtex
@article{m2026laya_vega,
  title   = {From Laya to Vega: Open Non-Autoregressive Decision Models with Calibrated Probabilities},
  author  = {M, N. and M, A.},
  journal = {Preprints},
  year    = {2026},
  pages   = {2026110781},
  doi     = {10.20944/preprints202611.0781.v1},
  url     = {https://doi.org/10.20944/preprints202611.0781.v1}
}




Multilingual, non-autoregressive System 1 decision engine. Typed decisions over 100+ languages in a single forward pass — 33 ms — trained with reinforcement learning against strictly proper scoring rules (RLCD), with a router that picks the right checkpoint per request.















 Installation

bash
python -m pip install laya


With uv, run uv add laya in a uv project or uv pip install laya in a virtual environment.

Python 3.10 or newer. Optional extras: laya[serve] (HTTP server), laya[mcp] (MCP server), laya[langchain] (LangChain and LangGraph), laya[llamaindex] (LlamaIndex selectors), laya[crewai] (CrewAI routing), laya[onnx] (ONNX Runtime), laya[fast] (TileLang GPU fast path), laya[structured] (pydantic models in decide), laya[vision] (Pillow and torchvision, for predict(image=...) and predict(video=...)), laya[audio] (soundfile, to decode audio files). Step-by-step setup for each platform, CPU-only or GPU PyTorch builds, and troubleshooting are in Installation details.

For TypeScript / Node.js / browser, see laya-ts/. npm releases (npm install laya-ts) are published from this repository's laya-ts-v release tags.

Long documents. laya-multilingual reads up to 8,192 tokens with max_len=8192. Measured accuracy and time by document length, reproducible with research/scripts/bench_long_context.py:


  


 Quickstart

One argument puts vegaml's engine under laya's names: a frozen 0.8B reader with a small physics engine on top, so every answer carries a conformal prediction set, an abstain flag, an out-of-distribution flag and a route decided without a threshold you had to guess at. Text, images, speech and 73k-token documents go through the same call. Python 3.10 or newer; details in vega inside laya.

bash
python -m pip install -U laya    0.4.23 or newer: vegaml comes with it


python
import laya

agent = laya.Agent(vegaml=True)    the 0.8B universal reader (nandakishorm/vega-U), the default

 Switching the model underneath is one string. Every option keeps the same engine, questions and fields:
   laya.Agent(vegaml="4b")                                 the Qwen3.5-4B reader from the same Hub repo
   laya.Agent(vegaml="gemma-1b")                           the gemma-3-1b-it reader, same repo
   laya.Agent(vegaml="nandakishorm/vega-U")                any Hub repo id holding a vega-U checkpoint
   laya.Agent(vegaml="./my-reader/")                       a local dir from VegaAgent.attach(...), y

Top issues

Discussions

Latest release

v0.4.30 v0.4.30 2026-11-08
What's Changed
 fix(vega): read a fit gold the way laya's fine-tune reads it by @aashish254 in https://github.com/NandhaKishorM/laya/pull/1474
 fix(vega): refuse an answer number that is not finite before it becomes a decision by @aashish254 in https://github.com/NandhaKishorM/laya/pull/1475
 fix(vega): refuse a malformed question by name, through laya's own question check by @aashish254 in https://github.com/NandhaKishorM/laya/pull/1476
 fix(vega): a gold keyed to no question id is refused, not dropped by @aashish254 in https://github.com/NandhaKishorM/laya/pull/1477
 fix(video): a duration t

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON