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-multilingual-calculator-router
Borcherding
A multilingual Laya model routes agent steps by predicting whether they need calculation
laya
Dariusdup
Provides a multilingual non-autoregressive model for calibrated typed decisions over text
laya-email-resume-classifier-7
abhijithsoman27
Fine-tuned Laya model classifies recruiting emails and resumes into typed decision schemas
laya-scene-graph-papers
Blu-y
Fine-tuned Laya checkpoint classifies scene-graph research papers into a category tree
Fuuga-Laya-emotion-laya
Thoriumi
Imports, fine-tunes, and exports Laya with Fuuga for six-class emotion classification
laya-desktop-v1
ikaanakkok
Fine-tunes Laya for desktop computer-use decisions based on Ubuntu accessibility trees
laya-multilingual-arc
goktugoguz
Fine-tunes Laya to classify Arc USDC transfers and answer questions about them
laya-vulnerabilit
xiahao90
An experimental Laya checkpoint adapted for vulnerability detection
laya-for-clara
TheWiderLensInitiative
A Laya fine-tune routes assistant messages and selects the level of agent effort
laya-agentguard
Jojoarumugam
A Laya fine-tune classifies tool calls for destructive risk and third-party content for prompt injection
atmem-laya-formation-model-v1
atmem
Provides a finite-choice Laya model for AtMem memory-formation decisions
laya-multilingual-stellar
goktugoguz
Fine-tunes Laya to classify Stellar operations and answer questions about them
Laya-Hebrew-V2
RoeiG
A Hebrew-English Laya-style model returns calibrated probabilities for typed decisions
laya-banking77-v1
Cahol
Fine-tunes Laya for classifying customer messages into the 77 BANKING77 banking intents
laya-typed-decisions
akshatbindal
Fine-tunes Laya on the typed-decisions benchmark and compares results with Jev
laya-mlx
millat
Converts Laya to a native MLX FP16 checkpoint for inference on Apple silicon
laya-idjvsuen-v1
faall7479
A multilingual Laya fine-tune returns calibrated typed decisions on Indonesian, Javanese, Sundanese and English text
laya-vision-smolvlm-256m-score
thaitea
A SmolVLM-based Laya checkpoint for calibrated decisions about images and text
laya-session-guard-pilot
hxrikp
A fine-tuned Laya checkpoint for structured decisions about coding-session content and actions
laya-news-decisions
InfinimindCreations
A multilingual Laya checkpoint fine-tuned to classify news articles with typed decisions
laya-browser-mind2web
Quantum08
A Laya checkpoint fine-tuned to select browser actions from page content and a user goal
laya-crisis-triage
mazenDDr
A multilingual Laya checkpoint fine-tuned to triage disaster and humanitarian messages
laya-vision-201m
thaitea
A compact SmolVLM-based Laya checkpoint for image decisions and simple games
code-oracle-laya-421m
wxsys
Fine-tunes Laya decision heads to verify code and score risk from programming-language AST graphs
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