Engineering Trade-Offs of Running Trillion-Parameter Models on CPUs with Persistent Memory
Running a 2.8-trillion-parameter model on a CPU-only server illustrates the trade-offs between memory capacity, bandwidth, thermal design, power consumption, cost, and inference speed. With approximately 610 GB of effective memory required after accounting for runtime overhead, the approach is not suitable for real-time applications, but it can be viable for budget-sensitive, latency-tolerant offline workloads.
Engineering Trade-Offs of Running Trillion-Parameter Models on CPUs with Persistent Memory
In large-model inference, insufficient GPU memory is often the first visible limitation. Once a model reaches the trillion-parameter scale, however, the real bottleneck expands beyond VRAM to include system memory capacity, memory bandwidth, thermal management, and power delivery.
A recent technical community experiment demonstrated a 2.8-trillion-parameter model running in a CPU-only environment on a server with a 40-core CPU and high-capacity persistent memory modules. With 1-bit quantization, the weights alone require approximately 350 GB. After accounting for runtime buffers, KV cache, alignment, and fragmentation, the practical memory requirement can reach roughly 610 GB.
The reported inference speed was around 0.8 tokens per second. This is clearly unsuitable for real-time interaction, but it presents an alternative for budget-sensitive, latency-tolerant offline workloads.
1. The Memory Wall Comes First
For trillion-parameter models, the core challenge is not simply a lack of compute. It is the combination of model size and memory bandwidth.
During autoregressive inference, a large portion of the model weights must participate in computation for every generated token. With a small batch size, the CPU’s matrix computation units are difficult to fully utilize. The system spends much of its time moving weights through the memory hierarchy.
GPUs gain their advantage partly from the high bandwidth of dedicated VRAM. A CPU-only design that uses conventional volatile memory to build a system with hundreds of gigabytes or even terabytes of capacity can become prohibitively expensive.
Quantization is the first method for reducing capacity requirements. With 1-bit quantization, each parameter occupies approximately one-eighth of a byte on average, resulting in theoretical weight storage of about 350 GB for a 2.8-trillion-parameter model. With 3-bit quantization, the theoretical weight requirement rises to approximately 1.05 TB.
Actual deployment also requires space for the KV cache, activations, temporary buffers, memory alignment, and fragmentation. Capacity planning therefore cannot be based on theoretical weight size alone. The example requiring approximately 610 GB with 1-bit quantization shows that the real threshold is determined by weights plus runtime overhead.
2. Persistent Memory Is a Capacity Tier, Not a Speed Tier
The value of high-capacity persistent memory is not that it replaces DRAM, but that it provides a capacity tier between DRAM and SSD storage.
Persistent memory can offer large capacity per module and data retention across power loss. Its cost per unit of capacity may be significantly lower than that of an equivalent amount of conventional volatile memory. However, its latency and bandwidth are generally inferior to DRAM. Write endurance and thermal design must also be included in the engineering evaluation.
A more practical architecture is to divide data across memory tiers:
- Store hot weights, the KV cache, activations, and temporary buffers in DRAM.
- Keep cold weights resident in persistent memory, using direct or persistent address-space mappings so that software controls tensor placement.
- Store model archives, logs, and checkpoints on SSDs or object-storage services.
The software stack needs to support layer-level prefetching, asynchronous loading, large-page mappings, and NUMA affinity to avoid the latency amplification caused by cross-node memory access. A simplified example is shown below:
# Pseudocode: tiered weight loading with thermal protectionDRAM_CACHE_GB = 256TEMP_LIMIT = 85def load_tensor(name, layer, prefetch=True):if layer in hot_layers:return dram_cache.load(name)return persist_map.load(name, prefetch=prefetch)def infer_step(model, input_ids):if sensor.max_temp() > TEMP_LIMIT:throttle_or_pause()for layer in model.layers:weight = load_tensor(layer.name, layer, prefetch=True)hidden = layer_forward(hidden, weight)return hidden
3. The Cost Model Must Go Beyond Memory Pricing
The appeal of this approach comes primarily from its cost per unit of capacity. Total cost, however, must include the memory modules, server platform, thermal modifications, electricity, operations, and failure recovery.
Used high-capacity persistent memory may reduce the initial capacity cost, but it can also introduce platform compatibility concerns, uncertainty about module health, demanding thermal requirements, and spare-parts challenges.
Capacity planning should generally retain a 1.2x to 1.5x margin. This helps prevent task interruptions caused by KV cache growth or memory fragmentation.
From an economic perspective, the relevant metric is the cost per task, not simply latency per token. If an offline task runs for more than ten hours but the hardware cost is far below that of a high-VRAM GPU solution, and the task does not require real-time responses, the design may offer reasonable value.
By contrast, online chat, low-latency agents, and high-QPS services should not use this architecture.
4. Thermal and Power Risks Are Easy to Underestimate
High-capacity persistent memory can consume substantial power and generate significant heat under full load. Dense memory slots can also create thermal coupling between adjacent modules.
In the example, high-static-pressure active fans were used to direct airflow over the memory region, with active cooling treated as a hard requirement. Without sufficient airflow, high temperatures can affect nearby conventional memory and, in severe cases, cause thermal damage to memory slots.
A production deployment should include a defined airflow path, temperature sensors, power monitoring, and protection mechanisms for throttling or shutdown. Long-term operation should not depend on an open-chassis test setup.
5. Performance Limits and Suitable Workloads
At approximately 0.8 tokens per second, each token takes about 1.2 seconds to generate. A task that produces tens of thousands of tokens could therefore require more than ten hours.
This performance has little practical value for real-time conversation, but it can be useful for:
- Overnight offline batch processing
- Model evaluation
- Data synthesis
- Low-QPS archival inference
- Research validation
Potential optimization areas include validating quantization strategies, NUMA binding, large-page usage, prefetching, KV cache management, and task-queue scheduling.
Before deployment, teams should complete a checklist covering capacity headroom, quantization accuracy, thermal stress testing, power budgeting, failure recovery, and total-cost analysis.
A CPU-only architecture based on persistent memory is not a replacement for GPU inference. It is a supplemental option for workloads constrained by budget rather than response time.
