Running Trillion-Parameter Models Without a GPU: An Engineering Practice Guide
This article breaks down how a 2.8-trillion-parameter Mixture-of-Experts (MoE) model was run on a CPU-only server using large-capacity persistent memory as an available memory pool. It walks through the three core engineering calculations—capacity, bandwidth, and latency—explains sparse activation and KV Cache growth, compares App Direct and Memory Mode, and presents measured throughput at 1-bit and 3-bit quantization. A practical tuning checklist and a more reliable cloud-based replication approach are also included.
1. Framing the Problem: “No GPU” Is a Capacity Problem
The old server that circulated in the community was able to host a 2.8-trillion-parameter Mixture-of-Experts model for a simple reason: it did not rely on GPU memory. Instead, it treated a discontinued generation of large-capacity persistent memory as an available memory pool, used a single 40-core third-generation server-class CPU as the only compute source, and ran a general-purpose open-source inference runtime.
Once you strip away the branding, what remains is a pure engineering question: When a model is far larger than the memory capacity of any single accelerator card, can you trade “large memory + a general-purpose multi-core CPU” for usability and accept a cliff-like drop in throughput? The answer is yes, but you first have to settle three calculations: capacity, bandwidth, and latency.
2. The Capacity Calculation: Why Total Parameters Are Not the First Number to Check
The defining feature of a Mixture-of-Experts (MoE) architecture is sparse activation. Using the model’s public specifications as an example: it has roughly 2.8 trillion total parameters, but generating each token activates only about 104 billion parameters, with an officially stated context length of around 1.04 million tokens.
These two numbers point engineering decisions in completely different directions:
- Total parameter count determines “whether it fits”, which sets the lower bound on memory capacity.
- Activated parameter count determines “how fast it computes”, which sets the upper bound on compute and bandwidth demand.
A rough estimate: even at the extreme tier of 1-bit quantization, the weight footprint is still in the hundreds of gigabytes. Filling every memory slot on a consumer desktop motherboard still cannot reach that capacity. This is exactly why a server platform, high-capacity memory modules, or persistent memory becomes necessary.
A handy capacity estimation formula for a quick self-check:
Weight memory ≈ total parameters × bytes per parameter+ temporary activations/cache related to activated parameters+ KV Cache (grows linearly with context length)
Note the third term: a stated capability of million-token context does not mean you can casually use all of it. KV Cache expands roughly linearly with sequence length, and in a memory-constrained environment, it is often the last straw that breaks usability.
3. The Bandwidth Calculation: The Real CPU Inference Bottleneck Is Not Core Count
40 cores sounds like a lot, but during the decode phase, generation is token-by-token and serial, so the main bottleneck is memory bandwidth, not the number of cores. Every token generated requires moving the activated portion of the weights from memory to the compute units all over again, so throughput is roughly proportional to effective memory bandwidth.
This explains a counterintuitive result from the case: after disabling DAX (direct access), speed actually improved from 0.85 tokens per second to 1.5. The reason is that caching and prefetch behavior differ across access paths; direct access bypassed some kernel caching mechanisms and caused redundant data movement. The conclusion: in these scenarios, tuning the access path can yield more benefit than piling on more cores.
4. Choosing a Mode: App Direct vs. Memory Mode
Large-capacity persistent memory typically offers two working modes, and understanding the difference is the prerequisite for the whole approach:
| Dimension | App Direct | Memory Mode |
|---|---|---|
| Positioning | An addressable persistent memory resource that the application reads and writes explicitly | Presented to the upper layer as ordinary memory, scheduled by the system |
| Persistence | Data can be persisted, with byte-level addressing | Volatile, lost on power-off |
| Scheduler | The application itself decides data layout and access | The OS/hardware handles tiering automatically |
| Adaptation | Requires runtime and framework support | Low modification cost, but weak controllability |
The case chose the former: letting the inference runtime read and write this memory directly as available memory, rather than letting the system treat it as a hard-disk cache and schedule it automatically. For inference workloads, only explicit control over data layout can avoid unpredictable swapping in and out.
5. Quantization Bit Width: The Trade-off Between 1-bit and 3-bit
Measured data gives a clear trade-off curve:
- 1-bit quantization, direct access disabled: about 1.5 tokens/s; enabled: about 0.85 tokens/s;
- 3-bit quantization: about 0.75 tokens/s.
At 1.5 tokens/s, generating a few hundred words takes several minutes; producing 50,000 output tokens takes about 18.5 hours. The quality improvement from a higher bit width is almost disproportionate to the throughput loss—in a memory-constrained offline scenario, a higher bit width is not always better; it should match the task’s real sensitivity to quality.
6. An Actionable Tuning Checklist
- Do the capacity calculation first: use the formula above to confirm there is headroom for weights + KV Cache, and leave room for context just to be safe.
- Prioritize tuning the access path: compare measured throughput with direct access on and off, and with different page sizes and prefetch strategies.
- Bind memory and compute: use memory locality binding to reduce cross-node access and avoid bandwidth being eaten up by ineffective data movement.
- A/B test quantization: fix the same set of prompts and compare quality and speed across bit widths, rather than looking only at footprint.
- Cap the context length: treat the stated maximum as a theoretical value, and set a safe level based on actual business needs.
- Make batch processing asynchronous: this kind of environment suits offline batch processing, not interactive online serving.
7. Replicating It in the Cloud: A More Reliable Path
If the goal is production usability rather than a proof-of-concept experiment, a more reliable option is to combine general-purpose capabilities on Baidu AI Cloud to replicate a similar architecture: use general compute instances with a high memory ratio to host the memory pool, use object storage to archive model weights and results, use a container platform for environment固化 and elastic scaling, and use monitoring, alerting, and logging services to observe throughput, memory levels, and task duration. This preserves the idea of “running large models on large memory” while avoiding the operational and availability risks of a single-machine setup.
8. Conclusion
The real value of this case is not proving that “GPUs are useless,” but offering a clearly bounded conclusion: in offline batch-processing scenarios with extremely low throughput requirements where hour-level generation is acceptable, large-capacity memory plus a multi-core general-purpose CPU is a viable fallback; once you move into interactive scenarios, accelerator cards and distributed inference remain irreplaceable. Engineering maturity shows in knowing exactly which metric you are paying for.
