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.

1713 projects

classify-goblin

Sharkelot

A local typed-decision service offers Laya alongside rules, DistilBERT, and Qwen backends

0·GitHub repo

computer-use-testing

yoaugust

Tests Jev, Laya, and CUA for computer-use tasks and plans further reinforcement-learning fine-tuning

0·GitHub repo

calibrated-decisions-iot-demo

javierdv7

An interactive smart-home demo compares local Laya inference with Jev using shared rules

0·GitHub repo

laya

bitofant

Packages a self-hosted Laya model with Docker lifecycle management and an NVIDIA GPU inference endpoint

0·GitHub repo

laya

DarkWanderer

Runs experiments with the open-source Laya System-1 decision model

0·GitHub repo

laya

inematds

A Portuguese triage application wraps Laya with a local interface, API, CLI, and reproducible evaluation

0·GitHub repo

laya

ahmed-alqasaby

Evaluation grid and Kaggle training notebooks for Laya checkpoints

0·GitHub repo

laya_examples

jayanthbagare

Python examples demonstrate the Laya model

0·GitHub repo

laya-jev

kiuckhuang

Adds a local Laya decision endpoint and conformance tests to a Jev browser-agent fork

0·GitHub repo

jev-laya

wuzhiping

Probes the multilingual Laya model on Apple Silicon and records machine-readable inference results

0·GitHub repo

snake-laya

Cognition-Forge

Lets users play Snake against Laya using PyTorch or MLX model runtimes

0·GitHub repo

layaApi

patelkrish-27

A REST server exposes Laya typed-decision inference with low-VRAM checkpoint management

0·GitHub repo

laya2typesafeapi

yunhai-dev

Serves the multilingual Laya decision model through a self-hosted TypeSafe-compatible API

0·GitHub repo

laya-mlx-fine-tuning

canwhite

Provides MLX fine-tuning support for the Laya model

0·GitHub repo

laya-mlx-wzq

smile-magic

A browser-based Gomoku game runs Laya-MLX locally to choose moves on Apple Silicon

0·GitHub repo

laya_filter

plitenh

Collects and annotates Laya-powered news decisions for corpus building and regression training

0·GitHub repo

system-one-api

jrmmendes

Exposes Laya for probabilistic text classification through a REST API

0·GitHub repo

laya-demo

tjpajala

Benchmarks Laya and Open-Jev on JevBench and PubMedQA with a Dockerized comparison interface

0·GitHub repo

laya-setup

rexleimo

Installs and manages a local Laya decision service across Windows, Linux, and macOS

0·GitHub repo

laya-dev

AVMG20

A local HTTP server exposes Laya through a Jev-compatible API and includes a browser playground

0·GitHub repo

laya-hermes

pavlealeksic

Adds Laya decision tools, routing hints, and output filtering to the Hermes Agent

0·GitHub repo

laya-local

vit-cerny

Runs a browser agent using local Laya decisions or TypeSafe's hosted Jev backend

0·GitHub repo

claude-laya

jverhoeks

Scores local Claude Code session transcripts with Laya

0·GitHub repo

laya_demo

jingyuan9527

Runs Laya locally as a persistent HTTP service with automatic device selection

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