Laya for Python
The reference implementation of Laya is the `laya` package on PyPI, maintained by Convai Innovations under Apache 2.0. It ships three checkpoints, a Router that picks one per request by script and language, a CLI, an HTTP server and an optional MCP server.
696 projects
laya
NandhaKishorM
Runs multilingual typed-decision models and provides routing, serving, and integration options
laya-mlx
mizorewww
Runs Laya typed-decision models locally on Apple Silicon using MLX
laya
convaiinnovations
A multilingual-ready System 1 model that returns calibrated typed decisions over text in one pass
laya-coreml
mizorewww
Runs Laya typed-decision models locally on Apple Silicon using Core ML and the Neural Engine
openJev-verdict-2.0
Heman10x-NGU
Develops and benchmarks a non-autoregressive typed-decision model against Jev and Laya
laya-multilingual
convaiinnovations
A multilingual System 1 model that returns calibrated typed decisions over text in one pass
laya-demo
convaiinnovations
A Gradio demo for Laya typed decisions, multilingual routing, moderation, and RAG filtering
laya-ultrafast
ipenywis
Runs a browser automation agent using local Laya decisions through MLX
laya-playground
wdobry
A local website combines Laya model demos, games, a benchmark, and an agent skill
laya-typed-decisions
convaiinnovations
A Laya model fine-tuned for agent traces, customer service, invoices, and security incidents
laya-vs-jev
virajbhartiya
A side-by-side T-Rex game compares local Laya and hosted Jev decision models
laya-mlx
aac6fef
An MLX FP16 conversion of Laya for native inference on Apple silicon
jevals
openlayer-ai
Agent evaluation and guardrail tools run with local Laya, Kev, or hosted Jev
system1-agents
ThinkFlowLab
Prebuilt agents use Jev, Laya, or Cua-S1 for browser, computer, robotics, and game tasks
laya-vision
r33drichards
Adds calibrated image-and-text decisions to Laya using a compact vision-language backbone
laya-pilot
anthonyli
Generates and replays Excel browser tests using Playwright and local Laya decisions
laya-vs-jev-arena
PromptEngineer48
Pits locally run Laya against Jev in Snake and fighting games
arbiter
0xBakeer
Serves Laya and other typed-decision models locally with a Jev-compatible API
laya-jev-GraphRAG
bodepudimuneendra-netizen
Builds graph-based retrieval pipelines with swappable local Laya and cloud Jev decisions
stuntd
bladedevoff
Learns typed decision heads on a frozen Laya encoder and serves them through Jev- and OpenAI-compatible APIs
hermes-nerve
keeltrace
Adds typed decision oversight and tool gating to Hermes agents using Jev or self-hosted Laya
laya-mps
afshinm
Runs Laya typed-decision inference locally on Apple Silicon using Metal Performance Shaders
laya-browser
cklxx
Fine-tunes Laya as a browser-agent decision head for web navigation
laya-onnx
Mattepiu
Exports a fine-tuned Laya decision model to ONNX for Python and Node.js inference
Install
Python 3.10 or newer, per the core README:
python -m pip install laya
Optional extras: laya[serve] (HTTP server), laya[mcp] (MCP server), laya[langchain], laya[onnx] (ONNX Runtime) and laya[fast] (TileLang GPU fast path).
First decision
from laya import Router
router = Router() # downloads a checkpoint on first use
state = "Hi, we were billed twice for March. Please refund the duplicate today or we will cancel our plan."
questions = {
"department": {"type": "choice", "instructions": "Which department should handle this?",
"criteria": {"billing": "invoices, payments, refunds",
"technical": "bugs, outages, system errors",
"other": "everything else"}},
"urgency": {"type": "score", "instructions": "How urgent is this?",
"criteria": ["not urgent", "soon", "blocking"]},
"churn_risk": {"type": "noul", "instructions": "Does the user threaten to cancel or leave?"},
}
result = router.predict(state, questions)
print(result["answers"]["department"]["choice"]) # billing
print(result["routing"]["model"]) # english
The package also installs a laya command, for example laya "My payment failed twice" --preset triage.
Checkpoints
| checkpoint | encoder | params | context |
|---|---|---|---|
laya |
ModernBERT-large | 421M | 512 |
laya-multilingual |
mmBERT-base | 322M | 1024 (up to 8,192) |
laya-typed-decisions |
ModernBERT-large | 421M | 1024 |
The README reports 32.8 ms for one question with laya-multilingual on a Tesla T4, and 193 to 464 ms per request on CPU with checkpoints preloaded.
Other Python projects
laya-mlx and laya-coreml for Apple Silicon, laya-openvino for Intel CPUs, edgejev for INT8 ONNX on CPU, and laya-mcp for agent tools.
Caveats
The README is direct about limits: the base checkpoints score near chance on its typed-decisions benchmark (0.362 and 0.352), and the 0.766 figure comes from the fine-tuned checkpoint. Temperatures should be refit on your own data before you trust the probabilities. The English checkpoint collapses on non-Latin scripts, which is why the Router exists.
More ways to use Laya