Run Laya on your Mac

Apple Silicon is the best-covered platform in the Laya ecosystem. Independent ports run the upstream checkpoints on the MLX GPU, through Core ML on the Neural Engine, or inside native Swift apps. Each port publishes its own speed and fidelity measurements, all taken on the author's own Mac.

308 projects

JevCoreML

GodModeAI2025

Provides Core ML decision models, a Swift package, an HTTP server, and a demo app

1·GitHub repo

laya

xosi

Runs Laya typed-decision inference locally on Apple Silicon with MLX

1·GitHub repo

laya-mlx-ddz

smile-magic

A browser-based 斗地主 game lets two local AI seats play using Laya on Apple Silicon

1·GitHub repo

decide

gopaljigaur

Provides a Python client that chains Laya with hosted and other decision-model backends

1·GitHub repo

jev-laya-benchmark

EnesDemir143

Benchmarks TypeSafe Jev and Laya-MLX on structured issue classification

1·GitHub repo

laya-learning-demo

Daryl9441

A runnable tutorial teaches Laya decision primitives, routing, fine-tuning, and comparison with Jev

1·GitHub repo

tetris_for_laya

fchange

Provides a terminal Tetris environment where a local Laya model chooses each action

1·GitHub repo

laya-mlx-per-turn-classifier

M37Labs

Demonstrates per-turn customer message classification with Laya on Apple Silicon

1·GitHub repo

laya-rust

zerodegress

Implements a Rust inference engine for Laya with CUDA, CPU, and MLX backends

1·GitHub repo

laya-exp

changtimwu

Experiments comparing an MLX Laya port with Jev and a TypeSafe-compatible Laya client

1·GitHub repo

laya-lab

Alevsk

Runs Laya locally with reproducible scenarios that explore its capabilities on Apple Silicon

1·GitHub repo

Tern

AmRitJain0442

A model router uses local Laya-MLX inference to select between configurable provider tiers

1·GitHub repo

lime-jev

yzxoi

Adds optional Laya reranking to a local Chinese pinyin input method on Apple Silicon

1·GitHub repo

laya-decision-api

bmw8080

An HTTP service wraps local Laya with OpenAPI documentation and Java, TypeScript, and Python SDKs

1·GitHub repo

laya-vs-dijkstra

antonellof

Compares Laya MLX pathfinding decisions with Dijkstra on seeded weighted mazes

1·GitHub repo

code-oracle

wahyuzero

Verifies code changes with AST checks and Laya-based residual-drift evaluation

1·GitHub repo

laya-browser

Benny93

Uses a local Laya model to resolve plain-English selectors in browser automation

1·GitHub repo

ghosthand

ameerhmz

A local macOS voice and computer-use agent uses Laya for typed decisions

1·GitHub repo

pi-laya-skill-router

ericmjl

Routes pi coding-agent requests to relevant skills using a local Laya model

1·GitHub repo

laya-local-guard

Kamandlou

Classifies content for safety risks locally with Laya-MLX and detects PII and secrets

1·GitHub repo

laya-system1-snake

Kamandlou

A terminal Snake game uses Laya MLX to choose moves from structured game-state features

1·GitHub repo

docweave

pareshbhangale

Converts PDFs to Markdown and uses Jev or Laya alongside local models for layout routing and table auditing

1·GitHub repo

laya-agent

inboxxobni

Runs Laya typed decisions locally on Apple Silicon and provides an HTTP server and agent integrations

1·GitHub repo

laya-router

vuongvm812

Sets up local Laya classification and Jev Router proxies for coding clients

1·GitHub repo

Pick a runtime

MLX (Python). laya-mlx is the most widely used port. It needs Apple Silicon, Python 3.11+ and macOS 14+:

pip install laya-mlx
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": "Who should handle this?",
                    "criteria": ["billing", "technical", "sales"]}},
)
print(result["answers"]["department"])

Its README reports 13.42 ms P50 for one short question with the 421M English checkpoint and 7.39 ms with the 322M multilingual one, FP16 on an M3 Max.

Core ML and the Neural Engine. laya-coreml needs macOS 15+ and Python 3.11 to 3.13 (pip install laya-coreml). Its README reports 4.98 ms P50 for one short multilingual decision on the M3 Max Neural Engine. laya-apple runs the MLX GPU and the Neural Engine together and serves a Jev-compatible API:

pip install 'laya-apple[serve,ane]'
laya-apple serve                                   # http://127.0.0.1:8642

Swift. laya-mlx-swift embeds Laya in a macOS app with MLX (about 804 MiB download). LayaKit is a Swift package over the laya-coreml bundles, and FluidUse ships a LayaManager for Core ML.

PyTorch MPS. The official laya package also runs on the Mac GPU; laya-mps wraps it in a local server with low-memory modes.

Caveats

  • All of these are independent ports, not official Convai Innovations releases. Most publish fidelity checks against upstream answers; read them.
  • The Neural Engine bundle in laya-coreml has a 96-token total limit covering question, options and state. Use the 1024-token general bundle for longer input.
  • Latency numbers are single-machine measurements. Your Mac, input length and question count will change them.

More ways to use Laya