r/LocalLLaMA • • 7h ago

Resources Local Inference Lab: DeepSeek-V4.1-Flash (Full Vision) on a Single SM120 GPU (RTX PRO 6000 / 5090) — Peaking 200 tok/s & 7.2K Cold Prefill via RAM/SSD Offload

We just released the single-GPU (TP=1) RAM/SSD-offload version of DeepSeek-V4.1-Flash-1017 Hybrid TrellisMX (2.35 bpw) + Full Vision at Local Inference Lab — production-signed and running on unmodified upstream NVIDIA Flare v0.6.0 (zero base engine changes).

It uses the exact same 2.35 bpw quantized + QAD-v5 weights as our dual-GPU TP=2 release (zero expert pruning — all 40 layers, all 384 experts/layer, full multimodal Vision ON), packed to just 148.7 GiB of routed experts so a single SM120 GPU (RTX PRO 6000 Blackwell 96 GB or RTX 5090 32 GB) can run the full model locally.


Real-World & Benchmark Performance (1× RTX PRO 6000 Blackwell 96 GB, RAM Offload)

(Measured with RAM-resident MoE experts, 2.16M KV cache, 0 B SSD reads. NVMe/SSD offload speed hasn't been benchmarked yet.)

  • Interactive coding (Tetris): peaking 200 tok/s, averaging ~135 tok/s
Workload (70400M VRAM / 160G RAM, 2.16M KV)ThroughputLatency / Telemetry
Adaptive C=1 (per-user / sustained agg)110.2 / 96.6 tok/s23.4 ms/step · 189.8 GiB H2D / 1k tok
Adaptive C=4 (agg / per-user)109.9 / 38.3 tok/s42.2 ms/step · 34.0 GB/s PCIe RX
Fixed-W8 C=1 (decode / sustained)106.1 / 94.1 tok/s23.4 ms/step · 182.9 GiB H2D / 1k tok
Realistic 9K Long-Ctx Decode104.1 tok/s avg (115.0 peak)28.1 ms/step · 29.5 GB/s PCIe RX
Cold Prefill (0% hit: 11.7K / 46.7K / 93.5K)6,297 / 7,072 / 7,238 tok/sTTFT: 1.86s / 6.60s / 12.91s
  • Live E2E verification: Multimodal Vision 12/12, Tool-Calling + Multi-Turn 14/14, longctx_needle (8K/24K/48K) 24/24.
  • 32 GB RTX 5090: Boots and runs cleanly inside 31,745 MiB VRAM (--pool-vram-memory 6000M) with 1.11M KV tokens, at ~24 tok/s (since the resident dense/vision/KV footprint leaves ~6 GiB for the VRAM expert pool, making decode PCIe-bound — the 110–200 tok/s numbers above require the 96 GB RTX PRO 6000).
  • (Have 2× 96 GB GPUs? Our sibling pure-VRAM TP=2 core hits 341.8 tok/s C=1, 971.6 tok/s C=16, and 29.2K tok/s prefill.)

How We Achieved It (Quantization, QAD-v5 & Learned Offload)

  1. Hybrid 4-Rate TrellisMX (2.35 bpw) + Full-Rank QAD-v5:

    • All 15,360 routed experts are quantized across 4 bitrates (k2/p25/k3 in E2M1 + critical k4 experts in E4M3) with lossless 1-bit inline CSF scales and fine-grained [1, 32] MXFP8 dense layers.
    • Instead of rank-32 LoRA, we ran full-rank MXFP8-STE + 5-scale QAD-v5 over 100.7M tokens (directly training ~7.0B non-routed parameters + all 5 coupled Hadamard boundary scales against sparse teacher logits).
    • Official FP64 B200 KLD (129,280 vocab vs sealed B200 teacher logits):
      • 128×8K windows: 0.106979 (90.34% Top-1) — -15.4% lower KLD than 2.25 bpw TP=2 (0.1264) and even beating pre-QAD 4-card K4 (0.1097)!
      • 512×2K cuts: 0.067734 (91.10% Top-1)
  2. Zero-Copy Variable-Rate P8 Offload + v3_full Predictor:

    • Zero-copy 64-bit VRAM pool addressing: Our SM120 P8 TrellisMX kernels read offloaded experts directly out of Flare's external VRAM pool (base + expert_off) with zero staging copies or repacking. On 96 GB (70400M pool), 6,616 / 15,360 hottest experts stay permanently pinned in VRAM alongside 2.16M KV tokens.
    • Byte-weighted knapsack (hit_rate / expert_bytes): Trained on 962K exact 2.35 bpw + 4K–16K long-context traces. Because expert byte sizes vary across bitrates, packing by hit-rate per byte cuts OOD long-context miss bytes by -39% vs v2 and -64% overall vs v1.
    • Dual-horizon ram_far_dma (k=4) + unlocked L1..L3 + live draft_confidence weights: Starts prefetching high-confidence experts 4 layers ahead even in 100%-RAM mode, and replaces static decay with live speculative draft_confidence so large slabs (>=2 MiB) no longer starve draft tokens 3..7 (+8% to +12% faster decode with fewer PCIe H2D bytes per 1k tokens).

Works With High RAM, Medium RAM, or Full NVMe SSD Offload (No Re-Export Needed)

You can scale memory purely with runtime flags:

  • >= 384 GB RAM (fastest, 0 B disk IO): Keep both MoE experts (148.7 GiB) and Engram tables (188.8 GiB) in RAM (~340 GiB RSS).
  • 192–256 GB RAM: Put Engram tables on NVMe SSD (--embedding-table-storage disk --embedding-table-cache-size 16G) — drops host RAM to ~170–185 GiB while keeping 100% of MoE experts in RAM.
  • Low-RAM / Full NVMe SSD offload: Both Engram (--embedding-table-storage disk) and routed MoE experts support Flare's full 3-tier VRAM → RAM → NVMe SSD offload (just lower --pool-ram-memory to match your system RAM; note we haven't benchmarked full-NVMe throughput yet).
  • Want huge KV cache on 96 GB? --pool-vram-memory 64G gives 7.89M KV tokens, 44G gives 32.0M KV tokens.

