Route tickets, flag spam, score urgency. Answers in milliseconds on Apple Silicon, with no cloud API and no per-token bill.
Sends the ticket off your machine, writes a paragraph back, and bills you per token.
Billing team. Refund requested. Three answers in 25 ms, without a single word generated.
By Raj Singh · October 2026 · 6 min read
One email opens every guide in the library.
One email. No follow-up unless I ship something that fits.
Install it, load the default English model, and ask it a typed question. The first load downloads the weights; every call after that is local.
billing with a probability around 0.89 means it works. I ran five different tickets through this exact call and all five went to the right team, at about 11 ms each.There are three published models. The choice matters more than any setting, because it decides how much of a message the model can read.
| model | reads up to | pick it when |
|---|---|---|
| aac6fef/laya-mlx | 512 tokens | short English messages: tickets, form fields, chat lines |
| aac6fef/laya-multilingual-mlx | 1,024 tokens | anything not in English, or longer messages. The project measures it as the faster one too |
| aac6fef/laya-typed-decisions-mlx | 1,024 tokens | the upstream typed-decisions workflows |
Defaults worth knowing: dtype="float16" (use float32 only if you need closer numbers, not better answers), batch_size=16 questions per pass. compile=True, pad_to_multiple=16 and cache_prompts=True are off by default; turn them on only for a loop that asks the same questions thousands of times, because compilation costs time on first use.
Laya doesn't write text. You give it a message and typed questions, and it returns probabilities. Ask several questions at once: they run in the same call.
| type | returns | use it for |
|---|---|---|
| choice | one of your named options + probabilities | which team, which category, which intent |
| score | a level on your scale + expected score | urgency, sentiment, lead quality |
| noul | the chance a statement is true | is this spam? did they ask for a refund? |
answer_confidence on every answer and send anything under 0.7 to a person. In my five-ticket test the two lowest were a sales question at 0.59 and a login problem at 0.67. Both were right, but those are the ones to check. The project is clear that confidence does not guarantee accuracy.usage.truncated, switch to the multilingual model (1,024 tokens), or pass a conversation list, which keeps the newest turns.laya.Router, which detects the language and picks the right model.laya.predict_shortlist to keep the top 20 first.The command line does the same as the Python API: laya-mlx predict --model aac6fef/laya-mlx --state-file examples/state.json --questions examples/questions.json from a clone of the repo.
One install, one model download, and the small yes, no and which-one calls in your app stop going to the cloud. They come back in milliseconds, on your Mac, for nothing.
↑ Unlocks the moment you submit the form above.
I'm Raj Singh, founder of DebtOps.ai and a Claude certified partner. Over the last five years I've managed $25M in ads, built AI solutions for Fortune 100 companies, and installed AI operating systems and AI brains inside small businesses. Everything here is something I've shipped, debugged, or watched a client ship. My goal with AgileSingh is to make you irreplaceable in this AI age.
The FreeLLMAPI guide gets you free tokens for the jobs that do need a big model, and the OpenBB guide gives Claude live market data for free.