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-mlx-wzq
smile-magic
A browser-based Gomoku game runs Laya-MLX locally to choose moves on Apple Silicon
claude-laya
jverhoeks
Scores local Claude Code session transcripts with Laya
laya-mcp
devthinker-ai
Serves Laya typed decisions over MCP and HTTP on Apple Silicon using MLX
laya-mlx
MohammadAsadi-7
Runs Laya typed-decision models natively on Apple Silicon using MLX
lunar-laya
mraad
Runs Laya typed decisions on Apple MLX to guide a lunar-landing simulation
laya-mlx-swift
MstyAI
Provides a native Swift library for running Laya inference locally with Apple MLX
dsh-laya-router
ricardochen1996
Routes agent requests using a local Laya-MLX typed-decision model
laya-mlx-demo
knishika62
Uses laya-mlx to classify Japanese virtual streamer personas and compare results with an LLM
sample-laya-mlx-http
daisuzz
Serves Laya MLX decisions through a local System One API with a Kotlin client
jev-laya-japanese-business-benchmark
snsk
Compares Jev and Laya on a Japanese business decision benchmark
slop-finder
Code-Wizard-Wilson
Detects AI-like writing styles in social feeds using a local Laya-MLX helper
Jev-agent
To3akaRin
Suggests clipboard entries based on the focused field using local Laya inference or the Jev API
screenquest
DanielTea
Controls a game on Apple Silicon with screenshot perception, Laya decisions, and vision-language planning
semantic-browser
koriym
Navigates hypermedia applications by selecting server-declared links using Laya-MLX
laya-multilingual-mlx
janvavrina
Provides a multilingual Laya model in MLX format
layad
rcwsr
Keeps the Laya decision model resident and serves it over HTTP with MLX or PyTorch
laya-example
lim6112j
Demonstrates typed-question routing with Laya checkpoints and startup optimizations
laya-adblock
Samuel-Ku
Uses a local MLX Laya model to identify and remove likely ads from web pages
laya.mbt
majikxu
Implements Laya typed-decision inference in MoonBit with CPU and Metal backends
Laya_TESTSUITE
sirwari
Provides Laya tests, demos, routing examples, and MLX setup guidance
laya-todo
firede
Classifies to-do items locally with Laya and compares its predictions with an optional Kev backend
laya-mlx-rs
andyjusa
A native Rust and MLX implementation runs Laya decision models on Apple Silicon
laya-doom-agent
Jaiswal-Siddhant
Uses Laya-MLX to choose actions for an autonomous DOOM agent
laya-mlx-advisor
esse
Uses a resident Laya-MLX model to adapt reasoning effort in Codex CLI and Claude Code
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