Run and Serve Decision Models Locally with Unsloth: Laya + Jev API
Serve and run decision models locally with Unsloth.
Run and serve decision models like Laya or Clef, open Jev alternatives, on your local Mac, Windows and Linux device with Unsloth. Decision models turns text inputs into structured decisions your apps can act on - from routing support tickets, filtering emails to automated tags and classifications.
You can use the Unsloth GUI interface to expose Laya and Clef through a TypeSafe-compatible Jev API, so existing Jev integrations can work by pointing them at your local server.
All data stays on your device and CPU, unified memory, and GPU setups are all supported.

Send the decision model pieces of text, define the decisions you need (yes/no, choices, or scores), and get back calibrated probabilities.
🖥️ Recommended Settings
Multilingual (default)
4GB RAM
678 MB
Most use-cases. 100+ languages, 1024 token context.
English
5GB RAM
846 MB
English only. Larger encoder, 512 token context.
Typed decisions
5GB RAM
846 MB
English only. Invoices, security incidents, customer service, agent traces.
CPU is the default. Switch Run on GPU for faster answers. The GPU keeps the model in memory until you press Unload or restart Unsloth. If the GPU runs out of memory, Laya falls back to CPU and keeps answering.
⚡ Quickstart
Setup Unsloth
The easiest way to get started is by downloading the Unsloth Desktop app. Works on macOS, Windows, and Linux.
Or, if you prefer to install manually:
MacOS, Linux, WSL:
Windows PowerShell:
Setup Laya
Go to Settings → API → Decision API and turn on Serve requests. The default Laya model (678 MB) will then start to download after confirming if you want to start the download.
Your API key is on the same page under Access tokens. Or turn on Keyless API access → Chat and inference and skip the key on localhost.

Send a decision request
It's time to send a decision request. In this example, we classify a support ticket, detect refund requests, and score urgency.

You get back:
The first request loads the model, which takes 10 to 20 seconds. After that, requests take well under a second on most CPUs.
state can be a string or any JSON. model accepts laya, default, or jev-latest for the model you picked in settings, or laya-multilingual, laya-english, laya-typed-decisions to name one.
❓ Question types
noul
Yes or no
The probability of yes, from 0 to 1
choice
Picking one option
The most likely option, and a probability for each
score
Rating on a scale
Where the text falls on your scale, counting from 0
noul means yes/no. It returns the probability of “yes”: 0.98 means very likely, 0.5 means equally likely either way.
choice and score also return confidence. Close to 1 means one answer stands out. Close to 0 means the probabilities are spread evenly.
To act on a choice, use its value in probabilities, not confidence. For example, only file a bug report when technical is above 0.8. Laya and Jev calculate confidence differently, so don’t reuse your Jev confidence thresholds.
Each request supports up to 64 questions, with up to 255 options per choice and 10 levels per score.

🔁 Migrating from Jev
Install the SDK with pip install typesafe-sdk, set two environment variables, and your existing code talks to Unsloth:
The SDK's default model, jev-latest, maps to whichever model you picked in Settings.
Two things differ from Jev. confidence uses a different formula, so a threshold tuned on Jev won't transfer; threshold on probabilities instead. And options in a choice share a fixed token budget, so past about 20 described options the labels get trimmed.
Last updated
Was this helpful?