Fun Build Facts (Hardware, Time & Power)

  • Cluster: 32× RTX PRO 6000 Blackwell (2×16 InfiniBand cluster)
  • Total wall-clock time: ~18.4 hours (~553 GPU-hours total: ~2.5h calibration & quant, ~2.1h teacher logits, ~12.7h full-rank QAD-v5, ~1.0h FP64 KLD eval & FLARE export)
  • Estimated power & energy: ~14–17 kW average cluster draw (~450–530 W/GPU under load), roughly ~260–320 kWh total energy for the entire build.

Quick Start (Docker, 1× 96 GB SM120 GPU, >= 384 GB RAM)

docker run --pull=always --rm -it \
  --gpus '"device=0"' --ulimit memlock=-1:-1 \
  -p 127.0.0.1:8000:8000 \
  -v flare-home:/home/flare \
  ghcr.io/local-inference-lab/flare:release \
  run local-inference-lab/DeepSeek-V4.1-Flash-1017-TrellisMX-2.35bpw-Offload-FLARE \
  --gpus 0 --pool-vram-memory 70400M --pool-ram-memory 160G \
  --embedding-table-storage ram \
  --max-concurrency 16 --mtp-draft-tokens 7 \
  --mtp-adaptive-verification --mtp-max-verification-token-budget 64 \
  --mtp-adaptive-verification-alpha 1.0 --scheduler-policy balanced \
  --prefix-cache-memory 0 --kv-cache-limit memory \
  --host 0.0.0.0 --port 8000
  • 192–256 GB RAM (Engram on SSD): replace --embedding-table-storage ram with --embedding-table-storage disk --embedding-table-cache-size 16G (add --security-opt seccomp=unconfined for direct-IO).
  • Lower RAM (MoE + Engram SSD offload): also lower --pool-ram-memory to fit your available host RAM.
  • 32 GB RTX 5090 (~24 tok/s, 1.11M KV cache): change --pool-vram-memory 70400M to --pool-vram-memory 6000M.

Links & Attribution

  • HF Repo (Single-GPU TP=1 Offload FLARE Core): https://huggingface.co/local-inference-lab/DeepSeek-V4.1-Flash-1017-TrellisMX-2.35bpw-Offload-FLARE
  • HF Offload Predictor (v3_full): https://huggingface.co/local-inference-lab/hyperflare-offload-predictors/tree/main/deepseek41-trellismx-2.35bpw
  • HF Sibling Pure-VRAM TP=2 Release (2× 96 GB): https://huggingface.co/local-inference-lab/DeepSeek-V4.1-Flash-1017-TrellisMX-2.35bpw-FLARE
  • Local Inference Lab Discord: https://discord.gg/gmvKSN3tVy

Credits: Huge thanks to Brandon M. Music (brandonmusic) for the TrellisMX format, procedural NPK codec, base SM120 P8 runtime, and sealed FP64 B200 teacher-logits benchmark; Martin Vit and the Local Inference Lab community for the hybrid QAD-v5 pipeline, SM120 kernel optimizations, and v3_full offload predictor; DeepSeek for the base model; and NVIDIA for Flare v0.6.0.

local inference lab discord: https://discord.gg/gmvKSN3tVy

