# Laya-CoreML

A Core ML and Apple Neural Engine port of the Laya typed-decision model, which answers structured choice, ordinal-score and yes/no questions in a few milliseconds without generating text tokens.

Laya-CoreML runs the open-weight Laya typed-decision model locally on Apple Silicon through Core ML and the Neural Engine. Instead of generating text tokens, it returns probabilities for a defined choice, an ordinal score, or a boolean answer to a structured question, such as whether a customer is requesting a refund, which the project reports at close to 5 milliseconds per short decision on an M3 Max.

A bundled demo plays Snake locally using the model's decisions, with visible probabilities, score and safety interventions, to show the loop running live. Models download once from Hugging Face and then run fully offline; it installs with `pip install laya-coreml` and requires macOS 15 or later with Python 3.11 to 3.13.

Website: https://github.com/mizorewww/laya-coreml
