Running Trillion-Parameter Models Without GPUs: Persistent Memory Inference in Practice

    This article explores a practical experiment that runs a 2.8-trillion-parameter model without dedicated GPUs, using server-grade CPUs, large-capacity persistent memory, low-bit quantization, and memory mapping techniques. It explains why memory capacity often becomes the real bottleneck in extreme-scale inference, how persistent memory and DRAM can form a tiered caching architecture, and what performance users can realistically expect. The results show throughput of roughly 0.75–1.50 tokens per second, confirming that this approach is viable for offline batch processing, research validation, and educational use, but not for low-latency interactive services. The article also provides capacity planning guidance, engineering principles, and a clear definition of the boundaries of this approach.

    Introduction: Why a GPU-Free Approach Is Worth Discussing

    Inference for extremely large models is typically considered a GPU cluster task, because GPUs provide far higher parallel compute throughput and memory bandwidth. However, inference is not only constrained by compute. In scenarios involving massive parameter counts, low concurrency, and low-bit quantization, the bottleneck shifts noticeably to memory capacity and bandwidth. Model weights must be loaded completely or in shards, and every generated token requires accessing a large portion of the weights. If weights do not fit in GPU VRAM, frequent swapping quickly destroys latency.

    The core value of the experiment discussed here is not about replacing GPUs, but rather about validating a capacity-first engineering path: using high-capacity non-volatile persistent memory to hold read-only weights, DRAM as a hot cache, CPUs for matrix-vector computation, and low-bit quantization to compress the model footprint. This approach is better suited for research validation, offline batch processing, low-frequency generation, and teaching—not for high-concurrency online serving.

    Architecture: CPU + Persistent Memory + Quantization

    The experiment’s configuration can be abstracted into three layers: a server-grade multi-core processor, large-capacity persistent memory, and a CPU-based inference framework. The processor handles computation and memory scheduling. Persistent memory supplies far higher capacity limits than ordinary DRAM. The inference framework reduces bandwidth pressure through quantization, memory mapping, and caching strategies.

    Persistent memory’s defining traits are large capacity, non-volatility, and relatively manageable per-unit cost—but latency is higher than DRAM and bandwidth depends heavily on platform channels and access patterns. It is therefore unsuitable for frequent writes or highly random small accesses, but ideal for read-dominated workloads like model weights. Since model weights are effectively read-only during inference, persistent memory is a natural match. By mapping weight files into the address space in read-only mode, the system can load data on demand and avoid copying everything into DRAM at startup.

    Quantization is equally critical. For a 2.8-trillion-parameter model, 1-bit quantization yields a theoretical lower bound of about 350 GB for weights alone. 3-bit quantization raises that to roughly 1.05 TB, before accounting for runtime overhead, KV cache, alignment padding, or intermediate activations. Low-bit quantization is therefore not an afterthought—it is a necessary condition to fit the model into an affordable memory hierarchy. At the same time, the accuracy loss and dequantization cost must be carefully evaluated.

    Key Mechanisms: Memory Hierarchy, Mapping, and Caching

    The experiment used App Direct Mode, which exposes DRAM and persistent memory as two separate memory spaces to software. This provides clear capacity accounting and direct control, but it requires the software to explicitly manage hot and cold data. When all weights are read directly from persistent memory, the latency of every access sits on the critical path. The initial measured speed was about 0.85 tokens per second, demonstrating that it works but that memory access costs are significant.

    After disabling the direct access mode so that frequently used data could benefit from DRAM caching, throughput improved to about 1.50 tokens per second. This change highlights a fundamental principle: persistent memory provides capacity; DRAM provides speed; and the cache hit rate determines the actual experience. For layer-by-layer inference, the current layer’s weights, hot layers, common prefixes, and KV cache entries are all cache candidates. Higher hit rates hide persistent memory latency more effectively.

    The following pseudocode expresses the idea of read-only weight mapping and hot-layer prefetching:

    1. weights = mmap_readonly(model_path)
    2. for layer in model.layers:
    3. if is_hot(layer):
    4. cache_to_dram(layer.weights)
    5. prefetch(layer.next_weights)
    6. y = cpu_matvec(layer.weights, x, quant_bits=low_bit)

    The point is not a specific API but the engineering principles: read-only weights, layer-by-layer loading, hot-layer caching, prefetching, and minimizing synchronous access. For extremely large models, any full scan amplifies latency, so blocking, pipelining, and caching strategy matter more than simply adding more CPU cores.

    Measured Results: Slow but Meaningful

    The experiment offers concrete data points worth noting. With 1-bit quantization and compressed model data, initial generation ran at about 0.85 tokens per second. After adjusting the cache strategy, it improved to around 1.50 tokens per second. A separate 3-bit quantization test ran at roughly 0.75 tokens per second, generating 50,000 tokens in about 18.5 hours. These figures confirm that a GPU-free setup can generate text but falls far short of interactive service requirements.

    The bottleneck comes from three main sources. First, generating a single token requires reading an enormous number of weights, making memory bandwidth and latency the dominant constraint. Second, CPU-side dequantization and matrix computation add overhead. Third, persistent memory has higher random-access latency than DRAM, and cache misses amplify that penalty. Interestingly, the 3-bit run was slower than the 1-bit run—even though precision was higher, the larger weight footprint and more complex dequantization outweighed the benefit.

    Reproducing the Setup: Capacity Planning and Operational Notes

    To recreate a similar environment, capacity planning comes first. Weight size, KV cache, runtime buffers, and filesystem page cache must all be included. For a 2.8-trillion-parameter model, 1-bit quantization yields roughly 350 GB of weights; 3-bit quantization yields about 1.05 TB. Plan for at least 20% headroom beyond that.

    Practical steps include:

    • Map weights in read-only mode to avoid full copies at startup.
    • Cache hot layers and frequently accessed data into DRAM.
    • Bind execution to NUMA nodes and control thread counts.
    • Enable huge pages where supported.
    • Monitor page-fault rates, memory bandwidth, and CPU utilization.
    • Start with short sequences and small batches to validate correctness before increasing generation length.

    Optimization Directions and Applicability Boundaries

    Useful optimizations include better low-bit and grouped quantization schemes, weight blocking with pipelined prefetching, KV cache paging and eviction, keeping hot layers resident in DRAM, reducing temporary allocations during dequantization, async I/O, and thread affinity tuning. Operational monitoring should track cache hit rate, memory bandwidth, page faults, and CPU utilization. For persistent memory specifically, write endurance, platform compatibility, supply continuity, and data consistency must all be assessed. Storing weights in read-only mode reduces write-wear risk considerably.

    The boundaries of this approach are equally clear. It fits low-cost feasibility validation, offline long-form generation, private on-premises experiments, and teaching—where the trade-off between latency and hardware cost is acceptable. It is not suitable for high-concurrency online inference, interactive chat, or real-time systems.

    The bottom line: running a trillion-parameter model without GPUs works through a combination of high-capacity persistent memory, low-bit quantization, CPU inference, and tiered caching. Performance is limited, but the engineering significance is clear. It offers a valuable supplement to GPU-based serving, especially when memory capacity is the primary constraint and cost must be kept low.