Setup: Local Decision Model
Run a small Decision model on your own machine and register it in TomoriBot. A Decision model answers questions about a text, such as yes or no or which of several topics fits, with probabilities. Kev is an open one that speaks the System One protocol, the same one TypeSafe’s hosted Jev uses.
1. Run Kev
Section titled “1. Run Kev”Kev needs Git, uv, and Python 3.12 or 3.13 (uv installs Python for you if needed). Pick a size that fits your memory:
| Model | Hub ID | Weights (approx.) | Notes |
|---|---|---|---|
| Kev-0.8B | jaredpalmer/kev-0.8b | 2 GB | Runs on a 4 GB GPU. Least accurate. |
| Kev-4B | jaredpalmer/kev-4b | 8-9 GB | Kev’s recommended starting point if it fits in your memory. |
Clone Kev somewhere outside the TomoriBot folder and start the server for your OS:
These steps were checked on native Windows with an NVIDIA GPU. If the server does not start natively, run the Linux steps inside WSL2 instead.
git clone https://github.com/jaredpalmer/kev.gitcd kevuv sync --extra serveOn Windows with an NVIDIA GPU, uv sync installs a CPU-only PyTorch build, which is far too slow. Replace it with the CUDA build and check that it sees your GPU:
uv pip install --reinstall-package torch "torch>=2.6,<2.9" --index-url https://download.pytorch.org/whl/cu128uv run --no-sync python -c "import torch; print(torch.cuda.is_available())"It must print True. From then on, start Kev with uv run --no-sync, because a plain uv run syncs the CPU build back in:
uv run --no-sync python -m kev.serve --run jaredpalmer/kev-4b --port 8009 --device cuda--device cuda makes Kev fail loudly if it cannot use your GPU instead of silently running on the CPU. Use jaredpalmer/kev-0.8b if Kev-4B runs out of memory.
Leave the server running and check it from another PowerShell window:
Invoke-RestMethod http://127.0.0.1:8009/v1/models$body = '{"state":"The fictional door is blue.","model":"kev-latest","questions":{"q":{"type":"noul","instructions":"Is the door blue?"}}}'Invoke-RestMethod http://127.0.0.1:8009/v1/systemone -Method Post -ContentType "application/json" -Body $bodygit clone https://github.com/jaredpalmer/kev.gitcd kevuv sync --extra serveCheck whether PyTorch detects your GPU before starting (standard Linux PyPI PyTorch wheels include CUDA support):
uv run python -c "import torch; print(torch.cuda.is_available())"Start the server. Add --device cuda on NVIDIA GPUs so Kev fails loudly instead of falling back to CPU, or omit --device cuda for automatic device selection:
uv run --extra serve python -m kev.serve --run jaredpalmer/kev-4b --port 8009 --device cudaUse jaredpalmer/kev-0.8b if Kev-4B runs out of VRAM. On AMD ROCm setups, install a ROCm PyTorch build into the environment first and run with uv run --no-sync so uv keeps that build.
Leave the server running and check it from another terminal:
curl -s http://127.0.0.1:8009/v1/modelscurl -s -X POST http://127.0.0.1:8009/v1/systemone \ -H "Content-Type: application/json" \ -d '{"state":"The fictional door is blue.","model":"kev-latest","questions":{"q":{"type":"noul","instructions":"Is the door blue?"}}}'On Apple Silicon Macs, Kev uses MPS (and MLX when available on arm64); do not pass --device cuda. Intel Macs fall back to CPU.
git clone https://github.com/jaredpalmer/kev.gitcd kevuv sync --extra serveStart the server (use jaredpalmer/kev-0.8b if 4B exceeds available unified memory):
uv run --extra serve python -m kev.serve --run jaredpalmer/kev-4b --port 8009Leave the server running and check it from another terminal:
curl -s http://127.0.0.1:8009/v1/modelscurl -s -X POST http://127.0.0.1:8009/v1/systemone \ -H "Content-Type: application/json" \ -d '{"state":"The fictional door is blue.","model":"kev-latest","questions":{"q":{"type":"noul","instructions":"Is the door blue?"}}}'The first run downloads the model, so it takes a few minutes. The model-list check returns kev-latest, and the System One check returns a probability between 0 and 1 for the yes/no question.
Kev prints a warning that flash-linear-attention is missing when those kernels are unavailable. It then uses a slower path that gives the same answers, so you can ignore it.
2. Register it in Discord
Section titled “2. Register it in Discord”Run /providers, choose Add New Custom Endpoint, and enter:
| Field | Value |
|---|---|
Endpoint Label | kev |
Endpoint URL | http://127.0.0.1:8009/v1 |
API Compatibility | System One compatible |
Auth Token | Leave blank, unless you set KEV_API_KEY |
TomoriBot checks GET /v1/models when you save. A server that answers 404 or 405 there is still accepted.
Open the saved kev endpoint, choose + Add new Decision Model from its model dropdown, and enter:
Code Name:kev-latest, the model name Kev’s examples use.Context Window:8192, the longest text Kev-0.8B and Kev-4B are validated for. Kev refuses anything over 65,536 tokens.
3. Select it
Section titled “3. Select it”Open /config > Models > Switch Models and pick kev-latest in the Decision slot. - No Model clears it without deleting the registration.
Notes and gotchas
Section titled “Notes and gotchas”- Stop the server with
Ctrl+C. TomoriBot does not start or stop Kev for you. - TomoriBot in Docker?
127.0.0.1inside the container is not your host. Usehttp://host.docker.internal:8009/v1and start Kev with--host 0.0.0.0. Kev has no login by default, so setKEV_API_KEYfirst and put the same value inAuth Token. - Production runtimes enforce HTTPS and block private addresses for provider endpoints. A local HTTP URL works outside production when
ALLOW_PRIVATE_NETWORKistrueor lists itshost:port. See Local LLM. - Other System One servers such as Laya use the same steps with their own URL and model name. A server that implements the OpenAI Decisions API uses
OpenAI Decisions compatibleinstead.