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.

770 projects

Reflex

dimpu47

Routes infrastructure alerts using Jev or local Laya decision model APIs

0·GitHub repo

MacJev-322M-4K-Laya-MLX

lawrence3699

Runs the MacJev typed-decision model natively on Apple silicon with MLX and compares it with Laya

0·GitHub repo

Intelligent-Email-Routing-at-Local-Speed-Using-Laya

hasif154

Uses Laya to route emails with typed decisions and a checkpoint-selecting router

0·GitHub repo

nocturn-gateway

yigiterturk-dev

Provides TypeScript and Python clients for a gateway to Jev and Laya

0·GitHub repo

jev-deliberation-judge

SammySN-car

Plans a multi-agent deliberation judge using Laya jurors and vote, weight, or veto aggregation

0·GitHub repo

jev-bench

brandonrc

Benchmarks Jev, Laya, Claude Haiku, and CLM on package-registry triage tasks

0·GitHub repo

poi-governance

g31322543-crypto

Uses Laya for content moderation and DeepSeek or rules for POI deduplication

0·GitHub repo

ai-second-brain-lab

dante01yoon

Combines an Obsidian knowledge workflow, coding-assistant hooks, local Laya classification, and a 3D Markdown viewer

0·GitHub repo

Mark-LIII

shettysaaproductions

Provides a cross-platform desktop voice assistant with a local Laya decision model and multi-agent system

0·GitHub repo

easy-open-jevs-instance

CarlosChiva

Deploys local Open-Jev and Laya inference services with Docker Compose and a test client

0·GitHub repo

KVev

AdudodlaVarish

Serves cached long-document chat and uses Laya for offline routing experiments

0·GitHub repo

decision-model-arena

sathik11

Compares Jev, Laya, and Microsoft Foundry for typed decisions in enterprise incident triage

0·GitHub repo

stf-sim

JonRoosevelt

Simulates Brazilian Supreme Court cases using local Laya decisions, retrieval and bias probes

0·GitHub repo

tool-output-pruning-lab

Dymyt-ry

Benchmarks Laya and other selectors for pruning tool output in coding-agent sessions

0·GitHub repo

identity-jev

clawdreyhepburn

Fine-tunes Laya to rank identity and authentication standards from plain-language queries

0·GitHub repo

narde

anliang0306

Reimplements the Laya decision engine and verifies behavioral parity against upstream

0·GitHub repo

zhiyan

liuqing0224

Provides macOS chat assistance with local Laya analysis and generated reply suggestions

0·GitHub repo

Wayfinder

manish-9245

Serves Laya decisions through an HTTP gateway with policies, a web console and an MCP server

0·GitHub repo

model-router

gbaeke

Routes prompts to inexpensive or powerful language models using Laya complexity decisions

0·GitHub repo

jev-agent-risk-gate

jayeshvpatil

Compares Jev, Claude, fine-tuned Qwen, and open Laya in experiments on agent shell-command risk gates

0·GitHub repo

fly-brain-agent

shenjie002

Drives a browser-based fruit-fly simulation with Laya decisions and spiking-neuron dynamics

0·GitHub repo

Verdict

TobyNoSkillSon

Keeps local System One models, including Laya, ready for coding-agent classification and scoring

0·GitHub repo

sparky-reflex

Applied-AI-Solutions-hub

Routes desktop app messages locally with the Laya decision model through a Windows service

0·GitHub repo

d3code-calibration

gkastanis

Compares Jev and open-weights Laya probability calibration against human ratings

0·GitHub repo

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