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

T

laya-pt-es-typed

telepatia-ai

Fine-tunes multilingual Laya for typed decisions in Portuguese and Spanish

156·HF model
A

laya-multilingual-typed-decisions

alfred361

Fine-tunes the Laya multilingual model on a typed-decisions dataset

4·HF model
T

laya-vision-modernvbert-250m

thaitea

Adds image inputs to Laya for calibrated typed decisions over images and optional text

4·HF model
G

laya-experts

goku-san

Provides Laya fine-tunes for PII detection and banking intent classification

4·HF model

laya-mcp

NVentimiglia

An MCP server exposes Laya decision capabilities as tools for agent workflows

4·GitHub repo

home-assistant-laya

allenporter

Runs Laya as a local conversation agent for Home Assistant Assist

4·GitHub repo

jev-laya-benchmark

harrymunro

Benchmarks local MLX Laya against TypeSafe's hosted Jev on synthetic decision tasks

4·GitHub repo

sysone-bench

instax-dutta

Compares Laya and Jev on identical inputs across multiple decision benchmarks

4·GitHub repo

laya-mlx-voice-browser

aryanbhujade

Uses a local Laya-MLX model to turn spoken commands into browser actions on Mac

4·GitHub repo

mjbrain

jinlio

Fine-tunes Laya into a real-time recommendation system for Japanese riichi mahjong

4·GitHub repo

runtime-tutorials

Runtime-weekly

Provides runnable Python guides for Laya classification and a comparison of Laya with other systems

4·GitHub repo

decision-systems-bakeoff

actuallyrizzn

Runs a reproducible benchmark comparing Flybrain, Jev, and Laya on four public tests

4·GitHub repo

jev-as-quant

jiayylu

Combines Laya and Jev with Claude in a quantitative research stack and evaluates trading experiments

4·GitHub repo

Laya

ljw98

Provides a local web console and HTTP API for running Laya typed-decision models

4·GitHub repo

chinese-laya

yanqiangmiffy

Fine-tunes Laya multilingual for Chinese typed decisions and evaluates the resulting checkpoints

4·GitHub repo

fast-laya-compaction

ShinyDataTech

Uses local Laya decisions to compact agent context and provides filters, caching, and an MCP server

4·GitHub repo

flappy-laya-openvino-cpu

rupeshs

Runs Laya inference with OpenVINO to control a Flappy Bird game on CPU

4·GitHub repo

laya-studio

Hantlowt

Specializes frozen Laya representations for new decision tasks and exports portable artifacts

4·GitHub repo

fast-browser

hamza-sahin

Automates Brave browser workflows through MCP using Jev or optional local Laya inference

4·GitHub repo

Bud-Decision-Engine

BudEcosystem

Desktop app and local server for Laya and other Jev-like decision models

4·GitHub repo

vegaml

NandhaKishorM

Produces calibrated typed decisions from frozen language models with conformal sets and abstention

4·GitHub repo

layapet

elisaterumi-ai

A Portuguese virtual pet uses Laya to classify player messages locally on the CPU

4·GitHub repo
W

laya-ara-rag

Wouze

Fine-tunes Laya multilingual for Arabic information retrieval and document reranking

68·HF model
W

laya-ara

Wouze

Fine-tunes multilingual Laya for Arabic intent classification, inference, and ranking

59·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