This is a concise, hands‑on recipe for running Laya’s CoreML runtime locally on an Apple M4, claiming roughly 45 decision steps per second offline. It lists the exact shell commands to reproduce the demo: create a test directory, run uv init, add the laya-coreml demo with uv add, download the CoreML model bundle from Hugging Face (aac6fef/laya-multilingual-coreml-ane) into models/snake, and execute the demo with uv run laya-coreml-snake model models/snake. The gist includes a short MOV demo and a screenshot showing the app in action and notes that the file contains hidden or bidirectional Unicode characters that may affect how the snippet is interpreted.
The substance is a practical demonstration that an on‑device Laya/CoreML setup can deliver low‑latency inference on Apple silicon without network dependency, using the provided model package and minimal CLI steps. It links to the upstream Laya CoreML repo for reference and is aimed at users who want to test or reproduce on‑device decision throughput. The page shows some GitHub UI loading alerts and requires sign‑in to comment, but the runnable commands and the Hugging Face model identifier give everything needed to fetch and run the snake demo locally.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.