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.
1712 projects
laya-asteroids-local
Klerith
Runs the Laya decision model locally to play Asteroids in a browser
pacman-arena
hakan-gecili
Compares Laya with other local decision models playing Pac-Man under identical conditions
s1-tui
tnaftali
Provides a terminal interface for typed decisions using local Laya or the hosted Jev API
apex-decisioncore
AAH20
A pure-Python decision kernel combining state-space dynamics, action pruning, safety projection, and audit logging
Cascade_Router
EllroyOfficial
Routes requests through a three-stage cascade using Laya decisions, RAG checks, and output safeguards
laya
fivetop
Fine-tunes the Laya decision model on stock data for buy, sell, or hold signals
systemone-lab
baldellimtt
Demonstrates typed System One decisions with local Laya, a playground, routing examples, and evaluation tests
laya-modernbert-decision-90pct
ameerhmz5
Fine-tunes Laya into a ModernBERT decision model and offers deployment formats
laya-v796
Falconsai
A ModernBERT-based Laya checkpoint for multilingual typed decisions and calibrated classification
laya-toolguard-mlx
a3harva
Fine-tunes Laya in MLX to assess coding-agent tool calls for safety risks
relay-laya
eltonssouza
Provides a trained Laya classifier that routes coding requests by task, risk, and capability
dana-laya-0.3b-persian
amiralifirouzi
Adapts Laya multilingual for calibrated structured decision-making in Persian and English
laya-tr
TurkishCodeMan
Fine-tunes Laya for fast Turkish decision-making, candidate selection, and routing
laya-guard-multilingual
Ayaannnnnnn
Fine-tunes Laya to classify coding-agent shell commands and tool calls as allow, review, or block
safe-laya
ottosulin
A fine-tuned Laya model classifies untrusted text as benign, prompt injection, jailbreak, or harmful request
laya-onnx
tozp
Hosts ONNX-converted English Laya model weights in FP32, FP16, and INT8 formats
laya-chess
datafreak
Fine-tunes Laya on chess positions to predict move win chances
ownd-laya-search
ParkJH09
Fine-tunes Laya for semantic search-condition judgments across Korean sports-facility criteria
laya-fintiment
shanaka95
A Laya fine-tune for three-class financial sentiment classification
laya-id-online-gambling-judol-promotion
cacadosman
Fine-tunes Laya multilingual to detect online-gambling promotion in Indonesian and Javanese text
laya-persian-sentiment
MahdiAlikhah
Fine-tuned multilingual Laya model classifies Persian sentiment into four calibrated categories
laya-email-resume-classifier-6
abhijithsoman27
Fine-tuned Laya model classifies recruiting emails and resumes into typed decision schemas
laya-maintenance-decision-assist
gtm-k
Fine-tunes Laya to identify the latest reported sensor flag in maintenance reports
laya-instinct
chand1012
Provides a fine-tuned Laya model for typed choice, score, and yes/no decisions
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