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

laya-mc-bot

LixiaoLeo123

Minecraft bots use Laya decision models alongside external LLM harnesses

0·GitHub repo

laya-vision-stitch

DanielTea

A local screenshot-based game agent combines Laya, visual features, and action outputs

0·GitHub repo

laya-steering-lab

Hantlowt

Tests methods for specializing frozen Laya models and benchmarks their accuracy and runtime

0·GitHub repo

laya-computer-use

ChenneyZhuang

Uses local Laya decisions to control macOS apps through their Accessibility trees

0·GitHub repo

laya-training-log

ChenneyZhuang

Documents training and benchmark results for a fine-tuned Laya browser model

0·GitHub repo

laya-first-look

cvranjith

Explores base Laya checkpoints locally on Apple M4 and reports informal behavior and latency measurements

0·GitHub repo

laya-web-app

meossistant

Provides an offline web runtime for Laya with OpenVINO and PyTorch backends

0·GitHub repo

laya-local-system

h7mei

Serves local Laya decisions through a web UI and Jev-compatible HTTP API

0·GitHub repo

lica

np9royal

Adds typed decision packs powered by Laya to coding-agent hooks

0·GitHub repo

Tenstorrent.Blackhole-convaiinnovations_laya

Thatch-cloud

Develops a Tenstorrent Blackhole inference backend and service integration for Laya

0·GitHub repo

jev_and_laya_benchmarking

pavanjava

Benchmarks Jev and Laya accuracy and inference speed on typed-decision tasks

0·GitHub repo

jev-laya-openai-comparison

amansahani

Benchmarks Laya and Jev against OpenAI models on financial regulatory decisions

0·GitHub repo

decision-model-bench

SaiNarayana-B

Tests the accuracy and calibration of Laya decision-model confidence scores

0·GitHub repo

decisionsmith

izam-mohammed

Uses LLM teachers to generate data for fine-tuning Jev and Laya decision models

0·GitHub repo

gatelaya

Diwas2055

Adds Laya-powered multilingual firewall and routing guardrails to LiteLLM Proxy

0·GitHub repo

ghosthand

ameerhmz

A local macOS voice and computer-use agent uses Laya for typed decisions

0·GitHub repo

reflex-engine

chenshuai9101

A Python toolkit collects, calibrates, and automates routine decisions using local Laya

0·GitHub repo

Xpark-Media-Foundry-Agent

ArcSeekerX

A media-production pipeline uses Laya, OpenJev, or Jev to allocate attention across video generation

0·GitHub repo
D

cortico-world-simple-trpg-check

dtmosken

A TRPG skill-check tool scores skill success with Laya or Jev and resolves d100 rolls

0·npm package
E

@ejstembler/pi-classifier-router

ejstembler

Routes Pi and Oh My Pi prompts to models using typed decisions from Jev or Laya

0·npm package
G

@gabedsam01/decision-maker

gabedsam01

Provides typed decisions for AI agents through a Pi adapter and local Laya or hosted Jev

0·npm package
G

@plumbus/ai-decision-laya

GitHub Actions

Provides a self-hosted Laya typed-decision adapter and Python reference service for Plumbus

0·npm package
B

laya-calibration-lab

BunsDev

Fits and evaluates probability calibration for Laya typed-decision models

0·HF Space
A

laya-burmese-sib200-demo

aungthuhein-dev

Classifies Burmese text into seven topics using a fine-tuned Laya checkpoint

0·HF Space

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