All apps · 0 apps
laya-system-one
Docker app from PikkonMG's Repository
Overview
Laya System 1 decision engine. A fast model that answers typed questions about text in one pass: pick a choice, give a score, or say yes, no or unsure, each with a calibrated probability. It serves the Jev-compatible /v1/systemone HTTP API for routing, triage, moderation and guardrails.
Before first start:
- Pick cpu or nvidia when you install. The nvidia choice sets Extra Parameters to --runtime=nvidia for you and needs the Unraid NVIDIA Driver plugin.
- Optional: set an API key. Clients then send Authorization: Bearer YOUR_API_KEY. Leave it blank for no key.
- The first start downloads the model weights (a few GB) into the Model cache folder. The container shows healthy when the models are loaded.
The API docs page is at http://YOUR_Unraid_IP:8012/docs. Keep the port on a trusted network.
Readme
View on GitHubLaya System 1 on Unraid
Laya is a fast "System 1" decision engine. You give it some text and a set of typed questions. It answers every question in one pass, each with a calibrated probability:
choicepicks one option from a listscoreplaces the text on a scalenoulanswers yes, no or unsure
It serves the Jev-compatible /v1/systemone HTTP API. Use it for routing,
triage, moderation and guardrails in front of a larger model.
Laya has no official Docker image. This template runs
pikkonmg/laya-system-one, which is built from the upstream source and
rebuilt when Laya has a new release. The Dockerfile and the build workflow
are public at
PikkonMG/laya-system-one-docker.
First start
Copy
templates/laya-system-one.xmlto/boot/config/plugins/dockerMan/templates-user/my-laya-system-one.xmlon Unraid. Then open Docker > Add Container and pick laya-system-one from the user templates.Pick a tag. Community Applications asks you when you click Install:
Tag Extra Parameters Also needed cpuEmpty Nothing nvidia--runtime=nvidia, filled in for youUnraid NVIDIA Driver plugin, driver 560 or newer From a user template, set Repository to
pikkonmg/laya-system-one:nvidiaand Extra Parameters to--runtime=nvidiayourself.If the
nvidiacontainer cannot see the GPU, it stops and the log tells you what is missing.Optional: set API key. Leave it blank and the API needs no key. When you set one, clients must send it.
Apply the template. The first start downloads the model weights, a few GB, into
/mnt/user/appdata/laya-system-one. The container shows healthy when the models are loaded.Open
http://YOUR_UNRAID_IP:8012/docsto see the API.
Call the API
Send the text as state and your questions as questions. Leave out the
Authorization line when you did not set an API key.
curl -s http://YOUR_UNRAID_IP:8012/v1/systemone \
-H 'content-type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"state": {
"body": "I was charged twice for my subscription. Please refund the duplicate charge."
},
"questions": {
"department": {
"type": "choice",
"instructions": "Which department should handle this request?",
"criteria": {
"billing": "invoices, payments, refunds",
"technical": "bugs, outages, system errors",
"sales": "pricing, new contracts"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": ["not urgent", "needs attention soon", "critical deadline or blocking issue"]
},
"refund_requested": {
"type": "noul",
"instructions": "Does the user explicitly request a refund?"
}
}
}'
GET /health needs no key. It shows the device and the loaded models.
Models
Laya has three models. A router picks one for each request.
| Name | Use |
|---|---|
english |
English text, up to 512 tokens |
multilingual |
100+ languages, up to 1024 tokens |
typed-decisions |
Structured decisions, up to 1024 tokens |
Models to load picks which models load at start:
| Choice | Memory, about |
|---|---|
english,typed-decisions (default) |
4 GB |
english |
2 GB |
english,multilingual |
3.5 GB |
english,multilingual,typed-decisions |
5.5 GB |
Automatic routing only picks english or multilingual. A request uses
typed-decisions when it names that model, or when Auto typed
decisions is 1. Text in another language still loads multilingual on
first use, even when it is not in the list.
Storage and updates
The appdata path maps to /data inside the container. It holds only
downloaded model weights, so you can delete it and they download again.
The container sets the folder owner to PUID:PGID at start.
Set Offline mode to 1 to stop all downloads once the weights are in
the cache.
Sources
Install laya-system-one on Unraid in a few clicks.
Find laya-system-one in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Categories
Download Statistics
Related apps
Explore more like this
Explore allLinks
Details
pikkonmg/laya-system-one:cpuRuntime arguments
- Web UI
http://[IP]:[PORT:8000]/docs- Network
bridge- Shell
bash- Privileged
- false
Template configuration
Host port for the /v1/systemone API, /health and the /docs page.
- Target
- 8000
- Default
- 8012
- Value
- 8012
Downloaded model weights. The container sets the owner to PUID:PGID at start.
- Target
- /data
- Default
- /mnt/user/appdata/laya-system-one
- Value
- /mnt/user/appdata/laya-system-one
Models loaded at start. More models use more memory, about 2 GB for english or typed-decisions and 1.5 GB for multilingual. Pick english,multilingual if you send text in other languages. Non-English text still loads multilingual on first use.
- Target
- LAYA_MODELS
- Default
- english,typed-decisions|english|english,multilingual|english,multilingual,typed-decisions
- Value
- english,typed-decisions
Optional. Blank means no key is needed. When set, clients send Authorization: Bearer YOUR_API_KEY. /health never needs a key.
- Target
- LAYA_API_KEY
1 loads the models before the server listens, so the first request is fast. 0 loads each model on its first request.
- Target
- LAYA_PRELOAD
- Default
- 1
- Value
- 1
1 lets the router send requests to the typed-decisions model on its own. 0 uses it only when a request names it.
- Target
- LAYA_AUTO_TASK
- Default
- 0
- Value
- 0
Threads for CPU work. Keep at or below your physical core count.
- Target
- OMP_NUM_THREADS
- Default
- 4
- Value
- 4
Requests handled at once. Extra requests get HTTP 503 instead of waiting.
- Target
- LAYA_MAX_CONCURRENT
- Default
- 16
- Value
- 16
Optional. The default models are public and need no token.
- Target
- HF_TOKEN
1 uses only models already in the Model cache and never downloads.
- Target
- HF_HUB_OFFLINE
- Default
- 0
- Value
- 0
One of critical, error, warning, info, debug or trace.
- Target
- LAYA_LOG_LEVEL
- Default
- info
- Value
- info
nvidia tag only. Use all or one GPU UUID from the NVIDIA Driver plugin page.
- Target
- NVIDIA_VISIBLE_DEVICES
- Default
- all
- Value
- all
nvidia tag only. Keep compute,utility.
- Target
- NVIDIA_DRIVER_CAPABILITIES
- Default
- compute,utility
- Value
- compute,utility
User the server runs as. Unraid default is 99 (nobody).
- Default
- 99
- Value
- 99
Group the server runs as. Unraid default is 100 (users).
- Default
- 100
- Value
- 100