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
cut
harshpreet931
Uses Laya to label and cut unnecessary lines from posts in a browser or local app
laya-steering-lab
Hantlowt
Tests methods for specializing frozen Laya models and benchmarks their accuracy and runtime
laya-first-look
cvranjith
Explores base Laya checkpoints locally on Apple M4 and reports informal behavior and latency measurements
reflex-engine
chenshuai9101
A Python toolkit collects, calibrates, and automates routine decisions using local Laya
@gabedsam01/decision-maker
gabedsam01
Provides typed decisions for AI agents through a Pi adapter and local Laya or hosted Jev
laya-trader
antonellof
Uses Laya MLX to paper-trade crypto and stocks with a dashboard and backtesting tools
laya-shim
bunkerlab-net
Serves Laya or Laya-MLX behind TypeSafe's System One API route
laya-mlx-demo
jerryshao2012
Demonstrates an Apple silicon MLX conversion of Laya for typed decision inference
lagos-monopoly
vunderkind
Runs two local Laya agents through a Lagos-themed Monopoly game and creates animated replays
laya-classifier-finetuning
sallout
Fine-tunes Laya for custom text classifiers and optionally exports models to Core ML
morning-agent
shauryajain07
A macOS morning briefing CLI uses local Laya-MLX for typed decisions
custom-voice-activator
M47HIS
Provides local macOS voice dictation and desktop control with Laya decisions
hekla-spjall
Hekla-dev
A Chrome side panel pairs on-device Gemma text generation with local Laya decisions
laya-mlx
HuSuuuu
Runs the Laya typed-decision model locally on Apple silicon using MLX
maclaya
jannisleifeld
Serves local Laya models on Apple Silicon through a Jev-compatible API with a dashboard and playground
laya-mlx-server
tankerwng2
Serves laya-mlx over HTTP using the Jev protocol and exposes an MCP interface
laya_vision-vs-SF2
beefkknd
Fine-tunes a Laya vision model to choose moves in Street Fighter II
LayaMail
Theani7
Prioritizes email locally by applying typed Laya decisions to messages
laya-lab
BramBouma
Offers two playable local simulations featuring real Laya decisions, rules baselines, and replay
laya-desktop
mategog
A desktop workbench runs Laya decisions offline, calibrates questions, and serves an API and MCP
laya-http-client
angelxmoreno
Provides a typed TypeScript client for Laya's HTTP protocol, with an MLX bridge sidecar
evidence-gate
AnotherMeatsack
A local workbench for evidence review, task routing, MCP tools, and reproducible Laya evaluations
verdict
iksnerd
Runs a fine-tuned Laya encoder locally to return typed judgments on Apple Silicon
laya-mlx-mirror-227
Shijiuwei
Runs Laya inference locally on Apple Silicon using MLX, with a terminal Snake demo
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