๐ŸŽฏ community demo ยท convaiinnovations/laya

Laya: Decisions, Not Text

A multilingual, non-autoregressive System 1 decision engine. Give it a state and typed questions โ€” it returns typed answers with calibrated probabilities in a single forward pass. It never generates text, so there is nothing to parse and nothing to hallucinate.

~33 ms
one question, T4
1 pass
all questions at once
421M
params ยท ModernBERT-large
100+
languages via Router
Apache-2.0
open weights

Three question types, typed answers

Every question carries its own answer space, so the model returns a typed answer โ€” never prose to parse, never a hallucination to audit.

typequestion it askswhat you get back
choicewhich of these options?the option, a probability per option, confidence
scorewhere on this rubric?a position along your levels, probabilities, confidence
noulis this true?the probability that it is

One request, one pass

state

text, email, ticket or JSON document โ€” anything serializable

๏ผ‹

questions

typed questions, each with its own options or rubric

โ†’

one pass

a single forward pass answers everything โ€” no generation loop

โ†’

answers

typed values, calibrated probabilities, confidence per question

Request

the same shape as the laya Python API
state = {"ticket": {"subject": "Duplicate charge", "text": "I was charged twice for order A-104. Please refund the duplicate."}, "refund_policy": "Duplicate charges are refundable."} questions = { "refund_requested": { "type": "noul", "instructions": "Does the text request a refund?"}, "department": { "type": "choice", "instructions": "Which team handles it?", "criteria": {"billing": "payments", "technical": "bugs", "sales": "pricing"}}}

Answer

typed, with probabilities โ€” nothing to parse
{ "refund_requested": { "type": "noul", "noul": 0.97 }, "department": { "type": "choice", "choice": "billing", "probabilities": { "billing": 0.93, "technical": 0.04, "sales": 0.03}, "confidence": 0.88 } }

What people build with it

Every pattern below is a single call; the action is plain code reading the numbers โ€” thresholds live in your app, not in the model. Try each one live in the official demo Space.

triage

Support triage

Intent, urgency, frustration, churn risk โ€” one call, then route or escalate on your thresholds.

email

Email & phishing

Category, spam, phishing, urgency, reply-expected in a single pass; quarantine on probability.

guardrails

LLM guardrails

Screen prompts for jailbreak, injection, sensitive data and harm before they reach an expensive LLM.

RAG

RAG passage filter

Score retrieved passages for relevance, contradiction and hidden instructions; keep what earns its place.

moderation

Moderation

Toxicity, harassment, threats, spam and severity with a composite score for remove / review / allow.

routing

Model routing

Difficulty, domain, tool-need and sensitivity decide the cheapest capable model per request.

Why calibrated probabilities matter

  • Trained with RL against strictly proper scoring rules โ€” the only way to maximize reward is to report honest probabilities
  • Confidence is 1 โˆ’ normalized entropy: a real signal, not a vibe
  • Gate automation on it: below your threshold, escalate to a human
  • No text generation โ‡’ nothing to parse, nothing to hallucinate
  • ~33 ms per question, ~7 ms/question batched (T4)
  • Open weights (Apache-2.0), self-hostable: pip install laya

Three checkpoints, one Router

checkpointencoderparamscontextbest at
layaModernBERT-large421M512English
laya-multilingualmmBERT-base322M1024100+ languages, ~2ร— faster
laya-typed-decisionsModernBERT-large421M1024typed-decisions workflows

The Router detects script and language in <0.5 ms and dispatches before the forward pass โ€” because a model's own confidence gives no warning when it cannot read the input.

Run it yourself

Python

pip install laya
from laya import Router router = Router(preload=True) result = router.predict( state, questions) # one pass, # typed answers

Transformers pipeline

weights straight from the Hub
from transformers import pipeline pipe = pipeline( "text-classification", model="convaiinnovations /laya")