Files
leleka/deploy/rust-runtime/leleka-inference.service

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`.
[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