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.
140 projects
laya-mlx
mizorewww
Runs Laya typed-decision models locally on Apple Silicon using MLX
laya-ultrafast
ipenywis
Runs a browser automation agent using local Laya decisions through MLX
laya-vs-jev
virajbhartiya
A side-by-side T-Rex game compares local Laya and hosted Jev decision models
laya-mlx
aac6fef
An MLX FP16 conversion of Laya for native inference on Apple silicon
sys1
alvarobartt
Serves Laya decision models through a Rust System One API with CPU, CUDA, and Metal support
arbiter
0xBakeer
Serves Laya and other typed-decision models locally with a Jev-compatible API
laya-multilingual-mlx
aac6fef
Converts the multilingual Laya decision model to MLX for Apple silicon
laya-jev-lab
yibie
Compares Jev and Laya decision models and evaluates a local-first inference cascade
laya-apple
tc3oliver
Runs Laya locally on Apple Silicon with MLX GPU and Apple Neural Engine support
fast-jev-compaction-laya
kaiyes
Compacts OpenCode context using decisions from a locally served Laya model
laya-typed-decisions-mlx
aac6fef
Runs Laya typed-decision inference natively on Apple silicon with MLX
laya-fast
DJLougen
Runs Laya typed decisions on Apple Silicon with MLX and optional Core ML execution
deqio
ILuce
Serves multiple typed-decision models, including Laya, through a local API and browser UI
MacJev-322M-4K-Laya
chaoliangUNSW
Fine-tunes Laya for long-context local Mac agents and compares it with the base model
jev-laya-benchmark
harrymunro
Benchmarks local MLX Laya against TypeSafe's hosted Jev on synthetic decision tasks
laya-mlx-voice-browser
aryanbhujade
Uses a local Laya-MLX model to turn spoken commands into browser actions on Mac
jev-tests
schacon
Compares Laya, Jev, Kev, and Claude in three macOS typed-decision demos
doomLaya
azalio
Trains and compares Laya and Jev agents playing FreeDoom with reproducible results
laya-mcp
wsargent
Runs local Laya inference on Apple Silicon and exposes typed-decision tools through an MCP server
laya-router-skill
wangmiaozero
Adds local Laya decision routing to coding agents through skills and MCP
laya-as-judge
rbrus
Uses Laya-MLX to evaluate models and agents with typed-decision judgments
laya-vs-jev
zaferayan
Benchmarks multilingual Laya against hosted Jev across 900 cases, three tasks, and six languages
SnakeGame_Laya
Okbatti
Uses a fine-tuned Laya model to choose moves in a Snake game
oh-my-laya
leo1394
Installs local Laya tools for classification, scoring, and routing in coding agents
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