Running Trillion-Parameter LLMs Without GPUs: A CPU Inference Practice with Persistent Memory

    This article analyzes a community experiment that successfully ran a 2.8 trillion-parameter large language model on a home server without GPUs, utilizing 3D XPoint-based persistent memory. It covers the hardware architecture, software frameworks, and extreme low-bit quantization strategies. The article also concludes with reusable engineering insights on memory caching, capacity planning, and the trade-offs between "runnable" and "usable" inference performance.

    1. Background: Why Run Large Models on Machines Without GPUs?

    The parameter scale of large language models (LLMs) has rapidly expanded in recent years, moving from the tens of billions to the trillions. The industry standard practice is to use multiple high-performance GPUs (or dedicated accelerators) for inference, but this introduces two practical problems:

    1. VRAM Capacity Bottleneck: Even with extreme quantization, the weight files of a trillion-parameter model often reach the terabyte (TB) level, far exceeding the total VRAM of a single-machine GPU cluster. This usually requires multi-node, multi-GPU networking, resulting in high costs.
    2. High Barrier to Entry: GPU prices continue to rise, making it difficult for individual developers and small teams to afford the hardware required to “run large models.”

    Against this backdrop, a community experiment sparked widespread attention: a developer successfully ran inference on a 2.8 trillion-parameter LLM on a home server without any GPUs. The core secret was the use of a discontinued type of specialized hardware—non-volatile persistent memory based on 3D XPoint technology.

    The value of this experiment does not lie in “practical daily use of the model,” but rather in verifying a technical path: when memory capacity is large enough, a pure CPU can host ultra-large-scale model inference, even if the speed is so slow that it is merely “runnable.”

    2. Key Technology: What is Persistent Memory and Why Can It Hold Trillion-Parameter Models?

    2.1 3D XPoint and the Positioning of Persistent Memory

    Persistent memory is a storage medium positioned between DRAM and traditional SSDs. Based on 3D XPoint phase-change storage technology and jointly developed by two major memory manufacturers, its characteristics can be summarized as follows:

    • Large Capacity: A single module can provide 128GB, 256GB, or even 512GB capacities, far exceeding standard DRAM modules.
    • Byte-Addressable: Unlike SSDs, it can be directly accessed by the CPU byte-by-byte like memory, bypassing the block device protocol stack.
    • Non-Volatile: Data is not lost when power is removed, combining the dual attributes of memory and storage.
    • Low Latency: Read/write latency is significantly lower than SSDs. Although higher than DRAM, it is entirely sufficient for scenarios like sequential reading of model weights.

    It is the combination of “large capacity + byte-addressability + low latency” that makes it an ideal medium for hosting ultra-large model weights.

    2.2 Hardware Configuration Used in the Experiment

    The experimental platform was built on server-grade hardware:

    • Processor: A single 40-core 3rd-generation server-grade scalable processor. A multi-core, large-cache architecture is crucial for pure CPU inference.
    • Persistent Memory: Persistent Memory 200 series products corresponding to the server platform, installed similarly to standard server memory modules.
    • Operating Mode: App Direct mode was used, meaning DRAM and persistent memory were presented to the OS and applications as two independent data spaces, rather than being pooled into unified memory.

    The significance of App Direct mode is that ultra-large but rarely modified data, such as weights, can reside entirely in persistent memory, while DRAM is reserved for activations, KV cache, and the OS. Each memory type handles its specific role.

    3. Software Side: Inference Frameworks and Quantization Strategies

    3.1 Inference Framework Selection

    The experiment utilized a mainstream CPU inference framework. These frameworks share common features: extensive instruction set optimizations for the x86 architecture, support for multiple quantization formats, and robust support for memory-mapped reading of large weight files. For scenarios where model weights far exceed DRAM capacity, these frameworks typically load weight pages on-demand via memory mapping, with the OS’s page cache mechanism managing hot and cold data.

    3.2 Quantization: Compressing Trillion Parameters to a Tolerable Size

    If a trillion-parameter model is stored at 16-bit precision, the weight size will reach several terabytes. The experimenter employed extremely low-bit quantization:

    • 1-bit Quantization: Compresses weights to the limit, drastically reducing model size. This was the best-performing configuration in the experiment.
    • 3-bit Quantization: Retains more precision but results in a larger model size and higher computational overhead.

    Quantization is essentially trading precision for size and bandwidth. For pure CPU inference, memory bandwidth is often the primary bottleneck. Therefore, lower-bit quantization not only saves space but also directly reduces the amount of data that must be moved from memory during inference.

    4. Performance Test: Slow, But It Works

    The data provided by the experiment is highly representative:

    Configuration Generation Speed
    1-bit quantization, DAX enabled ~0.85 tokens/s
    1-bit quantization, DAX disabled ~1.50 tokens/s
    3-bit quantization ~0.75 tokens/s

    The most interesting finding is the second row: disabling DAX (Direct Access) actually nearly doubled the speed.

    The reason is that when DAX is disabled, weight files revert to being read through the standard file system path, allowing the OS’s page cache to come into play. Repeatedly accessed hot weight blocks are cached in DRAM, effectively adding a transparent cache layer to the persistent memory. When DAX is enabled, access bypasses the page cache and goes straight to the medium, preventing hot data from being accelerated by DRAM. Every access is constrained by the relatively lower bandwidth of persistent memory.

    This conclusion has universal reference value for similar memory-constrained inference scenarios: hierarchical caching is often superior to “direct” access.

    Based on the 3-bit quantization configuration, generating 50,000 tokens would take approximately 18.5 hours. While this speed clearly lacks everyday usability, as an experiment to “verify feasibility,” it is highly convincing.

    5. Reusable Engineering Experience

    From this experiment, several experiences broadly applicable to low-cost LLM inference can be extracted:

    1. Capacity Takes Priority Over Speed: The first hurdle in running large models is “fitting them in,” followed by “running them fast.” High-capacity persistent memory and multi-socket server memory are pragmatic choices for expanding capacity.
    2. Multi-Core CPU + Large Cache Architecture is the Foundation of Pure CPU Inference: Inference is a classic memory-intensive workload. Memory bandwidth and cache hit rates directly determine throughput.
    3. Match Quantization Strategy to the Bottleneck: If the bottleneck is memory bandwidth, prioritize lower-bit quantization. If output quality is the priority, a trade-off must be made between size and precision.
    4. Leverage OS Caching Mechanisms: Do not assume that “direct access to the underlying medium” is always faster. Letting hot data naturally settle into DRAM cache is often the better solution.
    5. Distinguish Between “Runnable” and “Usable”: A speed of 1-2 tokens per second is suitable for experimental validation and offline batch tasks, but not for interactive scenarios. Clarifying your goal is essential for choosing the right hardware path.

    6. Extended Thoughts: The Complementary Nature of Cloud Solutions and Local Experiments

    For the vast majority of developers, building a terabyte-level memory server locally is impractical. The more common path is to leverage cloud resources: for example, using managed LLM inference services provided by cloud vendors, or loading model weights from object storage onto elastic compute instances on a pay-as-you-go basis. Platforms like Baidu AI Cloud provide model services and compute instances that represent mainstream landing solutions for these needs.

    The value of local experiments, however, lies in exploring boundaries. This experiment proves that the hardware lower limit for model inference is much lower than imagined. It also gives us a clearer understanding of how underlying factors—such as quantization, caching, and memory bandwidth—jointly determine inference performance. Whether you ultimately choose cloud or local deployment, understanding these principles will help developers make more rational architectural decisions.

    Conclusion

    An experiment composed of discontinued hardware, a home server, and open-source inference software successfully ran inference on a 2.8 trillion-parameter model. This is in itself the best footnote to the spirit of the open-source community. It may not change the mainstream landscape of LLM inference, but it clearly demonstrates an engineering principle: the choice of a technical path always depends on your trade-offs among cost, capacity, and speed. For readers looking to deeply understand the underlying mechanisms of LLM inference, this is undoubtedly a case worth replicating.