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.
1713 projects
omnia-news
Omniaeye
Filters source content with OMNIA Laya and records evidence-backed feed decisions
layaMOE
vishalmysore
Routes Laya requests to domain-specific expert heads, with a browser demo using ONNX Runtime Web
laya-local-guard
Kamandlou
Classifies content for safety risks locally with Laya-MLX and detects PII and secrets
laya-system1-snake
Kamandlou
A terminal Snake game uses Laya MLX to choose moves from structured game-state features
laya-eval
yliuai
Fine-tunes Laya to play Snake on a Mac and measures base vs fine-tuned decision accuracy
omnia-laya
Omniaeye
Integrates Laya inference with validated outputs, durable decision records, replay and evaluation tools
laya-pi
trinacria-tech
Runs Laya decision APIs and demos on a Raspberry Pi 4 using ONNX Runtime or PyTorch
chong-laya
cloudwallker
Provides a local interface for inspecting Laya shopping decisions, probabilities, latency, and raw responses
general-decision-with-laya
chenking2020
Provides a multilingual decision platform using locally loaded Laya weights for typed answers and confidence gating
omnia-mcp
Omniaeye
Exposes Jev and local Laya typed decisions to agents through the Model Context Protocol
docweave
pareshbhangale
Converts PDFs to Markdown and uses Jev or Laya alongside local models for layout routing and table auditing
laya-finetune
lucianfialho
Fine-tunes Laya using Jev distillation and pilot datasets
laya-triage
elnachto
A GitHub Action uses local Laya decisions to label issues and pull requests and flag spam
laya-agent
inboxxobni
Runs Laya typed decisions locally on Apple Silicon and provides an HTTP server and agent integrations
laya-jev-tester
Collanteslu
Tests Laya or Jev-compatible endpoints through a browser-based interface for typed decisions
laya-zerogpu
afen0768
Runs Laya checkpoints on ZeroGPU for typed decisions over text or JSON
Laya_test_bench
francismdpro
Provides command-line and web tools for experimenting with Laya's typed decision questions
jev_laya_studies
professortavares
Explores structured text decisions, explainability, and comparisons involving Jev and Laya
laya-decision-gateway
harshad-jadav
Serves Laya model decisions through a documented API gateway
system-one-web-ai
Josuesp1620
An interactive web guide measuring Laya on Spanish customer-service messages and explaining its implementation
snake-game-laya-ai-example
larchanka
Provides terminal games that use the Laya model for real-time decisions
Civic-Signal-Laya
satiricalguru
Routes multilingual public-service requests with Laya and presents decisions for human review
laya-router
vuongvm812
Sets up local Laya classification and Jev Router proxies for coding clients
laya-persian-benchmark
alipyth
Benchmarks Laya's Persian support-triage decisions across eight language-specific message families
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