Building a home AI lab on NVIDIA GB10: setup, fail-safes and benchmarks
Contents10
I set up a home AI lab on an MSI EdgeXpert MS-C931, built around NVIDIA’s GB10 Grace Blackwell chip with 128 GB of unified memory.
The machine runs open models through vLLM, accessible from my laptop, phone and VPS (coding agents) over Tailscale.
The box has to run on its own while I travel, so I wanted automatic internet failover, controlled model restarts, protection against memory exhaustion and a way to recover from an unresponsive system.
I used NVIDIA’s DGX Spark playbooks, community recipes and published benchmarks to plan the configuration. Then I tested the models, memory allocations and failure scenarios on the actual hardware.
1. Hardware and software
The MS-C931 is MSI’s version of NVIDIA’s DGX Spark. It runs NVIDIA’s DGX OS and has a 4 TB SSD. Its CPU and GPU share one memory pool, so the weights, KV caches (the memory each model keeps for the text it’s working on), runtime allocations and the OS compete for it. Usable memory is 121.7 GiB, with about 117 GiB available before models load.
vLLM serves the models through OpenAI-compatible APIs, so any client that speaks that API works and doesn’t need to run on the same machine. I use Open WebUI for chat and Hermes Agent and Pi for coding.
The inference endpoints and chat interface bind to the machine’s Tailscale address. SSH is available through Tailscale and the home LAN.
No public inbound ports are required.
2. Connectivity and network access
The primary internet connection and the 5G backup both sit behind carrier-grade NAT (CGNAT), so inbound port forwarding isn’t possible.
- Remote access goes through Tailscale, with key-only SSH. Node key expiry is off for the server, so access doesn’t lapse after 180 days.
- SSH also works over the home LAN, a fallback that only helps when I’m home.
- ufw filters only LAN traffic. A port that ufw blocked still answered from my laptop over Tailscale. Docker’s published ports and host networking can bypass ufw too. Device-level access belongs in Tailscale ACLs, with each container bound to an explicit address.
- vLLM’s
/metricsendpoint needs no API key and uses the same port as the model API. Any device that can reach a model can read it. Blocking it takes an authenticating reverse proxy.
3. Fail-safes for unattended operation
| Area | Failure | Protection |
|---|---|---|
| Network | Primary internet fails | Router switches to 5G within 30 s |
| Tailscale unavailable | SSH over the LAN | |
| Memory | Not enough memory to start a model | Pre-start memory check |
| Benchmark uses too much memory | Stop below 15 GiB available | |
| Available memory below 6 GiB | Stop models and block restarts | |
| Linux OOM killer runs | Lower kill priority for SSH and Tailscale | |
| Services | Model keeps crashing | systemd allows three restarts an hour |
| Both models start at once | Sequential startup | |
| Container logs fill the disk | Docker log caps | |
| Host | System hangs | Hardware watchdog reset after 30 s |
| Kernel panic | Reboot after 10 s | |
| System suspends | Mask sleep and suspend | |
| Power cut | Home inverter (battery backup) |
systemd restarts a model that crashes. A memory failure is different. Restarting the same model straight away can run out of memory again, so the memory watchdog stops the models and leaves them stopped.
SSH and Tailscale run with OOMScoreAdjust=-900, so when Linux runs out of memory its OOM killer is far more likely to kill a model than either of them. That protects remote access, though a box under that much pressure can still stop responding.
If the system hangs, the hardware watchdog resets it. systemd services its timer. If the timer goes 30 seconds without service, the hardware reboots the box:
RuntimeWatchdogSec=30s
A kernel panic reboots the box after ten seconds instead of hanging:
kernel.panic = 10
4. Memory planning on the GB10
Memory is the main operational constraint on this hardware.
The CPU and GPU share one pool, so a model consuming too much memory can leave the entire host unresponsive, including SSH.
For each model I check:
- Model weights loaded into memory
- KV cache allocated for context and concurrent requests
- Remaining host memory after the inference server is ready
vLLM reports the first two during startup:
Model loading took X GiB
Available KV cache memory: Y GiB
For the remaining host memory, I read MemAvailable in /proc/meminfo. It’s Linux’s estimate of how much memory a new process can get without swapping.
Don’t use gpu-memory-utilization as a process limit
vLLM’s --gpu-memory-utilization controls the budget used for planning GPU allocations, including the KV cache. It isn’t a hard cap on total memory consumption.
I loaded Qwen3.8-27B (dense, with a small draft model) and Qwen3.6-35B-A3B (mixture-of-experts, MoE) separately with this setting at 0.60, equivalent to a nominal budget of approximately 73 GiB.
| Model | Weights | KV cache | Total used | Memory available |
|---|---|---|---|---|
| Qwen3.8-27B + draft model | 23.7 GiB | 40.4 GiB | ~74 GiB | 43–45 GiB |
| Qwen3.6-35B-A3B | 24.9 GiB | 38.8 GiB | ~83 GiB | 33–35 GiB |
Despite similar weight sizes and identical configured fractions, the MoE model consumed approximately 9 GiB more total memory.
Runtime buffers and other allocations account for memory outside the reported weight and KV-cache figures.
Mia’s AI Lab publishes measured recipes for these boxes. Mia recommends keeping 26 to 30 GiB of memory available. I set the two models’ memory shares to leave that much.
Mia also notes that Docker’s --memory limit is not a dependable way to constrain GPU-related memory consumption on this platform.
Memory watchdog
The watchdog checks MemAvailable every second.
At 15 GiB, the script that launches each test model stops it. This prevents a benchmark from continuing into dangerously low headroom.
At 6 GiB for five consecutive seconds, the watchdog saves model logs, stops the model containers and creates an emergency marker that blocks automatic restarts until cleared or rebooted.
The two thresholds serve different purposes. The benchmark should stop early. The watchdog is the final safeguard for the running models.
An abridged version of the watchdog:
#!/usr/bin/env bash
MIN_AVAIL_GIB=6
WARN_AVAIL_GIB=15
DEBOUNCE=5
MARKER=/run/ailab-memwatch.emergency
UNITS="ailab-vllm.service ailab-vllm-qwen36.service"
low=0
warned=0
while sleep 1; do
a=$(awk '/MemAvailable/ {
print int($2/1048576)
}' /proc/meminfo)
if (( a < WARN_AVAIL_GIB )); then
(( warned )) || echo "WARNING: ${a} GiB available"
warned=1
else
warned=0
fi
if (( a < MIN_AVAIL_GIB )); then
low=$((low + 1))
else
low=0
fi
if (( low >= DEBOUNCE )) && [ ! -e "$MARKER" ]; then
echo "EMERGENCY: ${a} GiB" | tee "$MARKER"
for c in $(docker ps \
--filter label=ailab.gpu=true \
--format '{{.Names}}'); do
docker logs --tail 3000 "$c" \
> "/var/log/ailab-memwatch-$c-$(date +%s).log" 2>&1
docker stop -t 30 "$c" &
done
wait
for u in $UNITS; do
systemctl stop --no-block "$u"
done
fi
done
The service runs with Restart=always and OOMScoreAdjust=-1000. Model startup checks honour the emergency marker, preventing systemd from immediately relaunching workloads after a shutdown.
The marker is stored under /run, which is cleared on reboot.
A userspace watchdog cannot catch every instantaneous memory spike. The reserve, startup checks and emergency shutdown work together rather than relying on one mechanism.
The benchmark safeguard has already triggered once. The emergency watchdog has not.
5. Model selection and benchmarking
I shortlisted models using NVIDIA’s DGX Spark playbooks, model cards (Qwen3.8-27B, Qwen3.6-35B-A3B) and community measurements from Mia’s AI Lab, atakann and jschmied.
Published performance figures were useful for narrowing the choices, but they varied considerably. Qwen3.8-27B, for example, had reported speeds ranging from around 18 to 58 tokens per second, depending on the engine, prompt and speculative decoding setup.
To test every model the same way, I wrote a benchmark in Python using the standard library.
It measures:
| Test | Method |
|---|---|
| Decode speed | Median of three code and three prose runs, measured from streamed tokens |
| Time to first token | Approximately 28,000-token prompt with a random prefix to avoid prefix-cache reuse |
| Concurrent throughput | Four simultaneous requests, measured as aggregate tokens per second |
| Tool calling | Three attempts at a request that needs an actual function call |
All measurements were taken using vLLM 0.31 in NVIDIA’s nvcr.io/nvidia/vllm:26.10.pre1-py3 container with NVFP4 checkpoints.
Dense versus mixture-of-experts
Qwen3.8-27B is a dense model with strong published coding scores. It runs with a small draft model that proposes tokens for the main model to check (speculative decoding).
Qwen3.6-35B-A3B is a mixture-of-experts model with 35 billion parameters, about 3 billion of them active per token. Each token reads fewer weights from memory, so it generates faster. It also does its own speculative decoding with built-in multi-token prediction (MTP).
Running each model alone:
| Model | Code decode | Prose decode |
|---|---|---|
| Qwen3.8-27B | 56 tok/s | 27 tok/s |
| Qwen3.6-35B-A3B | 108 tok/s | 90 tok/s |
The MoE model was nearly twice as fast on code and more than three times as fast on prose.
These are throughput measurements, not model-quality comparisons.
Running two models on one GB10
I then ran both models with reduced memory allocations (0.34 and 0.31), testing each with the other model idle and actively generating. The solo runs used a 0.60 share.
The longer-context and concurrency measurements show the same pattern.
| Test | First token, 28k prompt | Four requests, aggregate | Lowest free memory |
|---|---|---|---|
| 27B alone | 12.4 s | 91 tok/s | 42.9 GiB |
| 27B + idle neighbour | 12.3 s | 85 tok/s | 28.7 GiB |
| 27B + busy neighbour | 25.0 s | 41 tok/s | 26.9 GiB |
| 35B-A3B alone | 5.3 s | 198 tok/s | 33.5 GiB |
| 35B-A3B + idle neighbour | 4.9 s | 197 tok/s | 26.9 GiB |
| 35B-A3B + busy neighbour | 10.2 s | 97 tok/s | 26.9 GiB |
An idle neighbour made almost no difference. When both models generated at once, each fell to 40 to 50% of its solo speed, because they share the GPU’s compute and memory bandwidth. Keeping both loaded saves restarts when agents and chat use them on and off, but sustained parallel work is limited by the shared GPU.
Tool calls worked in every run but one, where Qwen3.6-35B-A3B answered a weather question instead of calling the function. Three attempts per model only show that tool calling works.
Under load, the GPU held 2,405 MHz at up to 80 °C with no throttling reported.
6. Checking a published recipe before using it
Laguna S 2.1: pin the model revision
Poolside’s Laguna S 2.1 is a coding model with 118 billion parameters, about 8.5 billion of them active per token. Community recipes put it at about 71 GB (66 GiB) in memory, so I gave it an 85 GiB budget. vLLM reported:
Model loading took 95.93 GiB
Available memory fell to 14 GiB and the benchmark safeguard stopped the container.
The Hugging Face repository explained the gap. On 1 August 2026, Poolside replaced the main-branch files with a checkpoint that keeps the experts in layers 40 to 47 at BF16 instead of 4-bit. The recipes had measured the July files.
Hugging Face serves main unless you ask for a revision, so a recipe’s numbers only hold for the files it measured. Check the commit history and file sizes before pulling a large checkpoint, then pin the revision you tested:
# List commits and dates
curl -s https://huggingface.co/api/models/<repo>/commits/main
# Inspect file sizes at a revision
curl -s "https://huggingface.co/api/models/<repo>/tree/<sha>?recursive=1"
# Download an exact revision
hf download <repo> --revision <sha>
Leave trust_remote_code off as well, since it runs Python code from the model repo. Laguna ships its own modelling code for it, but NVIDIA’s vLLM image supports the architecture natively.
Qwen3.6-35B-A3B: match the vLLM version
Unsloth’s model card recommends --moe-backend flashinfer_b12x on DGX Spark and warns that the model is much slower without it. On vLLM 0.31 the model wouldn’t start with that flag:
FP8 MoE backend='flashinfer_b12x' is not supported
The flag forces that backend onto every MoE layer, including the checkpoint’s FP8 experts. With --moe-backend auto the model started and ran at 108 tok/s on the code benchmark. The linear backend stays on flashinfer_b12x, which is a separate setting.
Backend flags are tied to the vLLM version and checkpoint they were tested on. Start from auto and force a backend only if it measures faster.
Qwen3.8-Flash-Next: check what the container needs
Qwen3.8-Flash-Next only fits on one GB10 with the community image that NVIDIA’s model card points to. The image keeps a large embedding table on disk and reads it through Linux’s io_uring, which Docker’s default seccomp profile blocks. So the published setups turn seccomp off and the card also turns off AppArmor. atakann’s recipe also found that the image’s fast loader left under 1 GiB free. I didn’t run it.
On a box that runs unattended, read a recipe’s container flags as closely as its speed numbers. The narrower route here is Docker’s default seccomp profile plus the three io_uring calls (io_uring_setup, io_uring_enter and io_uring_register), AppArmor left on, the image pinned by digest and the standard loader. That combination is still untested.
7. The daily configuration
Both models stay loaded at these settings:
| Configuration | Qwen3.8-27B | Qwen3.6-35B-A3B |
|---|---|---|
| GPU memory utilization | 0.34 | 0.31 |
| Maximum context | 131,072 | 131,072 |
| GPU memory in use (nvidia-smi) | 35.8 GiB | 39.8 GiB |

