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

B

laya-multilingual-calculator-router

Borcherding

A multilingual Laya model routes agent steps by predicting whether they need calculation

18·HF model
D

laya

Dariusdup

Provides a multilingual non-autoregressive model for calibrated typed decisions over text

18·HF model
A

laya-email-resume-classifier-7

abhijithsoman27

Fine-tuned Laya model classifies recruiting emails and resumes into typed decision schemas

16·HF model
B

laya-scene-graph-papers

Blu-y

Fine-tuned Laya checkpoint classifies scene-graph research papers into a category tree

14·HF model
T

Fuuga-Laya-emotion-laya

Thoriumi

Imports, fine-tunes, and exports Laya with Fuuga for six-class emotion classification

13·HF model
I

laya-desktop-v1

ikaanakkok

Fine-tunes Laya for desktop computer-use decisions based on Ubuntu accessibility trees

11·HF model
G

laya-multilingual-arc

goktugoguz

Fine-tunes Laya to classify Arc USDC transfers and answer questions about them

10·HF model
X

laya-vulnerabilit

xiahao90

An experimental Laya checkpoint adapted for vulnerability detection

9·HF model
T

laya-for-clara

TheWiderLensInitiative

A Laya fine-tune routes assistant messages and selects the level of agent effort

8·HF model
J

laya-agentguard

Jojoarumugam

A Laya fine-tune classifies tool calls for destructive risk and third-party content for prompt injection

7·HF model
A

atmem-laya-formation-model-v1

atmem

Provides a finite-choice Laya model for AtMem memory-formation decisions

6·HF model
G

laya-multilingual-stellar

goktugoguz

Fine-tunes Laya to classify Stellar operations and answer questions about them

5·HF model
R

Laya-Hebrew-V2

RoeiG

A Hebrew-English Laya-style model returns calibrated probabilities for typed decisions

5·HF model
C

laya-banking77-v1

Cahol

Fine-tunes Laya for classifying customer messages into the 77 BANKING77 banking intents

1·HF model
A

laya-typed-decisions

akshatbindal

Fine-tunes Laya on the typed-decisions benchmark and compares results with Jev

1·HF model
M

laya-mlx

millat

Converts Laya to a native MLX FP16 checkpoint for inference on Apple silicon

1·HF model
F

laya-idjvsuen-v1

faall7479

A multilingual Laya fine-tune returns calibrated typed decisions on Indonesian, Javanese, Sundanese and English text

1·HF model
T

laya-vision-smolvlm-256m-score

thaitea

A SmolVLM-based Laya checkpoint for calibrated decisions about images and text

1·HF model
H

laya-session-guard-pilot

hxrikp

A fine-tuned Laya checkpoint for structured decisions about coding-session content and actions

1·HF model
I

laya-news-decisions

InfinimindCreations

A multilingual Laya checkpoint fine-tuned to classify news articles with typed decisions

1·HF model
Q

laya-browser-mind2web

Quantum08

A Laya checkpoint fine-tuned to select browser actions from page content and a user goal

1·HF model
M

laya-crisis-triage

mazenDDr

A multilingual Laya checkpoint fine-tuned to triage disaster and humanitarian messages

1·HF model
T

laya-vision-201m

thaitea

A compact SmolVLM-based Laya checkpoint for image decisions and simple games

1·HF model
W

code-oracle-laya-421m

wxsys

Fine-tunes Laya decision heads to verify code and score risk from programming-language AST graphs

1·HF model

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