GitHub · Runtime ports · Games and demos
mizorewww/laya-mlx
The fastest local run on an Apple laptop, benchmark caveats included.

What it does
Runs Laya's weights natively on Apple Silicon through MLX with the same three question types, the same formatting and the same calibration as upstream, and ships its own converted weights. A Snake demo calls the model for every move so the speed claim has something to watch.
The repository's own description: “Native MLX runtime for Laya typed decision models — 7–14 ms short decisions on M3 Max. No text generation, PyTorch, or cloud API.”
How it works
The encoder and the decision heads load through MLX and stay on the Metal GPU; the package exposes one predict call that takes the state and the questions together. The demo puts a visible safety layer between the model's proposal and the move, so the game measures the loop rather than the model alone.
The repository, by the numbers
Read from the GitHub API on 2026-09-24. Stars and the last push move daily — quote them with the date, the way we do.
What we checked
- the README and its benchmark table, read 2026-09-24
- the caption separating the one-question latency number from the Snake frame time
- the licence file
What we did not check. The 7.4 ms and 13.4 ms medians. They are the author's, measured on an M3 Max, and no row in this column can be compared to another row's latency because nobody measured on the same machine.