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_server
smarty-kiki
Serves a local Laya decision model through a Jev-compatible API on Apple Silicon
laya-auto-mode
tuncer-byte
Adds Laya-powered automatic model routing to the GitHub Copilot Chat model picker
AgentSmith
nsh1999
Standalone demos explore local Laya inference, typed decisions, and LLM agent workflows
laya-model-lora-finetune-mps
kotari4u
Fine-tunes Laya with LoRA on Apple Silicon and exports model checkpoints and adapters
Laya_Jev_opensource_guide
gotree94
Explains how to self-host Laya and Jev, including setup, fine-tuning, and benchmarks
distill-public
abhi-sama
Fine-tunes local Laya decision models from synthetic data and evaluates and exports calibrated models
go-laya-mlx
eiri
Provides Go inference for the Laya model on Apple Silicon using MLX
juggernaut
prayingperceptions
Provides a single-goal agent template using laya-mlx for local typed decisions on Apple Silicon
laya-control
minhoyooDEV
Coordinates local datasets, training jobs, evaluation, and releases for Laya
laya-ctl
r1cc4rd0m4zz4
Manages laya-serve as a background daemon with memory profiles and readiness probes
open-laya
yeohjarvis-source
Serves Laya text and multimodal inference through an authenticated MLX API
mlx-quantization-lora-eval
D-Harshith
Benchmarks MLX quantization and LoRA alongside Laya encoder classifiers on GitHub issue classification
@fllstck/mlayax
kay-is
Runs the Laya typed-decision model in Node and Bun on Apple Silicon using MLX
laya-mlx
Thar-Paing123
A native MLX runtime for running Laya typed-decision models on Apple silicon
laya-coding-harness
MysterTech
Local advisor that uses laya-mlx to suggest model, effort or planning for Claude Code and Codex
laya-workiq-routing
hieunhums
A fine-tuned Laya model routes Microsoft 365 workplace questions to Work IQ sources
laya-demo
vighnesh-chavan
Demonstrates Laya typed decisions in Doom and a custom pygame shooting game
laya-computer-use
adityachauhan0
Provides a macOS MCP server that uses Laya MLX to choose computer-use actions
FaradayLayaBenchmark
kurtfi
Benchmarks local models for MCP and agent security with a fail-fast evaluation pipeline
laya-fine-tuning
bnap00
Guides fine-tuning Laya on a 6 GB GPU with Pac-Man and Pigeonhole examples
laya-kit
Berk-Unsal
Supports offline Kubernetes incident triage using the laya-mlx model
laya-pinyin-ime
stevelikesrhino
Provides a private macOS pinyin input method with an optional Laya-based candidate ranker
decision-model-arena
dante01yoon
Compares four decision models, including local Laya, across games and image-based decisions
feedcast
TimurAkhtemov
Produces local narrated news episodes using RSS feeds and models including Laya
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