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-Multilingual-MXFP8
sahilchachra
An MXFP8 MLX quantization of Laya multilingual's encoder backbone for Apple Silicon
laya-mlx
millat
Converts Laya to a native MLX FP16 checkpoint for inference on Apple silicon
jev-codex-workbench
qualixar
Adds Jev decisions and optional local Laya-MLX routing to a Codex plugin and MCP server
laya
xosi
Runs Laya typed-decision inference locally on Apple Silicon with MLX
laya-mlx-ddz
smile-magic
A browser-based 斗地主 game lets two local AI seats play using Laya on Apple Silicon
localjev-mlx
rimusz
A self-hosted System One judgment service for Apple Silicon using laya-mlx
decide
gopaljigaur
Provides a Python client that chains Laya with hosted and other decision-model backends
doom-war
rythmn1111
Compares local MLX Laya and hosted Jev as decision-makers in a Doom deathmatch
LayaStudio
biplovgautam
Fine-tunes Laya decision models locally on Mac and evaluates results before deployment
jev-laya-benchmark
EnesDemir143
Benchmarks TypeSafe Jev and Laya-MLX on structured issue classification
laya-learning-demo
Daryl9441
A runnable tutorial teaches Laya decision primitives, routing, fine-tuning, and comparison with Jev
tetris_for_laya
fchange
Provides a terminal Tetris environment where a local Laya model chooses each action
laya-mlx-per-turn-classifier
M37Labs
Demonstrates per-turn customer message classification with Laya on Apple Silicon
laya-rust
zerodegress
Implements a Rust inference engine for Laya with CUDA, CPU, and MLX backends
laya-exp
changtimwu
Experiments comparing an MLX Laya port with Jev and a TypeSafe-compatible Laya client
laya-lab
Alevsk
Runs Laya locally with reproducible scenarios that explore its capabilities on Apple Silicon
Tern
AmRitJain0442
A model router uses local Laya-MLX inference to select between configurable provider tiers
lime-jev
yzxoi
Adds optional Laya reranking to a local Chinese pinyin input method on Apple Silicon
kime
tamnd
A Rust inference engine and HTTP server runs Laya checkpoints across CPU, CUDA, and Apple GPUs
laya-decision-api
bmw8080
An HTTP service wraps local Laya with OpenAPI documentation and Java, TypeScript, and Python SDKs
laya-vs-dijkstra
antonellof
Compares Laya MLX pathfinding decisions with Dijkstra on seeded weighted mazes
code-oracle
wahyuzero
Verifies code changes with AST checks and Laya-based residual-drift evaluation
laya-mlx-zh
ZLHAOOO
Provides Chinese fine-tuned Laya weights, training data, and evaluations for Apple Silicon MLX
design-os-generative-ui
jangtrinh
Builds a generative UI engine using local Laya-MLX decisions and a TypeSafe JEV cascade router
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