Who it is forA DevOps or platform engineer who wants several internal tools to share one local Laya model on a Mac.
The problemEach internal tool loading its own copy of the model wastes memory and setup time.
The outcomeA local HTTP service started by one command, which internal apps can call for typed decisions.
What you need first
- An Apple Silicon Mac running macOS 14 or later
- Python 3.11 or later
- Internet access for the first checkpoint download, after which inference is fully local
Steps
- Install the serve extra (inferred from the extras list and the demo install pattern):
pip install 'laya-mlx[serve]'(inferred, check the README) - Start the HTTP service:
laya-mlx-serve - Find the endpoint address and request format in the upstream documentation, since this README does not show them.
- Send one test decision request from your app or a client script and confirm a response.
- Keep the service running on the Mac that hosts the model for the other tools.
Prompt for your agent
In the laya-mlx repo (github.com/mizorewww/laya-mlx), install the serve extra and start laya-mlx-serve on this Mac. Find the request format in the upstream Laya documentation and send one choice question. Verify that the service returns an answers field with probabilities for the named options.
Caveat. The README names the serve entrypoint but does not document its endpoint or request format, so confirm those before building on them.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mizorewww/laya-mlx and "Serve Laya over HTTP for internal apps"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer