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.
768 projects
pol2-laya-studio
shentonyan
A local interactive playground visualizes and evaluates typed decisions from Laya models
e2e-ui-test-laya
spencerlepine
A local browser-use agent uses Laya through MLX to choose actions and verify task completion
system-one
arhamj
Serves Laya typed decisions from Apple silicon over a private Tailscale endpoint
ai-update-radar-lab
starhunt
Tests Laya-based project relevance decisions and compares results with saved Jev evaluations
jev-router
drycool
Provides a multi-tier routing gateway for RAG and agent workflows with an optional Laya classifier
doom-ai-overlord
JohGirard
Runs Laya as a local decision model for autonomous Doom gameplay through ViZDoom
Jev
Caho1
A research repository documents Laya fine-tuning, evaluation, local inference and browser automation experiments
sagaz-cli
eddraz
A Python CLI and SDK for running Laya’s typed decision models locally
Tuantuan
JunbiaoXue
Provides a native macOS desktop companion that uses local Laya decisions to choose behavior
trust-router
NotoriousPOG
Compares rules, BERT, and Laya for shadow-mode AI security routing
jev-frontend-lab
dante01yoon
Six frontend demos compare Jev and local Laya decision pipelines with optional LLM refinement
featherbench2
ed-is-ai
Benchmarks language models and typed-decision models on custom tasks and agentic decision sequences
jev-like-model-playground
LiuWei997
A notebook template runs lightweight System 1 models, including Laya, locally on Apple Silicon with MLX
Knowledge-Decider
TaewoooPark
An interactive artwork uses a local Laya model to select books across three rounds
yks-bench
UgurcanAkkok
Benchmarks local Laya checkpoints and hosted Jev on Turkish university entrance exam questions
PacmanLocalJev
raboija
Runs local Laya decisions in a Windows Pac-Man-inspired game with live probabilities and benchmarks
etri-voice-control
prajazz66
Controls a computer by voice using local speech recognition, UI perception, and Laya-based element grounding
jev-demo
nadeem4
A demo site compares Jev and Laya playing games and includes benchmarks and agent experiments
faceid-bench
mazenDDr
A face-unlock benchmark measures detection and recognition pipelines and tests Laya for yes/no decisions
SystemOne
iksnerd
Runs local Laya checkpoints for fast typed judgments over text
sys1bench
rssr25
A benchmark measures calibration, robustness, and other properties of typed decision models including Laya
papaya
m0rphtail
Serves Laya typed decisions locally on Raspberry Pi using llama.cpp and a reconstructed decision head
typed-decision-bench
4nt0ineB
Compares Jev, OpenJev, Laya, and other models on zero-shot classification tasks in English and French
jev-chat-jarvis-mac
adra2n
A macOS overlay uses local Laya to classify WeChat message intent and risk
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