Both run with a 131,072-token context instead of their native 262,144. At a 0.34 share the 27B’s KV cache holds about 167,000 tokens, less than one full-length request. Hermes Agent’s prompts have run 20,000 to 50,000 tokens anyway.
Sequential startup
vLLM measures memory while it loads to size its KV cache, so two models loading at once would each count the other’s allocations. The services start in order:
- The memory watchdog.
- Qwen3.8-27B, if at least 65 GiB is available.
- Qwen3.6-35B-A3B, once the 27B answers on
/v1/modelsand at least 62 GiB is available.
Both are serving about eight minutes after the services start.
The second check was 70 GiB at first. It passed with 72 GiB free, but the 27B’s driver memory grows with longer prompts, so a restart after a crash could fail it with room to spare. The start check is there to catch another big model already running, while the watchdog handles low memory after startup. At 62 GiB the worst case leaves about 19 GiB free after the second model loads, below the reserve but above the 15 GiB warning.
vLLM launch configuration
The Qwen3.6-35B-A3B service, abridged:
docker run -d \
--name vllm-qwen36 \
--label ailab.gpu=true \
--restart no \
--gpus all \
--ipc host \
--network host \
--shm-size 16g \
--env-file ~/ailab/vllm/env \
-e HF_HUB_OFFLINE=1 \
-v ~/models:/models:ro \
nvcr.io/nvidia/vllm:26.10.pre1-py3 \
vllm serve /models/Qwen3.6-35B-A3B-NVFP4 \
--served-model-name qwen3.6-35b-a3b \
--host <tailscale-ip> \
--port 8001 \
--gpu-memory-utilization 0.31 \
--max-model-len 131072 \
--max-num-seqs 8 \
--kv-cache-dtype fp8 \
--moe-backend auto \
--linear-backend flashinfer_b12x \
--attention-backend flashinfer \
--speculative-config \
'{"method":"mtp","num_speculative_tokens":2,"moe_backend":"triton"}' \
--reasoning-parser qwen3 \
--tool-call-parser qwen3_coder \
--enable-auto-tool-choice
The API key comes from the env file as VLLM_API_KEY. --restart no leaves restarts to systemd, the models mount read-only and HF_HUB_OFFLINE=1 lets the service start without reaching Hugging Face. Under systemd the script then runs docker wait on the container, so systemd sees when the model exits.
8. Monitoring
DGX OS includes NVIDIA’s DGX Dashboard, which shows live system metrics, applies updates and runs JupyterLab. It’s served at localhost:11000, so another machine reaches it through an SSH tunnel or NVIDIA Sync.
sparkDash, from Mia’s AI Lab, is a dashboard for monitoring and managing one or more DGX Sparks. Besides GPU, memory and model stats, it can launch models, cap GPU clocks, delete files and shut a unit down. To do that it runs as a privileged container that shares the host’s process namespace and network. If it listens beyond localhost without SPARKDASH_TOKEN set, anyone who can reach the port can use those controls. I only wanted read-only status for one box, so I didn’t install it.
Instead I wrote ailab-status. It’s a read-only Python command that runs as a normal user and reads /proc, nvidia-smi, Docker, systemd and each model server’s /metrics. -w refreshes it every few seconds and --speed runs a short speed test on each idle model.
ssh ailab ailab-status
Sample output, abridged:
9. Remaining work
- Set the BIOS to power the box back on after an outage, then test a power cut with the models busy.
- Get an alert when the box goes offline. Tailscale shows it as offline but doesn’t notify me.
- Run long-context agent work for an hour or more to check memory, sustained speed and temperature.
- Back up the configuration and scripts to the Synology NAS and test a restore.
- Try Laguna’s smaller July revision or drop Laguna.
Scripts and references
The companion repository has the fail-safe installer, the memory watchdog and start checks, the systemd units, the model and Open WebUI launch scripts, ailab-status and the benchmark script. It’s all bash and standard-library Python. Set the memory thresholds and shares from your own box’s measurements.
Thanks to these recipes and guides:
- NVIDIA’s DGX Spark playbooks: step-by-step setups for AI workloads on a Spark.
- Mia’s AI Lab: measured model recipes and the sparkDash dashboard.
- atakann: measured recipes for one or two Sparks.
- jschmied: a from-scratch Spark setup guide.
- 0xSero: an agent skill for setting up one to four Sparks.
- sfxnz: vLLM serving recipes measured on a Spark.
- eugr: vLLM Docker builds for Sparks, the source of the image Flash-Next needs.
- Model cards from NVIDIA, Unsloth and Poolside, plus z-lab’s draft model for Qwen3.8-27B.