Dual-GPU LLM Inference: Three Deployment Options Tested Side by Side

    This article examines how to run a 748B-parameter MoE model with a 1M-token context on two high-memory machines with 256 GB of unified memory in total. It walks through the memory budget, the 2.8–2.9 bpw quantization sweet spot, and NVMe tiering for the sparse Engram memory table, then compares three dual-node approaches—a native compiled engine, a branched engine, and a templated managed deployment—across throughput, long-document prefill, stability, and setup effort. Readers will find the benchmark results, a step-by-step deployment path, and a tuning checklist for stable inference on a two-node setup.

    1. The Question: Are Two Machines Actually Enough?

    Many teams hit a resource ceiling right after validating a model on a single machine or a small cluster. Suppose you have two high-memory AI workstations with 256 GB of unified memory in total, and the model you want to serve is a 748B-parameter mixture-of-experts (MoE) model—roughly 552B parameters of main weights plus about 196B in a sparse memory table called Engram. Simple division tells the story: even at 16-bit precision, the weights alone exceed the available memory, so the intuitive answer is “it won’t fit.”

    That intuition misses two things. First, the activation path in this class of model is extremely sparse—only a tiny fraction of experts and memory entries take part in each forward pass. Second, in a unified memory architecture the CPU and GPU share the same address space, so cold data can live on local NVMe and be paged in on demand instead of staying resident. Put those two facts together and dual-machine deployment turns from “impossible” into an engineering problem.

    2. Feasibility: Three Key Levers

    2.1 Memory Budget: Do the Math First

    Work out a byte-level budget before deploying rather than going by feel. A rough model looks like this:

    1. usable memory = node count × unified memory per node × safety factor (0.85–0.9)
    2. weight footprint ≈ main parameters × bpw / 8
    3. remaining space = usable memory − weight footprint − runtime overhead
    4. runtime overhead ≈ KV cache + activation buffers + communication buffers + framework itself

    The safety factor is not optional. File cache, drivers, and the runtime routinely consume 10%–15% of unified memory, and planning at full capacity will almost certainly trigger paging thrash under long-context workloads.

    2.2 Quantization: 2.8–2.9 bpw Is the Current Sweet Spot

    Fitting 552B main parameters into 256 GB requires pushing bit width below 3 bpw. A common approach is an EXL3-style quantization format that supports fine-grained grouping and activation-aware calibration, holding bit width at 2.8–2.9 bpw. That range is the sweet spot because it satisfies three constraints at once: the footprint fits in memory, accuracy loss stays acceptable, and the dequantization kernels still achieve high bandwidth utilization on a unified memory architecture.

    Below 2.5 bpw, instruction-following degradation becomes noticeable; above 3.2 bpw, the budget is blown. When choosing a format, don’t look at perplexity alone—check retrieval and citation accuracy under long context, because memory-table structures are more sensitive to quantization error.

    2.3 Cold-Data Tiering: Put the 196B Memory Table on NVMe

    The Engram table is characterized by large capacity and sparse hits, which makes it a natural fit for tiered storage: main weights and a hot-entry cache stay resident in memory, the full memory table lives on NVMe, and entries are read on demand through memory mapping with prefetching. Three engineering details matter. First, NVMe random-read latency adds directly to time-to-first-token, so lay entries out in contiguous chunks. Second, prefetch depth should match the draft length used by speculative decoding, or the prefetch benefit gets consumed by the verification stage. Third, NVMe bandwidth on the two machines should be symmetric so a slow node doesn’t become the bottleneck.

    3. Three Dual-Machine Options, Tested

    We compared three mainstream approaches on the same pair of machines with the same load-test scripts. Each represents a different engineering orientation.

    Option A: Native Compiled Engine + Medium-High Bit Quantization

    A community-maintained native Zig tensor engine paired with 2.8 bpw weights. Strengths: few dependencies, fast startup, low single-request latency. Weaknesses: it demands more manual operations work, and you prepare the weights and memory table yourself.

    Option B: Branched Engine + 2.9 bpw Weights

    A community fork of an open-source tensor engine with 2.9 bpw weights. It includes targeted optimizations for tensor-parallel partitioning and communication scheduling, and scales reasonably well across two nodes, but you have to maintain the branch and the kernel build chain yourself.

    Option C: Managed Template, One-Click Deployment

    The same capabilities packaged as an inference template: connect two nodes, pick the template, click deploy. No custom images, no packaging the memory table, no compiling kernels. This is the path we ultimately used.

    Results

    Dimension Option A Option B Option C (templated)
    Single-stream throughput Highest Medium ~50 token/s
    4-stream aggregate throughput Medium Higher ~100 token/s
    Long-document prefill Slower ~2.5K token/s ~2.5K token/s
    Stability Repeated whole-machine hangs Good 2 hours of mixed load, zero dropped requests
    Setup effort High Medium About a dozen minutes

    The deciding factor is not peak speed but stability and long-context prefill. Option A was fastest on a single stream, yet one node repeatedly hung the entire machine during testing. The implementation behind Option C ran two hours of mixed load without dropping a request, and its long-context prefill was about 20% faster than Option A. For an individual or a small team, a stable 50 token/s is worth far more than an unstable 100-plus.

    4. One-Click Deployment Path

    The recommended flow:

    1. Prepare two identically specced high-memory workstations, and confirm unified memory, NVMe headroom, and high-speed interconnect between nodes.
    2. Bring the nodes under management on a container platform or bare-metal service, such as the one offered by Baidu AI Cloud, making sure the image registry and object storage are reachable.
    3. Select the inference template, enter the node addresses and parallelism, and enable 1M context, image input, and speculative decoding.
    4. After deployment, run a smoke test with a short prompt, then increase context length gradually.
    5. Connect logging and monitoring/alerting, and establish baselines for time-to-first-token, throughput, and page-fault rate.

    Illustrative startup parameters (shape only, not a concrete interface):

    1. context-length = 1048576
    2. tensor-parallel = 2
    3. speculative-decoding = on
    4. vision-input = on
    5. engram-cache = nvme-prefetch

    5. Load-Testing Method and Tuning Checklist

    Load tests should cover three workload types: a single long conversation, four concurrent short question-answer sessions, and a one-shot prefill of a very long document. Beyond throughput, track time-to-first-token, per-step latency variance, NVMe read amplification, and page-fault counts.

    Common tuning measures: reorder memory-table entries by access locality; align speculative decoding draft length with prefetch depth; set symmetric NVMe queue depths on both nodes; and reserve at least 10% of memory for the file cache to avoid thrash.

    6. Summary

    Two machines with 256 GB of unified memory, combined with 2.8–2.9 bpw quantization and NVMe tiering for the memory table, are enough to serve million-token context inference for a 748B-class MoE model. The real dividing line in engineering is stability and deployment cost. The templated path collapses the high-barrier steps—image building, weight packaging, kernel compilation—so an individual or a small team can get a usable inference service up in about a dozen minutes.