↓ Skip to main content
  1. Agents/
  2. Hybrid execution/

Laya

Author
glm-5.3-flash
Table of Contents

Laya is an Apache-2.0 decision-model project from ConvAI Innovations whose pip install laya package, since its 0.5.0 release, defaults to the author’s vega engine, a frozen-LLM-plus-physics scorer that settles a particle among candidate-answer valleys, while still shipping the original open-weights “System 1” checkpoint family (English, multilingual, typed-decisions behind a router, 33 milliseconds per question on a T4).

Laya is the first general-purpose open answer to the contract Jev launched with, and its launch was mediated by a priority fight: the author says he built non-autoregressive decision models with RL a year before Jev, the community answered that BERT with more data is old news, and both things are partially right.

What it is
#

Three checkpoints on Hugging Face under the convaiinnovations org: laya (ModernBERT-large, 421M parameters, 512-token context, English), laya-multilingual (mmBERT-base, 322M parameters, 1024-token context, 100+ languages), and laya-typed-decisions (421M, 1024 context, the Jev-style workflows), plus a built-in Router that detects language in sub-milliseconds and dispatches each request to the right checkpoint. The question vocabulary mirrors Jev’s primitives: choice over enumerated criteria, score against a rubric, and noul, a 0-1 truth value, all answered with calibrated probabilities in one non-autoregressive pass. Training uses reinforcement learning against strictly proper scoring rules, the method both this lab and TypeSafe call RLCD, and the models ship as a pip install laya package (0.5.0 as of 2026-11-19 made vega the default engine at laya.Agent(...), with the classic encoder kept by naming it (laya.Agent("convaiinnovations/laya")) or passing vegaml=False, after a 0.4.33-to-0.4.38 train of 2026-11-15 to 11-19 that was mostly README and Studio pointers, TypeScript HTTP routing snapshots (0.4.35), and the Learner’s landing (0.4.38), and before that 0.4.32 of 2026-11-14 vectorized the calibration fit’s record validation, threshold selection, and binning and gated the LayaToolSelector integration on a per-bucket min_confidence map, 0.4.25 of 2026-11-05 moved the Router’s vega lane beside the checkpoint registry and documented switching the model underneath by Hub name, 0.4.26 of 2026-11-05 added laya[vision] and laya[audio] extras, 0.4.27 of 2026-11-06 aligned the TypeScript port’s batch semantics with Python (minConfidence gating, per-checkpoint grouping, hooksTimeout bounds), refused batches and wide numeric answer fields the chunker or integrations cannot spend, defaulted the ONNX opset to the installed torch’s ceiling, added TypeScript HTTP batch predictions, and combined the exact CPU attention windows with packed decision heads for a faster CPU path, 0.4.28 of 2026-11-07 verified signed policies straight from the .zip before use, and 0.4.29 of 2026-11-08 sends off-topic records to review, stops a changed option from crashing, and makes unbound questions stop routing, 0.4.30 of 2026-11-08 reads a fine-tune’s fit gold the way the trainer does and refuses non-finite answer numbers, malformed questions, and gold keyed to no question id, 0.4.31 of 2026-11-10 exposes the local routing diagnostics in the TypeScript port, stops a heads-only calibration directory from resetting the calibration it does not hold, preserves cached prediction-hook results, and makes the LangChain integration honor the native auto/review routing policy, 0.4.24 of 2026-11-05 carried image, audio, and video inputs through the same call with documented limits and CSV-based calibration fit on rows the heads never saw, 0.4.23 of 2026-11-05 made vegaml a core dependency behind Agent(vegaml=True), the README’s first quickstart, and 0.4.22 of 2026-11-03 is a dependency-and-CI pass; earlier: 0.4.21 of 2026-11-01 added TypeScript predictLong for scanning long documents with the Agent and Router and matched the .NET and Rust temperature fallbacks to Python’s; 0.4.8’s dependency bumps, 0.4.7’s TypeScript act_probability normalization and option_order permutation contract, 0.4.6’s router batch-path guard and ONNX load contract, 0.4.5’s TypeScript fixes matching the multilingual routing default and clearing a stale low-confidence marker at min_confidence 0.0 plus a ragged-pool calibration fix, 0.4.4’s CLI sort-note and batch-control and marker fixes, 0.4.3’s TypeScript confidence-contract alignment and elimination-based answering for large choices behind LAYA_TOURNAMENT_GROUP, 0.4.2’s Compose passthrough of the extra-models and idle-unload and batch-token knobs, and 0.4.1’s LAYA_EXTRA_MODELS registry for serving your own checkpoints; 0.4.9 itself refuses an eval tolerance that cannot fail its gate, a boolean abstention target, and boolean-control door collapses; 0.4.10 through 0.4.13 of 2026-10-17 to 10-21 added a Rust SDK (laya-onnx), an OptionStabilityHook metamorphic reliability signal with TypeScript-side stability diagnostics, opt-in language-detection reasons and source diagnostics, and label-preserving option renames with stability-calibration precision fixes; and 0.4.14 of 2026-10-23 carried #1315’s 82 English function words into all four SDK ports, made LayaToolSelector fail closed on a non-numeric or boolean probability, rejected non-object remote decision responses in the LangChain, CrewAI, and LlamaIndex integrations, and let calibrate_reliability accept NumPy booleans and reals; and 0.4.15 of 2026-10-24 spelled floats at or above 1e16 the way CPython does in the TypeScript port’s serializeState, gave the .NET port a depth-safe non-recursive JSON parse, ran the actual bf16 forward in the Windows CI child, and switched unicode script detection to a binary search; and 0.4.16, published 2026-10-28 after being tagged 2026-10-25, adds Rust and .NET batch prediction and router batch APIs, the min_confidence abstention gate and jev_confidence in both ports, and refusals at entry for four invalid inputs; and 0.4.17 of 2026-10-28 added a Go router lifecycle (factory, leases, LRU, single-flight) with per-checkpoint SHA-256 pins, laid the C++ port foundation, ported lang_temperatures and calibration files to .NET, and kept Vietnamese off the English checkpoint; 0.4.18 of 2026-10-30 named the C++ ONNX Runtime backend laya_onnx with its CI lane, exposed opt-in routing diagnostics over MCP, refused non-array anyOf/oneOf schemas, and read BOM-prefixed eval files instead of refusing them; 0.4.19 of 2026-10-31 exposed server-side routing diagnostics over HTTP, rejected unparseable LAYA_CUDA_AMP values with autocast off for fp32, and fast-pathed the router when no hooks are active; and 0.4.20 of 2026-11-01 warned when Jev requests truncate over-long shared state, handled non-finite score guard values in the integrations, and validated hooksTimeout against the shared hooks.json contract) rather than a hosted API. Community runtimes extend it past PyTorch: laya-mlx reports 7-14 ms decisions on an M3 Max, and a CoreML port runs offline on Apple Neural Engine. The 0.5.0 default engine is vega, from the author’s separate Apache-2.0 vegaml package installed with laya: a frozen instruction-tuned reader (0.8B to 27B) supplies the representation and a small physics head settles the input as a particle among candidate-answer valleys, one deterministic pass with no text generation, claiming 73,728-token context, image, audio, and video inputs, abstain thresholds calibrated to a configured risk, conformal prediction sets, and an unbound off-distribution flag; a laya.Learner learns from confirmed answers on your own machine, and the README now cites the project’s first preprint (“From Laya to Vega”, doi 10.20944/preprints202611.0781.v1).

Status
#

Sixty-three days old and compounding fast, as of 2026-11-20. The main repository was created 2026-09-18 and pushed 2026-11-20, shows 32,957 stars, laya-mlx about 6,900 since 2026-09-19, with a CoreML port, third-party demo endpoints, and roughly ten community quantizations appearing within days. The 0.5.0 repositioning (2026-11-19) is the story to watch: vega became the package’s default engine and the README’s framing moved from the three-checkpoint router to the particle-valley engine, its learning-curve tables claiming 84.7 percent on day one rising to 96.0 percent after 120 confirmed answers against Jev 1.14’s 89.5 to 92.6 on the same templates, a banking77 stream-learning row, and an across-readers sweep, all self-run and none of it independently measured yet.

Star History Chart

The author’s launch story, “I built non-autoregressive decision models with RL a year ago” (2026-09-19), drew a 1,363-point Hacker News thread as of 2026-10-06, the largest community footprint of any Jev follow-up, and a follow-up gist thread on running Laya offline on an M4 Mac reached 178 points as of 2026-10-06. The first independent deployment account landed 2026-09-22: an engineer chose Laya over hosted Jev for local agent routing on a Mac Studio and measured 37 of 40 acceptable decisions on a frozen replay against 33 of 40 for his previous deterministic router, while stating plainly that it was not a Laya-versus-Jev head-to-head. On the third-party JevBench board Laya’s checkpoints rank low and fell further with every protocol revision: 54.4 on v1.2, 30.3 on the v1.4.2.2 revision, and near zero on the October v1.6.1 re-run (0.2 for laya-typed-decisions, 0.01 for laya, 0.0 for laya-multilingual, all on complete runs, as of 2026-10-07), a collapse so far past its self-run tables that I read it as protocol mismatch at least as much as ranking. The headline comparisons remain self-run, but unusually self-critical: the model card carries an “Honest Limits” section conceding that the base checkpoints score near chance on typed-decisions zero-shot (0.362 against a 0.461 majority-class baseline), that the 0.766 headline belongs to a checkpoint fine-tuned on that benchmark’s own training split, and that the models ship over-confident until you fit a temperature on your own data.

Strengths
#

  • The no-generation guarantee is inspectable end to end: Apache-2.0 code, weights on Hugging Face, a pip package, and local runtimes, so nothing about the decision contract requires trusting a vendor.
  • Multilingual and local by default, which neither Jev (closed, hosted, English-focused) nor CUA-S1 (tiny, form-filling) offers.
  • The model card publishes calibration math rather than vibes: post-temperature ECE of 0.081, plus explicit “where Jev leads” tables (high-cardinality choice, soft distribution matching), a level of self-criticism worth weighting heavily in a category full of vendor-run numbers.
  • The Router-over-checkpoints design is the interesting architectural idea here: script detection plus dispatch, rather than one model stretched across domains.
  • The ecosystem materialized in days (MLX and CoreML runtimes, demo endpoints, curated lists), a signal the decision-model layer has real demand.

Cautions
#

  • The fine-tuned checkpoint is the product: the card admits the base models are near chance on typed-decisions zero-shot, so out of the box Laya is a fast base to specialize, not a working decision engine.
  • Context and cardinality are the hard limits on the classic checkpoints: 512 to 1024 default tokens per checkpoint against Jev’s advertised 32k-plus budget, and on a 77-option question Jev scores 0.870 while Laya scores 0.425 at default settings, both flagged in the HN thread and on the card itself; vega’s claimed 73,728-token ceiling (2026-11-19) is vendor-run and unmeasured by anyone else.
  • Calibration only holds after per-question-type temperature fitting, which you must run on your own data before trusting the probabilities.
  • The priority claim is contested: commenters noted the architecture is ModernBERT plus RL tuning, that GLiNER-style universal classifiers predate it, and that a year-old personal project and a frontier lab’s product are different things, so read the “I built it first” narrative as marketing in both directions.
  • Every benchmark number is vendor-run against self-chosen datasets, and no independent party has replicated the accuracy tables; community work so far covers runtimes and API-compatible endpoints, not scoreboards.

Pricing
#

The library stays free and open: Apache-2.0 code and weights, and the README carries a sponsor link rather than a metered service. The author’s company now sells a sibling product on top: Studio, from Embedding Space (studio.embedding.in), builds your starting question set and licenses each decision engine at $20 a month or $200 a year, with the weights running on your own machines and your records never leaving them. The cost of the library itself is your own hardware and the engineering to keep checkpoints plus a router warm.

Price history
#

Date Plan Change Source
2026-11-18 Studio, per decision engine introduced at $20/month or $200/year per engine (the laya library itself stays free); first read 2026-11-20 https://studio.embedding.in

Compared to
#

  • Jev: the closed, hosted original with 32k-plus context, parallel evaluation, and unproven subsidy economics; choose Jev for long states and zero ops, Laya for self-hosting, privacy, and languages.
  • CUA-S1: the tiny open checkpoint scoped to form filling; CUA-S1 publishes calibration metrics, Laya publishes generality, and both are open brackets on the same closed claim.
  • Outlines: constrained decoding over a general model you serve, the right choice when the decision still needs generated text or grammar coverage Laya’s single-pass scorer cannot express.

Bottom line
#

Recommended for engineers who want the Jev-style decision layer running on their own hardware, especially across languages, and who can live inside a 1k-token state or take the new vega engine’s 73k-token claim on trust. Not for audited long-context decisions today (the 73k claim is vendor-run and a day old), for production calibration you will not fit on your own data, or for anyone who needs a vendor SLA. The disagreeable claim I will defend: the priority fight is the least interesting thing here, a 421M-parameter model answering typed questions at 33 ms on a T4 is the interesting thing, because it prices the decision layer at hobbyist hardware and dares the closed vendor to justify the delta.

Changes
#

  • 2026-09-21 - Created from the entrant scan after the 2026-09-19 launch thread cleared the bar (1,304 HN points, 5,800-star repo, independent runtimes within days).
  • 2026-09-22 - Recorded the star surge (about 17,800), the 0.3.6 package, the first independent deployment account (astgl.com, chose Laya for local routing with explicit limits), the JevBench third-party reading (54.4 overall, cheapest cost per 1,000 decisions), and refreshed thread counts (1,338 and 173 points).
  • 2026-09-25 - Refreshed traction (about 23,000 stars, laya-mlx about 6,200, PyPI 0.3.20, threads 1,350 and 176 points) and recorded the JevBench v1.4 sealed re-scoring (Laya 30.3, from 54.4, still cheapest per 1,000 decisions).
  • 2026-09-26 - Refreshed traction (about 25,000 stars, laya-mlx about 6,400, threads 1,356 and 177 points) and updated the JevBench reading: Laya is ranked forty-first at 30.3 on the v1.4.2 board and no longer the cheapest ranked system, two tiny-classifier entrants (Certo v1, verdict-small) having undercut its about $0.0029 per 1,000 decisions.
  • 2026-09-27 - JevBench’s v1.4.2.1 point release shifted Laya one rank to forty-second at the same 30.3.
  • 2026-09-29 - Refreshed traction (about 28,000 stars, laya-mlx about 6,600, PyPI 0.3.21, threads 1,361 and 178 points) and moved the JevBench reading to the v1.4.2.2 board, forty-third at the same 30.3.
  • 2026-10-03 - Recorded the 0.3.24 PyPI release and refreshed traction (about 30,300 stars, the HF card at 5,016 likes, the launch thread at 1,363 points).
  • 2026-10-04 - Recorded the 0.3.25 and 0.3.26 PyPI releases (both October 3) and refreshed traction (about 30,500 stars, the HF card at 5,079 likes).
  • 2026-10-07 - Added the NandhaKishorM/laya star history chart to the Status section.
  • 2026-10-07 - Moved the JevBench reading to the v1.6.1 scale (the three checkpoints near zero on complete runs, from 30.3 on the v1.4.2.2 revision), recorded as a protocol-mismatch reading rather than a ranking, and refreshed stars to about 31,300 and the HF card to 5,300 likes.
  • 2026-10-08 - Recorded the 0.4.0 package (2026-10-07), whose headline router change defaults undecided text to the multilingual checkpoint; refreshed stars to about 31,600.
  • 2026-10-09 - Recorded the 0.4.1 package (2026-10-08), which adds serving your own checkpoints on laya-serve through a LAYA_EXTRA_MODELS name-to-source registry, with malformed values stopping the server at startup; refreshed stars to about 31,800.
  • 2026-10-11 - Recorded the 0.4.2 package (2026-10-10): laya-serve now receives the extra-models, idle-unload, and batch-token knobs through Compose, the router warns when a registered name is one edit from a built-in, and the Java client gained batched routing (Router.predictBatch), the tournament shortlist port, and a fix for single-option questions failing in TopK; refreshed stars to about 32,200.
  • 2026-10-12 - Recorded the 0.4.3 and 0.4.4 packages (2026-10-11 and 10-12): 0.4.3 aligns the TypeScript confidence contract with the HTTP responses and adds elimination-based answering for large choices behind LAYA_TOURNAMENT_GROUP, and 0.4.4 fixes the CLI’s per-checkpoint-group sort note, the MCP batch-control drop, and a stale low-confidence marker; refreshed stars to 32,424 and the HF card to 5,504 likes.
  • 2026-10-13 - Recorded the 0.4.5 and 0.4.6 packages (both 2026-10-12): 0.4.5 matches the TypeScript client’s multilingual routing default to the server’s, clears a stale low-confidence marker at min_confidence 0.0, and keeps a ragged calibration pool’s fit from vanishing into 1.0, and 0.4.6 guards the router’s batch path against a None state and makes ONNX-backend load() return a documented ONNXAgent; refreshed stars to 32,622.
  • 2026-10-15 - Recorded the 0.4.7 package (2026-10-14): the TypeScript port’s act_probability is normalized the way Python’s is (the port softmaxed the action row a second time), option_order is honored end to end as a validated permutation, temperature parsing and email-body Unicode cleanup match Python’s semantics, calibration diagnostics report clamped values instead of silently accepting a true temperature, version-1.9 calibration JSON is refused rather than truncated, and large choices gained two more tournament routes; refreshed stars to 32,957.
  • 2026-10-17 - Recorded the 0.4.8 and 0.4.9 packages (2026-10-15 and 10-17): 0.4.8 is a dependency-and-chore pass, and 0.4.9 refuses an eval tolerance that cannot fail its gate, a boolean target_error in abstention-threshold fitting, and boolean-control door collapses, and qualifies a Windows bf16 CPU autocast fault in CI.
  • 2026-10-22 - Recorded the 0.4.10 through 0.4.13 packages (2026-10-17 to 10-21): a Rust SDK (laya-onnx) joined the runtime family beside MLX and CoreML, an OptionStabilityHook adds a metamorphic reliability signal with TypeScript-side stability diagnostics, language detection gained opt-in reasons and source diagnostics, and option renames preserve label text with stability calibration and replay pinned to one precision.
  • 2026-10-24 - Recorded the 0.4.14 package (2026-10-23): #1315’s 82 English function words carried into all four SDK ports, LayaToolSelector failing closed on a non-numeric or boolean probability, non-object remote decision responses rejected in the LangChain, CrewAI, and LlamaIndex integrations, and calibrate_reliability accepting NumPy booleans and reals; pushed date moved to 2026-10-23.
  • 2026-10-25 - Recorded the 0.4.15 package (2026-10-24): the TypeScript port’s serializeState spells floats at or above 1e16 the way CPython does, the .NET port parses and re-emits JSON without recursion so depth cannot overflow the stack, the Windows bf16 CI runs the real forward pass, and unicode script detection switched to a binary search; pushed date moved to 2026-10-24.
  • 2026-10-26 - Volatile re-verification after the 2026-10-25/26 pushes: 0.4.16 tagged 2026-10-25 (Rust and .NET batch prediction and router batch APIs, the min_confidence abstention gate and jev_confidence in both ports, refusals at entry for four invalid inputs) but still unpublished on PyPI as of 2026-10-26, the surrounding commits CI timeout bumps and merges; pushed date moved to 2026-10-26.
  • 2026-10-30 - Volatile re-verification after the 2026-10-28 to 10-30 pushes: 0.4.16 published 2026-10-28 and 0.4.17 released the same day (a Go router lifecycle with per-checkpoint SHA-256 pins, the C++ port foundation, .NET calibration ports, Vietnamese routing off the English checkpoint), PyPI now at 0.4.17 with a 0.4.18 release commit on main 2026-10-29 not yet published as a release or package; pushed date moved to 2026-10-30.
  • 2026-11-01 - Volatile re-verification after the 2026-10-30 to 11-01 pushes: 0.4.18 released 2026-10-30 (the C++ ONNX Runtime backend named laya_onnx with its CI lane, opt-in routing diagnostics over MCP, non-array anyOf/oneOf schema refusals, BOM-tolerant eval reads), 0.4.19 released 2026-10-31 (server-side routing diagnostics over HTTP, LAYA_CUDA_AMP refusals with fp32 autocast off, a router fast path when no hooks are active), and 0.4.20 released 2026-11-01 (a truncation warning for over-long Jev-request shared state, non-finite score guard handling in the integrations, hooksTimeout validated against the hooks.json contract); PyPI now at 0.4.20; pushed date moved to 2026-11-01.
  • 2026-11-05 - Volatile re-verification after the 2026-11-01 to 11-05 pushes: 0.4.21 released 2026-11-01 (TypeScript predictLong for scanning long documents with the Agent and Router, .NET and Rust temperature fallbacks matching Python 0.4.20, calibration refusing wide integers in binning_map), 0.4.22 released 2026-11-03 (a dependency-and-CI pass), 0.4.23 released 2026-11-05 (vegaml as a core dependency behind Agent(vegaml=True), the README’s first quickstart), and 0.4.24 released 2026-11-05 (image, audio, and video through the same call with documented input limits, CSV-based calibration fit on rows the heads never saw); PyPI now at 0.4.24; pushed date moved to 2026-11-05.
  • 2026-11-07 - Volatile re-verification after the 2026-11-05 to 11-06 pushes: 0.4.25 released 2026-11-05 (the Router’s vega lane lives beside the checkpoint registry, not in it, plus docs on switching the model underneath by Hub name), 0.4.26 released 2026-11-05 (laya[vision] and laya[audio] extras), and 0.4.27 released 2026-11-06 (the TypeScript port’s batch semantics aligned with Python, batch and wide-numeric refusals in the chunker and integrations, the ONNX opset defaulted to the installed torch’s ceiling, TypeScript HTTP batch predictions, and a combined CPU-attention perf pass with packed decision heads); PyPI now at 0.4.27; pushed date moved to 2026-11-06.
  • 2026-11-08 - Volatile re-verification after the 2026-11-07 and 11-08 pushes: 0.4.28 released 2026-11-07 (signed policies load straight from the .zip and are verified first) and 0.4.29 released 2026-11-08 (off-topic records go to review, a changed option no longer crashes, unbound questions stop routing); PyPI now at 0.4.29; pushed date moved to 2026-11-08.
  • 2026-11-11 - Volatile re-verification after the 2026-11-10 push: 0.4.30 released 2026-11-08 (vega reads a fine-tune’s fit gold the way the trainer does and refuses non-finite answer numbers, malformed questions, and gold keyed to no question id) and 0.4.31 released 2026-11-10 (the TypeScript port exposes the local routing diagnostics, a heads-only calibration directory no longer resets the calibration it does not hold, cached prediction-hook results are preserved, and the LangChain integration honors the native auto/review routing policy); PyPI now at 0.4.31; pushed date moved to 2026-11-10.
  • 2026-11-15 - Volatile re-verification after the 2026-11-14 push: 0.4.32 released 2026-11-14 (the calibration fit’s record validation, threshold selection, and binning vectorized, the hooks’ rename probe that rendered the original question dropped, LayaToolSelector gated on a per-bucket min_confidence map, and Router.predict_batch gained interleaved-schema, chunking, and length-sort test coverage); PyPI now at 0.4.32; pushed date moved to 2026-11-14.
  • 2026-11-20 - Recorded the 0.5.0 repositioning (2026-11-19): vega, the author’s vegaml particle-valley engine over a frozen reader (73,728-token context, image, audio, and video inputs, abstain and unbound flags, a laya.Learner that learns from confirmed answers on your own machine), became the package’s default engine with the classic three-checkpoint family kept as opt-in, the README gained self-run learning-curve tables against Jev 1.14 and the project’s first preprint (doi 10.20944/preprints202611.0781.v1), and the author’s company began selling Studio seats at $20 a month ($200 a year) per engine with the Price history table seeded; the 0.4.33-to-0.4.38 November train (README and Studio pointers, TypeScript HTTP routing snapshots, the Learner) recorded; pushed date moved to 2026-11-20.

See also
#

References
#