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.

696 projects

laya-onnx-runtime

zenryokukikai

Ports the Laya multilingual decision model to CPU-only ONNX Runtime

0·GitHub repo

jev-skill-laya

applex250

Adapts Jev skills to use a local Laya decision API as their sole backend

0·GitHub repo

laya-snake-arena

sathwikkuncham

Compares local Laya and Jev decision engines in a configurable Snake arena

0·GitHub repo

sample-laya-mlx-http

daisuzz

Serves Laya MLX decisions through a local System One API with a Kotlin client

0·GitHub repo

jev-laya-chess-bench

abe17124

Compares TypeSafe Jev and Laya in head-to-head chess games using legal moves

0·GitHub repo

opencode-memory

pedroteste00000008-stack

Adds long-term memory to OpenCode using Laya decisions, embeddings, reranking, and a local vector store

0·GitHub repo

Laya_IAB_domain_classification_demo

BeeboLab

Classifies web-search entities into IAB domains using Laya and hierarchical taxonomy traversal

0·GitHub repo

laya-routing-and-descision-making

khursheed33

Serves Laya predictions and routing decisions through a FastAPI service

0·GitHub repo

jev-laya-japanese-business-benchmark

snsk

Compares Jev and Laya on a Japanese business decision benchmark

0·GitHub repo

decisionmakertest

vittoriobrehautduran

Benchmarks Jev and Laya on typed decisions, labeled cases, and a small dungeon game

0·GitHub repo

ai-decision-lab

uibuckets

Provides a local playground and benchmark harness for Laya, with optional Jev comparisons

0·GitHub repo

IOCArena

hc-nolan

Compares Jev, Von, and Laya decision models on VirusTotal data

0·GitHub repo

agent-kits

leonezhu

Provides Python integration kits for Laya decision workflows and WorkClaw agent utilities

0·GitHub repo

jev-zen

loongWoong

Reconstructs and validates Laya inference locally using NumPy and a browser-based interface

0·GitHub repo

Jev-agent

To3akaRin

Suggests clipboard entries based on the focused field using local Laya inference or the Jev API

0·GitHub repo

before-you-send

roisol144

Checks message tone, formality and fight risk while users type, using Laya decisions

0·GitHub repo

screenquest

DanielTea

Controls a game on Apple Silicon with screenshot perception, Laya decisions, and vision-language planning

0·GitHub repo

semantic-browser

koriym

Navigates hypermedia applications by selecting server-declared links using Laya-MLX

0·GitHub repo

jev-eval-ja

unirt

Benchmarks Jev and Laya on Japanese business-style decision tasks

0·GitHub repo

job-classifier-search

NoNFake

Ranks Danish job listings against a candidate profile using the Laya decision model

0·GitHub repo

mandate-1

siva-sub

Explores Laya fine-tunes for finance research while a separate DeepSeek path powers the live reference

0·GitHub repo

laya

iaeluk

Runs a local Laya-powered Snake game with a CUDA server and browser version

0·GitHub repo

laya

harisathees

Tests Laya predictions, multilingual behavior, CPU performance, and interactive runs through a local web console

0·GitHub repo

laya

pgarvie

Provides multilingual typed-decision models and a router for single-pass inference

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