Native MLX runtime for Laya typed decision models — 7–14 ms short decisions on M3 Max. No text generation, PyTorch, or cloud API.
★ 7,104⑂ 577👁 21⑃ 18● 10▤ 4
+2
Daily
+25
Weekly
+216
Monthly
7,104
stars
577
forks
21
watchers
18
prs
10
issues
4
releases
README
Laya-MLX
Open-weight typed decisions, running natively on Apple Silicon.
中文 · Usage reference · Benchmarks · Hugging Face weights · Changelog
Laya answers constrained questions (pick an option, score against a rubric, judge true or
false) with calibrated probabilities from one bidirectional forward pass. It generates no
tokens and returns no JSON to parse. This package runs the original
Laya weights in MLX,
without PyTorch, Transformers or a cloud API.
13.4 ms median for a short English decision, 7.4 ms with the multilingual checkpoint (M3 Max, FP16).
!Laya MLX playing Snake: actual decisions at original speed
Quick start
Requires Apple Silicon, macOS 14+ and Python 3.11+.
bash
pip install laya-mlx
python
import laya_mlx as laya
agent = laya.load("aac6fef/laya-mlx")
result = agent.predict(
"I was billed twice. Please refund the duplicate.",
{
"department": {
"type": "choice",
"instructions": "Which department should handle this request?",
"criteria": {
"billing": "Payments, invoices, refunds, and duplicate charges.",
"technical": "Broken features, errors, and product troubleshooting.",
"sales": "Pricing, upgrades, and new purchases.",
},
},
"refund": {
"type": "noul",
"instructions": "Does the customer ask for money back?",
},
},
)
print(result["answers"]["department"]["choice"]) billing
Describing each option, as above, works much better than bare labels. The first load
downloads the checkpoint; later inference is fully local.
Question types
| Type | You provide | You get |
|---|---|---|
| choice | Named options, as a list or a label → description dict | Probability per option |
| score | Ordered rubric levels | Probability per level and the expected level |
| noul | A yes/no proposition | P(true) |
States can be text, JSON-like dicts or conversation lists. Each answer carries calibrated
probabilities and confidence fields; confidence does not guarantee accuracy on a new task.
Checkpoints
| Pre-converted MLX (FP16) | Original | Parameters | Context | Use |
|---|---|---:|---:|---|
| aac6fef/laya-mlx | convaiinnovations/laya | 421M | 512 | English |
| aac6fef/laya-multilingual-mlx | convaiinnovations/laya-multilingual | 322M | 1,024 | Multilingual input |
| aac6fef/laya-typed-decisions-mlx | convaiinnovations/laya-typed-decisions | 421M | 1,024 | Upstream typed-decisions workflows |
laya.load accepts either column. Context counts instructions, options and state together.
Each published checkpoint includes its model card, validation results, provenance and
checksums (pinned revisions and hashes).
What else it does
All of these are covered in the usage reference:
- Language routing: Router() detects the language, picks a checkpoint and keeps up to two resident. You can register your own checkpoints.
- Batches and long documents: predict_batch shares forward pasLatest release
laya-mlx v0.6.0 v0.6.0 2026-10-29What's Changed feat: port upstream Laya v0.4.17 behavior to MLX by @Omicron0314 in https://github.com/mizorewww/laya-mlx/pull/25 Fix typed batch grouping and hook timeout serialization by @JurhoRr in https://github.com/mizorewww/laya-mlx/pull/26 New Contributors @Omicron0314 made their first contribution in https://github.com/mizorewww/laya-mlx/pull/25 @JurhoRr made their first contribution in https://github.com/mizorewww/laya-mlx/pull/26 Full Changelog: https://github.com/mizorewww/laya-mlx/compare/v0.5.0...v0.6.0
相关报道 (7)
blog.csdn开源AI周榜实测:Laya-mlx与13个热门项目选型指南2026-11-03blog.csdnLaya-MLX 实战指南:在 Apple Silicon 上以毫秒级延迟原生运行 Laya 类型化决策模型2026-09-22搜狐本地版Jev:Laya-MLX快速崛起2026-09-22kucoinLaya-MLX 模型可在 1GB 本地記憶體上運行,提供快速決策2026-09-22智源社区本地版Jev 1G内存就能跑!四舍五入等于不要钱啊2026-09-23OrcaRouterApple Silicon 上的 Laya:MLX 移植究竟能带来什么2026-09-23Pasquale PillitteriLaya登陆Apple Silicon,laya-mlx版本以每秒60步的速度玩贪吃蛇2026-09-22
News & coverage (7)
Hacker NewsLaya MLX▲ 3 · 1 comments · 2026-09-20aiweeklyLaya MLX ships 13.4 ms typed decisions on Apple Silicon2026-09-22kucoinThe Laya-MLX model can run on 1GB of local memory, enabling fast decision-making.2026-09-21Pasquale PillitteriStanford and NVIDIA release CLM-8B, 9 times faster than Jev2026-09-28OrcaRouterLaya on Apple Silicon: What the MLX Port Actually Buys You2026-09-23Pasquale PillitteriLaya lands on Apple Silicon with laya-mlx, plays Snake at 60 moves a second2026-09-22Pasquale PillitteriOpen Source Clones of TypeSafe's Jev Arrive in a Week, Free on an RTX 30902026-09-21