How-toUpdated 2026-07-01 · 9 min read · by RTXsparks Lab
Serving Qwen3 4B with SGLang on RTX Spark
Production SGLang deployment of Qwen3 4B on RTX Spark. Configs, systemd, TLS, observability.
Install
Install SGLang via pip/docker/apt as appropriate. Verify GPU visibility with nvidia-smi.
- # SGLang install
- # see SGLang docs
Config
Optimized SGLang config for Qwen3 4B at Q6_K: batch, KV cache dtype, and parallelism knobs.
Systemd unit
[Unit] Description=SGLang for Qwen3 4B — [Service] ExecStart=/usr/bin/sglang serve qwen3-4b --port 8000 — Restart=always.
nginx + TLS
Terminate TLS at nginx with a Let's Encrypt cert, rate-limit at 20 req/s per IP, and proxy to the local SGLang port.
Observability
Scrape SGLang Prometheus metrics into Grafana; watch tokens_per_second, batch_size, and kv_cache_usage.
Frequently asked questions
Is SGLang the fastest for Qwen3 4B?
It's the easiest, not always the fastest.
Can I run multiple models with one instance?
One process per model is standard.