Offload one more MoE expert to CPU on frank-default-small (34→35 of 40)

- N_CPU_MOE 34→35: 5 expert layers on GPU instead of 6. Frees ~0.4-0.8 GiB
  VRAM for OOM safety after high-load sessions OOM'd at 32 and 33.
- Sync stale doc references (deployment.md, Dankserver System Specs.md)
  that still claimed 32/8; specs now estimate ~1.8 GiB headroom at 35.
This commit is contained in:
Frank
2026-08-13 20:18:20 -07:00
parent c96cb6a529
commit 209223cb4f
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -51,11 +51,11 @@ Dankserver is an NVIDIA GPU server for vLLM inference. The host runs Ubuntu 24.0
### Active Services
The active `frank-default-small` service (llama.cpp, `b10108+`) serves the HauhauCS Qwen3.6-35B-A3B uncensored `Q6_K_P` model on port 7770 with **ngram-mod** speculative decoding. It runs **4 parallel slots** at 200000 context each (pool 800000). Of the 40 layers' MoE expert weights, **32 sit on CPU** (`--n-cpu-moe 32`) while the remaining **8 layers' expert weights** are resident on GPU along with all non-expert tensors (`--gpu-layers all`). KV stays on GPU with K=`q8_0`, V=`f16`. Batch 8192 / ubatch 2048, `--ctx-checkpoints 4`, `--no-mmap`. At idle ~23.5 GB VRAM used; under a 4-stream 300-token burst peaks ~23.7 GB, leaving **~870 MiB** headroom. Idle RAM ~32 GB of 62 GB.
The active `frank-default-small` service (llama.cpp, `b10108+`) serves the HauhauCS Qwen3.6-35B-A3B uncensored `Q6_K_P` model on port 7770 with **ngram-mod** speculative decoding. It runs **4 parallel slots** at 200000 context each (pool 800000). Of the 40 layers' MoE expert weights, **35 sit on CPU** (`--n-cpu-moe 35`) while the remaining **5 layers' expert weights** are resident on GPU along with all non-expert tensors (`--gpu-layers all`). KV stays on GPU with K=`q8_0`, V=`f16`. Batch 8192 / ubatch 2048, `--ctx-checkpoints 4`, `--no-mmap`. At idle ~22.2 GB VRAM used, leaving an estimated **~1.8 GiB** headroom (up from ~870 MiB at `--n-cpu-moe 32`). Idle RAM ~32 GB of 62 GB.
## Hardware Relevance
- 24 GB VRAM is almost fully saturated with this config. At idle ~23.5 GB used; under a 4-stream 300-token burst peaks at ~23.7 GB, leaving **~870 MiB** headroom. The 8 layers' expert weights back on GPU account for the tight margin. If headroom proves too thin for production bursts, dial back `--n-cpu-moe` to 36 (only 4 layers on GPU, ~1.7 GiB more headroom) by editing `scripts/frank-default-small.env`.
- 24 GB VRAM is close to saturated with this config. At idle ~22.2 GB used, leaving an estimated **~1.8 GiB** headroom at `--n-cpu-moe 35` (5 layers' experts on GPU). The move from `--n-cpu-moe 32` to 35 traded a little GPU-expert speed for OOM safety after high-load sessions OOM'd at 32 and 33. If headroom proves too thin for production bursts, dial back `--n-cpu-moe` to 37 (only 3 layers on GPU, ~0.9 GiB more headroom) by editing `scripts/frank-default-small.env`.
- 62 GB system RAM holds the ~29 GB of MoE expert weights with room to spare (~57 GB available after load).
- 127 GB swap is available for CPU KV cache paging if GPU KV offload is disabled.
- Root disk has approximately 140 GB free. Store the GGUF models under `/home/dank/models` (about 32 GB total).
+1 -1
View File
@@ -111,7 +111,7 @@ The active service on Dankclaw runs llama.cpp serving the HauhauCS Qwen3.6-27B u
### Dankserver — frank-default-small
The active service on Dankserver runs llama.cpp (upstream, `b10108+`) and serves the HauhauCS Qwen3.6-35B-A3B uncensored `Q6_K_P` model under the alias `frank-default-small` on port 7770. It uses **ngram-mod** speculative decoding (`--spec-ngram-mod-n-min 48 / n_max 64 / n_match 24`), **4 parallel slots** at 200000 context each (pool 800000), and mmproj vision. **32 of 40 MoE expert layers** stay on CPU (`--n-cpu-moe 32`); 8 expert layers' weights are back on GPU alongside all non-expert tensors (`--gpu-layers all`). KV stays on GPU (K=`q8_0`, V=`f16`). Batch 8192 / ubatch 2048, `--ctx-checkpoints 4`, `--no-mmap`. The unit file is `scripts/frank-default-small.service`, symlinked to `/etc/systemd/system/`. It launches through `scripts/serve-llama-frank-small.sh`, which reads tunables from `scripts/frank-default-small.env`.
The active service on Dankserver runs llama.cpp (upstream, `b10108+`) and serves the HauhauCS Qwen3.6-35B-A3B uncensored `Q6_K_P` model under the alias `frank-default-small` on port 7770. It uses **ngram-mod** speculative decoding (`--spec-ngram-mod-n-min 48 / n_max 64 / n_match 24`), **4 parallel slots** at 200000 context each (pool 800000), and mmproj vision. **35 of 40 MoE expert layers** stay on CPU (`--n-cpu-moe 35`); 5 expert layers' weights are back on GPU alongside all non-expert tensors (`--gpu-layers all`). KV stays on GPU (K=`q8_0`, V=`f16`). Batch 8192 / ubatch 2048, `--ctx-checkpoints 4`, `--no-mmap`. The unit file is `scripts/frank-default-small.service`, symlinked to `/etc/systemd/system/`. It launches through `scripts/serve-llama-frank-small.sh`, which reads tunables from `scripts/frank-default-small.env`.
> Note: this service replaced the retired `vllm-awq-qwen36` (AWQ 4-bit, port 34401) and the earlier `vllm-qwen36` (FP8) / `llama-server` (ROCmFPX) units. The repo tracks `main` on Dankserver at `/home/dank/vLLM`.
+5 -5
View File
@@ -8,15 +8,15 @@ PORT=7770
# (Increased from 3×200k to add a 4th parallel stream.)
CTX_SIZE=800000
PARALLEL=4
# Spec: ngram-mod. n_min=48, n_max=64, n_match=24 (defaults). 6 expert
# layers back on GPU; 34 on CPU. Batch 8192 / ubatch 2048.
# Spec: ngram-mod. n_min=48, n_max=64, n_match=24 (defaults). 5 expert
# layers back on GPU; 35 on CPU. Batch 8192 / ubatch 2048.
SPEC_TYPE=ngram-mod
NGRAM_MOD_N_MIN=48
NGRAM_MOD_N_MAX=64
NGRAM_MOD_N_MATCH=24
# Expert offload: 34 of 40 layers keep MoE weights on CPU; remaining
# 6 layers have their expert weights resident on GPU for faster routing.
N_CPU_MOE=34
# Expert offload: 35 of 40 layers keep MoE weights on CPU; remaining
# 5 layers have their expert weights resident on GPU for faster routing.
N_CPU_MOE=35
N_GPU_LAYERS=all
# KV cache on GPU, K quantized to q8_0, V stays f16 (user-locked decision).
CACHE_TYPE_K=q8_0
+1 -1
View File
@@ -32,7 +32,7 @@ fi
: "${NGRAM_MOD_N_MATCH:=24}"
: "${CACHE_TYPE_K:=q8_0}"
: "${CACHE_TYPE_V:=f16}"
: "${N_CPU_MOE:=34}" # 34 of 40 layers: MoE expert weights stay on CPU; 6 on GPU
: "${N_CPU_MOE:=35}" # 35 of 40 layers: MoE expert weights stay on CPU; 5 on GPU
: "${N_GPU_LAYERS:=all}" # every non-expert tensor goes to GPU
: "${BATCH_SIZE:=2048}"
: "${UBATCH_SIZE:=512}"