Practical overview
When it fits
Use it when an Apple Silicon application needs local, constrained decisions rather than free-form text generation, and its typed outputs fit the task.
Who it is for
- Python developers building local decision features into macOS applications on Apple Silicon.
- Teams that need typed outputs such as option probabilities, rubric scores or proposition probabilities.
- Developers exploring multilingual typed-decision inference or decision-driven interactive applications.
Documented uses
- Route a message among named categories, such as billing, technical or sales.
- Assess a state against ordered rubric levels and obtain an expected score.
- Estimate whether a proposition is true.
- Use model decisions to control an interactive application such as the documented Snake demo.
Requirements & limits
The primary inference workflow uses a Python package and downloads a model checkpoint on first load; later inference is local. Requires Apple Silicon, macOS 14 or later and Python 3.11 or later.
- This is a runtime and library, not a hosted inference API; applications integrate it through Python.
- The three documented checkpoints differ in language purpose, parameter count and context limit: 512 tokens for English Laya, 1,024 for multilingual and typed-decisions models.
- Context limits include state, instructions and options, so the full decision input must fit.
- Reported M3 Max latency is for short questions and excludes model loading; hardware and workload affect results.
- The repository covers inference and conversion, while training and fine-tuning remain in the upstream project.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the library and load a decision model
Set up the Python package and load a checkpoint for a typed choice prediction.
Before you start
- Apple Silicon
- macOS 14 or later
- Python 3.11 or later
- Internet access for the first checkpoint download
Steps
Install the package with the command below.
pip install laya-mlxImport
laya_mlxin Python and loadaac6fef/laya-mlxwithlaya.load(...).Call
agent.predictwith a state and a choice question containing instructions and named criteria; read the selected answer from the returned answers object.
Expected outcome
A locally computed typed choice, such as a department assignment for a customer message.
Guide limitations
- The first model load downloads the checkpoint; later inference runs locally.
- This recipe covers inference, not training or fine-tuning.
- The example uses the English checkpoint; model context limits include state, instructions and options.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 October 2026
- Original website title
- mizorewww/laya-mlx · Official homepage title · retained in its source language

