Run Laya on your Mac
Apple Silicon is the best-covered platform in the Laya ecosystem. Independent ports run the upstream checkpoints on the MLX GPU, through Core ML on the Neural Engine, or inside native Swift apps. Each port publishes its own speed and fidelity measurements, all taken on the author's own Mac.
308 projects
laya-skill
StevenLi-phoenix
A Claude Code skill runs, fine-tunes, evaluates, and exports Laya typed-decision models
sys1rust
krishhgg
Runs Laya decision models on Apple Silicon with a Rust and MLX server compatible with the upstream API
playground
ufuayk
Provides a browser playground for a Laya-MLX decision model served by FastAPI
snake
ufuayk
Runs a browser-based Snake game whose moves are selected by the laya-mlx model
laya-mlx-http
noahwaldner
Serves laya-mlx decisions over HTTP and provides a Vercel AI SDK adapter
laya-mlx-jev-endpoint
rezhajulio
Serves laya-mlx through a FastAPI endpoint compatible with the JEV decision API
dsh-laya-mcp
Alexander390370
Connects the local Laya decision model to DeepSeek Harness through an MCP server
Cuse
muneebkhan08
A macOS cursor agent uses on-device UI grounding and a local Laya model to operate apps
laya-mlx-mailwatcher
apecia-org
Classifies email locally on macOS using an MLX build of the Laya model
opencode-jev-compaction
jlegends
Two OpenCode plugins prune stale tool calls and optionally refine decisions with local Laya
@gobing-ai/ts-laya-mlx
GitHub Actions
A TypeScript package connects applications to a local Laya decision backend through MLX
riidolaya-statehint-laya-reference-v0.1-development
JooYoon
Reports development measurements using a frozen pretrained Laya checkpoint
laya-rs
codesoda
A planned Rust runtime for local Laya decisions with Metal acceleration and a Jev-compatible HTTP API
laya-playground
marcosnovaesq
Runs Laya locally behind a TypeSafe-compatible API and provides a web UI for testing requests
openjev
gillmoreno
Demonstrates local Laya email-triage and simulated trading-tick decisions
LayaKit
tahby
A Swift package for running Laya typed decisions on-device with Core ML
laya-server
phaser
A Jev-compatible HTTP server serves local Laya typed decisions on Apple silicon
local-laya
binbandit
Runs Laya-MLX locally with an HTTP API and a TypeScript client
laya-server
SUSTYuxiao
A local inference wrapper and HTTP server for Laya with native and Jev-compatible prediction endpoints
laya-mario
gavinHuang
A Mario-style platformer uses Laya-MLX typed decisions to select actions on each game tick
laya-mlx-test
VansonLeung
Experiments with Laya-powered Tetris gameplay and sentence-level grammar screening
laya-car-snake
KarimHFahmy
Uses Laya to choose safe moves in a car-and-trailer grid game
computer-use-testing
yoaugust
Tests Jev, Laya, and CUA for computer-use tasks and plans further reinforcement-learning fine-tuning
calibrated-decisions-iot-demo
javierdv7
An interactive smart-home demo compares local Laya inference with Jev using shared rules
Pick a runtime
MLX (Python). laya-mlx is the most widely used port. It needs Apple Silicon, Python 3.11+ and macOS 14+:
pip install laya-mlx
import laya_mlx as laya
agent = laya.load("aac6fef/laya-mlx")
result = agent.predict(
"I was billed twice. Please refund the duplicate.",
{"department": {"type": "choice",
"instructions": "Who should handle this?",
"criteria": ["billing", "technical", "sales"]}},
)
print(result["answers"]["department"])
Its README reports 13.42 ms P50 for one short question with the 421M English checkpoint and 7.39 ms with the 322M multilingual one, FP16 on an M3 Max.
Core ML and the Neural Engine. laya-coreml needs macOS 15+ and Python 3.11 to 3.13 (pip install laya-coreml). Its README reports 4.98 ms P50 for one short multilingual decision on the M3 Max Neural Engine. laya-apple runs the MLX GPU and the Neural Engine together and serves a Jev-compatible API:
pip install 'laya-apple[serve,ane]'
laya-apple serve # http://127.0.0.1:8642
Swift. laya-mlx-swift embeds Laya in a macOS app with MLX (about 804 MiB download). LayaKit is a Swift package over the laya-coreml bundles, and FluidUse ships a LayaManager for Core ML.
PyTorch MPS. The official laya package also runs on the Mac GPU; laya-mps wraps it in a local server with low-memory modes.
Caveats
- All of these are independent ports, not official Convai Innovations releases. Most publish fidelity checks against upstream answers; read them.
- The Neural Engine bundle in laya-coreml has a 96-token total limit covering question, options and state. Use the 1024-token general bundle for longer input.
- Latency numbers are single-machine measurements. Your Mac, input length and question count will change them.
More ways to use Laya