Dual-Node LLM Inference: Three Approaches Tested and One-Click Deployment
This article examines how to run a massive language model across two workstations with 256 GB of unified memory. It compares three dual-node parallelism approaches, explains why random-token benchmarks underestimate multi-node setups, outlines network and hardware baselines, and provides a one-click deployment workflow along with an acceptance checklist.
1. The Starting Question: Are Two Machines Enough?
When developers see a model with roughly 748B total parameters (about 552B in the main body, plus an extended memory table structure of around 196B), their first reaction is usually “it won’t fit in memory.” Two workstations with 256 GB of combined unified memory are indeed orders of magnitude short of the full-precision weights, but that does not make the model impossible to run.
Three points drive the assessment:
- Unified memory architecture changes the memory hierarchy. The CPU and GPU share the same address space, so weights do not need to stay fully resident in VRAM and can be paged in and out.
- Low-bit quantization compresses the main body into memory. A quantization format commonly used in the industry at 2.8–2.9 bits per weight can reduce the main body to roughly 200 GB, leaving headroom for the KV cache and runtime.
- Sparse structures can live outside memory. The extended memory table is not accessed in full at every step, so keeping it on a local high-speed SSD and reading on demand is a common engineering trade-off in dual-node setups.
Conclusion: two machines can support individual or small-team use, but you have to accept that throughput does not scale linearly.
2. Three Dual-Node Parallelism Approaches, Abstracted and Compared
The three setups in the original practice correspond to three different combinations of parallelism and engines. Stripping away the specific product shells, they abstract to:
- Approach A: natively compiled engine + medium-bit quantization. Aims for single-stream decode speed; the engine is written in a low-level language with low scheduling overhead.
- Approach B: mature framework branch + tensor parallelism. Splits the main body with tensor parallelism; higher engineering maturity and active community maintenance.
- Approach C: hosted weights + general tensor parallelism. Decouples weights from the runtime, making it more flexible to swap quantization versions.
The patterns observed in testing are broadly generalizable:
| Dimension | Approach A | Approach B | Approach C |
|---|---|---|---|
| Single-stream decode | Fastest (~57–59 tok/s) | Medium | Medium |
| Multi-stream scaling | ~116 tok/s at 4 streams | Slightly lower | Slightly lower |
| Long-context prefill | Relatively slower | ~20% faster | Close to B |
| Stability | Full machine hang observed | Zero dropped requests over 2 hours of mixed load | Good |
| Deployment barrier | High (must compile kernels yourself) | Medium | Medium-high |
Selection advice: prioritize stability, then prefill performance, and only then single-stream peak speed. For individuals and small teams, the troubleshooting cost of a single full-machine hang often outweighs a 10% difference in decode speed.
3. Why Random-Token Benchmarks Underestimate Dual-Node Setups
This is the easiest pitfall in dual-node evaluation. Random token sequences lack real language structure, which leads to:
- The decompression path for quantized weights cannot hit repeated patterns, amplifying bandwidth pressure several times over;
- The extended memory table triggers a random disk read almost every time, fully exposing latency;
- The acceptance rate of speculative decoding approaches zero, so the acceleration mechanism fails.
You must therefore build workloads from real text, for example a mixed set of “long-document QA + multi-turn dialogue + code snippets,” and switch datasets on the same deployment to keep results comparable.
Illustrative workload description (pseudocode):
workload = [{"type": "long_doc_prefill", "tokens": 16384},{"type": "long_doc_prefill", "tokens": 131072},{"type": "chat", "concurrency": 4, "thinking": False},]# Disable chain of thought to avoid output-length jitter polluting throughput stats
4. Network and Hardware Baseline
The performance ceiling of a dual-node setup is determined by the interconnect. Recommended baseline:
- Connect the two devices directly to the same switch over dual 100G links with RoCE v2 enabled;
- Lock the GPUs to a fixed clock to avoid frequency drift caused by thermal limits;
- Use the same client and load-testing script, with chain-of-thought output disabled;
- Record prefill throughput at both 16K and 128K, reflecting short-request and long-document capability respectively.
5. One-Click Deployment: Packaging the Complexity into a Template
The key to engineering delivery is not “can it run” but “how fast can it get running.” A reusable practice is to package the image, quantized weights, and external memory table into an inference template, so users only need to connect two devices, select the template, and click deploy. First startup takes about 13 minutes (including weight loading and cache building); subsequent restarts take about 7 minutes.
In a Baidu AI Cloud context, this kind of capability is typically carried by a container platform for orchestration, object storage for distributing weights, and logging and monitoring/alerting services for observability, achieving a delivery model where “the template is the deployment unit.”
6. Acceptance Checklist
- Single-stream decode ≥ 45 tok/s, 4 streams totaling ≥ 90 tok/s;
- 128K prefill ≥ 2K tok/s;
- Zero dropped requests over 2 hours of continuous mixed load;
- Million-level context and image input available;
- Speculative decoding acceptance rate > 0 once enabled.
Validate against this checklist, and two high-memory devices can reliably support real workloads, without relying on optimistic numbers from small-scale benchmarks.