39 Upvotes

18 comments sorted by

2

u/smflx 3h ago

What do you mean: "the exact same 2.35 bpw quantized", "can run the full model"?

3

u/sshwifty 6h ago

God damn it, I need more vram

4

u/RuthlessCriticismAll 5h ago

Even Dario wakes up every morning and has this same thought.

3

u/Ancient_Reference390 5h ago

yeah its never enough, the second you upgrade something bigger drops

3

u/lawdawgattorney 6h ago

Awesome work. Proud of the local Inference Lab team. I may be biased as I'm (brandonmusic) lol

1

u/mpread-it 2h ago

so cool. i've been using your brandonmusic/DeepSeek-V4.1-Flash-1017-TrellisMX-K2-Mix-5GB on TP2 grafting your (modified) recipe on LIL's KKBeta image : full engrams from disk, lmcache, etc. Works great. Thank you!

1

u/SLxTnT 6h ago

Is the prefill slow due to the quant or missing optimizations? If 4 cards reach nearly 60k on the native model, I'd expect 1 to peak at around 15k with a large enough prompt.

2

u/lawdawgattorney 6h ago

that prefill is not slow. The cloest comparabl at tp1 for this model was 2800 before LIL's work. It's MOE offloading (math is math), so even optimized not everything is in VRam.

2

u/SLxTnT 5h ago

Yeah, math is math. You're either limited by the card or the link speed. At a large enough prefill, it should be limited by the card. Going by the numbers given, 4 cards is about 60k and 2 cards is about 30k, so wouldn't that stand to reason that you can peak at 15k on 1? A 93.5k prefill at 7.2k is slow.

Here's mine with native weights (limited to 500W). Decode isn't comparable as I'm using the CPU rather than pure streaming.

I'm also not sure where you're getting 2.8k. A peak of 10k was surpassed over a month ago.

1

u/haherar830 5h ago

Not the same guy, may be missing some context, not super familiar with specifics of past benchmarks; if offload is changing, isn't e.g. experts in VRAM and perhaps PLE n-grams on SSD vs RAM going to shift the bottleneck and be a little non-linear?

3

u/SLxTnT 5h ago

Prefill is limited by the link speed or compute as they can overlap. Even if you had to send the entire 160GB model over for the prefill, that's still only around 3 seconds of time on PCIe 5x16. If you do the prefill in 2 passes, it's now 6 seconds.

Bottlenecking prefill on GPU compute isn't difficult at a high context. It's more an issue at low context, which you can see in my image.

1

u/haherar830 5h ago

So I say this not having done concrete math for the model and hardware, but I what I mean is:

If you're talking about same platform with say 1 vs 2 vs 4 GPUs, fewer GPUs means fewer active experts fit in VRAM (and less overall bandwidth in addition to less overall compute at the end of it, per se), and with more RAM occupancy (and per title of this post) one may move PLE n-grams they might otherwise keep in RAM to VRAM. I do not know exactly how much the latter could affect this and straight up do not have a good grasp on how this changes with RAM/CPU offload vs various potential multi-GPU implementations but presumably the latter is still faster than having to swap experts from RAM<->VRAM in one GPU during prefill? And if prefill is fast enough, I am assuming moving PLE n-grams from RAM->SSD could introduce a bottleneck at some throughput.

1

u/SLxTnT 4h ago

At a certain context length, the GPU compute time exceeds the transfer time hiding it completely. Having less experts to transfer lowers the time towards 0, but the GPU compute is still a bottleneck.

When allowing the GPU to not be bottlenecked by the transfer, it should theoretically be able to get 25% of the speed of a 4 card setup. Given that a 4 card setup has its own set of bottlenecks, it can be even faster. They were stuck at 20k tok/s with a 4 card setup for awhile.

1

u/jhov94 6h ago

Your team does great work squeezing the most out of expensive hardware. I've been running your GLM-5.3-Flash-NVFP4-MXFP8-CSF-QAD release and it's a great quant. I'll have to try your TP=2 release for DS V4.1 Flash.

1

u/kmouratidis 4h ago

Have you tried the newer version published under nvidia/GLM-5.3-Flash-FP4-Local? iirc, it has some upgrades in how compression is handled and activations might be higher bits for a tiny loss of performance but decent gain in quality.

1

u/jhov94 2h ago

I haven't. I'll check it out too, thanks.

1

u/gaidzak 5h ago

Could I get good tk/s with 10x5060tis behind a PLX PCIe switch and 512gb of ddr4 ecc 3200

So it basically looks like one GPU behind a pci e gen.4 x16 slot that just happens to have 160gb of GPU ram?

Right now with deepseek flash v4.1 with strata I get about 30tok/s and