Files
leleka/deploy/rust-runtime/leleka-inference.service
T
Pavlo RatushnyiandClaude Sonnet 5.5 b63a91b2fa deploy: rtx5090-32g gpu_budget_bytes 30 GiB -> 32,819,404,800 (31,299 MiB) so the dense-slab slot gain reaches the product
Needed for the slot gain: the slabs save physical bytes the Context never charged, so the
budget must rise by about that much. Smoke with this budget: ~11,568 slots, lowest free VRAM
1,035 MiB. Also the systemd unit template, the config and reconfigure tests, and the docs.
Preflight now needs 31,299 MiB free at start (was 30,720; idle 5090 reports 32,110).
Revert by restoring 32212254720. Owner confirmation required before merge.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 11:59:55 +01:00

30 lines
1.5 KiB
Desktop File

# TEMPLATE, not run with the real model: user unit for the engine process (gRPC on loopback).
# Replace @PREFIX@ (binaries), @ASSETS@ (model assets), @STATE@ (private state dir) and install runtime.env
# next to it (mode 0600). The 55 GB KAR archive is copied into a sealed memfd at every start (RAM, minutes);
# nothing loads the model afterwards: run `leleka-cli ... load-mtp` (docs/rust-runtime-run.md).
[Unit]
Description=Leleka inference engine (Original serve path, gRPC on loopback)
[Service]
Type=exec
EnvironmentFile=@STATE@/runtime.env
UMask=0077
NoNewPrivileges=yes
# A failed engine start must be looked at, not retried into another 55 GB copy.
Restart=no
# leleka-inference and leleka-daemon handle SIGINT only (tokio ctrl_c); the default SIGTERM would end them abruptly.
KillSignal=SIGINT
TimeoutStopSec=60
ExecStartPre=/usr/bin/install -d -m 0700 @STATE@/mtp-staging
ExecStart=@PREFIX@/leleka-seal-exec --file @ASSETS@/qwen-iq3-s-l2-v4.kar --expect-bytes 55295529472 -- \
@PREFIX@/leleka-inference --listen 127.0.0.1:18766 --token-env LELEKA_RUNTIME_TOKEN \
--shard0 @ASSETS@/model/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf \
--shard1 @ASSETS@/model/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf \
--gpu 0 --gpu-budget 32819404800 --context-tokens 262144 \
--kar-archive-fd {FD} --kar-provenance @ASSETS@/qwen-iq3-s-l2-v4.kar.provenance.json \
--mtp-pack @ASSETS@/data/mtp-rt --mtp-staging @STATE@/mtp-staging \
--backend-mode original
[Install]
WantedBy=default.target