Laya on MLX
laya-mlx is an independent MLX port of Laya that runs the original weights on the Apple Silicon GPU with no PyTorch or Transformers runtime. It keeps upstream prompt formatting, calibration and output schema, and it is the base for many Mac demos, agents and benchmarks.
260 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
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
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
snake-laya
Cognition-Forge
Lets users play Snake against Laya using PyTorch or MLX model runtimes
laya-mlx-fine-tuning
canwhite
Provides MLX fine-tuning support for the Laya model
Install
Requirements from the laya-mlx README: Apple Silicon, Python 3.11+, macOS 14+.
pip install laya-mlx
Pre-converted FP16 checkpoints are on Hugging Face: aac6fef/laya-mlx, aac6fef/laya-multilingual-mlx and aac6fef/laya-typed-decisions-mlx. You can also load the original convaiinnovations/laya IDs.
Router and CLI
The port includes the upstream language router and presets:
from laya_mlx import Router, triage_questions
router = Router(dtype="float16", max_loaded=2)
result = router.predict({"message": "发票被重复扣款,请退款。"}, triage_questions())
print(result["routing"]) # multilingual
For the terminal demo, where Laya plays Snake:
pip install 'laya-mlx[demo]'
hf download aac6fef/laya-multilingual-mlx
laya-snake
Reported numbers
On an M3 Max, FP16, one short question: 13.42 ms P50 for the 421M English model and 7.39 ms for the 322M multilingual model. The README states that all three checkpoints matched the upstream answer on 63/63 validation questions in FP32 and FP16. That measures port fidelity, not task accuracy.
Projects built on laya-mlx
- laya-ultrafast: a port of browser-use/jev-ultrafast that makes browser decisions locally.
- laya-mcp (wsargent): an MCP server with triage, guard, moderation and email tools.
- laya-fast: adds Neural Engine execution next to the MLX GPU.
- laya-jev-lab and jev-laya-benchmark: independent Jev comparisons that use laya-mlx as the Laya side.
- laya-vs-jev: Laya and Jev playing Chrome's T-Rex game side by side.
Caveats
This is not an official Convai Innovations release. Training and fine-tuning stay in the upstream project. BF16 can be requested but is not part of the published validation.
More ways to use Laya