DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to serve Laya over HTTP for internal apps with Laya MLX

Run a local Laya HTTP service that other internal tools can call.

Short answer: Install the serve extra (inferred from the extras list and the demo install pattern): pip install 'laya-mlx[serve]'; then 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. All steps.

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

  1. Install the serve extra (inferred from the extras list and the demo install pattern): pip install 'laya-mlx[serve]' (inferred, check the README)
  2. Start the HTTP service: laya-mlx-serve
  3. Find the endpoint address and request format in the upstream documentation, since this README does not show them.
  4. Send one test decision request from your app or a client script and confirm a response.
  5. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer