Building a home AI lab on NVIDIA GB10: setup, fail-safes and benchmarks

flag 031Nov 15, 2026ai#ai#infrastructure#engineering#vllm#homelab16 min read
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.

Diagram of how devices reach the box. The laptop, the phone and a VPS connect through Tailscale to SSH, the two model servers and Open WebUI. The home network reaches SSH only.

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 /metrics endpoint 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

AreaFailureProtection
NetworkPrimary internet failsRouter switches to 5G within 30 s
Tailscale unavailableSSH over the LAN
MemoryNot enough memory to start a modelPre-start memory check
Benchmark uses too much memoryStop below 15 GiB available
Available memory below 6 GiBStop models and block restarts
Linux OOM killer runsLower kill priority for SSH and Tailscale
ServicesModel keeps crashingsystemd allows three restarts an hour
Both models start at onceSequential startup
Container logs fill the diskDocker log caps
HostSystem hangsHardware watchdog reset after 30 s
Kernel panicReboot after 10 s
System suspendsMask sleep and suspend
Power cutHome 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:

  1. Model weights loaded into memory
  2. KV cache allocated for context and concurrent requests
  3. 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.

ModelWeightsKV cacheTotal usedMemory available
Qwen3.8-27B + draft model23.7 GiB40.4 GiB~74 GiB43–45 GiB
Qwen3.6-35B-A3B24.9 GiB38.8 GiB~83 GiB33–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.

Available memory on the box drawn to scale from 0 to 121.7 GiB, with start checks at 62 to 65 GiB, the reserve at 26 to 30 GiB, the benchmark stop at 15 GiB and the emergency stop at 6 GiB.

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:

TestMethod
Decode speedMedian of three code and three prose runs, measured from streamed tokens
Time to first tokenApproximately 28,000-token prompt with a random prefix to avoid prefix-cache reuse
Concurrent throughputFour simultaneous requests, measured as aggregate tokens per second
Tool callingThree 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:

ModelCode decodeProse decode
Qwen3.8-27B56 tok/s27 tok/s
Qwen3.6-35B-A3B108 tok/s90 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.

Bar chart of decode speed for both models alone, beside an idle neighbour and beside a busy one. An idle neighbour changes almost nothing. A busy one cuts the 27B from 56 to 28 tok/s on code and Qwen3.6 from 108 to 45.
Measured on my GB10 with vLLM 0.31 (nvcr.io/nvidia/vllm:26.10.pre1-py3) and NVFP4 checkpoints.

The longer-context and concurrency measurements show the same pattern.

TestFirst token, 28k promptFour requests, aggregateLowest free memory
27B alone12.4 s91 tok/s42.9 GiB
27B + idle neighbour12.3 s85 tok/s28.7 GiB
27B + busy neighbour25.0 s41 tok/s26.9 GiB
35B-A3B alone5.3 s198 tok/s33.5 GiB
35B-A3B + idle neighbour4.9 s197 tok/s26.9 GiB
35B-A3B + busy neighbour10.2 s97 tok/s26.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.

Bar chart of the August files, where 36.0 GiB of BF16 experts sit beside 43.9 GiB of 4-bit experts and 12.9 GiB of other tensors. The July files total 67.0 GiB, the August files 92.9 GiB and vLLM’s load 95.9 GiB, against an 85.2 GiB budget.
Tensor sizes summed from the safetensors headers, totals per revision from the Hugging Face API and the load size from vLLM's log.

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:

ConfigurationQwen3.8-27BQwen3.6-35B-A3B
GPU memory utilization0.340.31
Maximum context131,072131,072
GPU memory in use (nvidia-smi)35.8 GiB39.8 GiB
Bar of the box’s 121.7 GiB with both models loaded and idle. Qwen3.8-27B takes 35.8 GiB, Qwen3.6-35B-A3B 39.8 GiB and the OS, Docker and CPU-side allocations 17.4 GiB, leaving 28.7 GiB available.
Weights and KV cache from vLLM's startup logs, GPU memory per process from nvidia-smi and free memory from /proc/meminfo.

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:

  1. The memory watchdog.
  2. Qwen3.8-27B, if at least 65 GiB is available.
  3. Qwen3.6-35B-A3B, once the 27B answers on /v1/models and 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:

ailab-status output showing memory use and the memwatch state, the GPU’s temperature and clock, both model servers with their request stats and the health counters since boot.

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:

Related projecthome-ai-lab · active→