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-onnx-runtime
zenryokukikai
Ports the Laya multilingual decision model to CPU-only ONNX Runtime
jev-skill-laya
applex250
Adapts Jev skills to use a local Laya decision API as their sole backend
laya-snake-arena
sathwikkuncham
Compares local Laya and Jev decision engines in a configurable Snake arena
sample-laya-mlx-http
daisuzz
Serves Laya MLX decisions through a local System One API with a Kotlin client
jev-laya-chess-bench
abe17124
Compares TypeSafe Jev and Laya in head-to-head chess games using legal moves
opencode-memory
pedroteste00000008-stack
Adds long-term memory to OpenCode using Laya decisions, embeddings, reranking, and a local vector store
Laya_IAB_domain_classification_demo
BeeboLab
Classifies web-search entities into IAB domains using Laya and hierarchical taxonomy traversal
laya-routing-and-descision-making
khursheed33
Serves Laya predictions and routing decisions through a FastAPI service
jev-laya-japanese-business-benchmark
snsk
Compares Jev and Laya on a Japanese business decision benchmark
decisionmakertest
vittoriobrehautduran
Benchmarks Jev and Laya on typed decisions, labeled cases, and a small dungeon game
ai-decision-lab
uibuckets
Provides a local playground and benchmark harness for Laya, with optional Jev comparisons
IOCArena
hc-nolan
Compares Jev, Von, and Laya decision models on VirusTotal data
agent-kits
leonezhu
Provides Python integration kits for Laya decision workflows and WorkClaw agent utilities
jev-zen
loongWoong
Reconstructs and validates Laya inference locally using NumPy and a browser-based interface
Jev-agent
To3akaRin
Suggests clipboard entries based on the focused field using local Laya inference or the Jev API
before-you-send
roisol144
Checks message tone, formality and fight risk while users type, using Laya decisions
screenquest
DanielTea
Controls a game on Apple Silicon with screenshot perception, Laya decisions, and vision-language planning
semantic-browser
koriym
Navigates hypermedia applications by selecting server-declared links using Laya-MLX
jev-eval-ja
unirt
Benchmarks Jev and Laya on Japanese business-style decision tasks
job-classifier-search
NoNFake
Ranks Danish job listings against a candidate profile using the Laya decision model
mandate-1
siva-sub
Explores Laya fine-tunes for finance research while a separate DeepSeek path powers the live reference
laya
iaeluk
Runs a local Laya-powered Snake game with a CUDA server and browser version
laya
harisathees
Tests Laya predictions, multilingual behavior, CPU performance, and interactive runs through a local web console
laya
pgarvie
Provides multilingual typed-decision models and a router for single-pass 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