Running LLMs on Persistent Memory: A CPU Inference Feasibility Analysis

    This article analyzes the feasibility of running trillion-parameter Large Language Models (LLMs) on CPU architectures using Intel Optane Persistent Memory. It reviews community-reported benchmarks by breaking down hardware configurations, PMem operation modes, and quantization schemes. By calculating theoretical bandwidth limits, it evaluates whether the claimed inference speeds are realistic and provides practical guidelines for accurately reproducing and verifying such experiments for offline batch processing and research purposes.

    1. Background and Scope

    When the parameter count of Large Language Models (LLMs) reaches the trillion level, the weights alone require terabytes of storage space. Taking a 2.8 trillion parameter model as an example, calculating at FP16 (16 bits, or 2 bytes per parameter), the weights require approximately 5.6TB. If quantization compression is applied, the weight volume can be estimated as “parameter count × bits per parameter ÷ 8”: 3-bit quantization is about 1.05TB, and 1-bit is about 350GB. These figures represent only the weight volume and do not include scale metadata for quantization groups or the KV Cache; the actual memory footprint will be higher.

    The speed data referenced in this article comes from experiments disclosed within the tech community. As public information is incomplete—the author did not release the full model configuration, framework version, or test scripts—these numbers have not been independently reproduced. The purpose of this article is to explain how to evaluate whether such data is reasonable and how to verify it yourself if needed.

    This approach is suitable for offline batch processing, research validation, and architecture testing. It is not suitable for online Q&A or high-concurrency services; the specific calculations for this limitation are detailed in Section 4.

    2. Hardware and Memory Configuration

    The hardware information disclosed in the experiment is limited. The table below lists what is known and what needs to be supplemented for reproduction:

    Item Community Experiment Disclosure Required for Reproduction
    CPU 40-core server-grade processor Specific model, clock speed, supported memory channels
    Persistent Memory Discontinued Intel Optane Persistent Memory, 128/256/512GB per stick Model (200 series), number of sticks, total capacity, slot distribution
    DRAM Not disclosed Capacity per stick, total capacity, number of channels, frequency
    OS & File System Not disclosed Distribution, kernel version, file system type, and mount parameters

    Intel announced the discontinuation of the Optane product line in 2022. When purchasing second-hand hardware, you must verify firmware versions and motherboard compatibility, and there is typically no manufacturer warranty. Optane Persistent Memory requires a compatible Xeon Scalable processor platform; refer to motherboard manufacturers and official Intel documentation for the exact compatibility list.

    Persistent memory operates in two primary modes, with different configurations and applicable scenarios:

    Comparison Item Memory Mode App Direct Mode
    Capacity Presentation PMem acts as system main memory, DRAM acts as cache PMem and DRAM are presented as two independent spaces
    Application Changes No application modification required Applications or frameworks must explicitly manage data location
    Non-volatility Utilization Unavailable Available, data persists across reboots
    Primary Risk Significant latency increase on DRAM cache misses Mount or mapping errors can bypass the DAX path
    Suitable Scenarios Large memory needs without code modification Weight file mapping, hot/cold data tiering

    Switching modes requires modifying BIOS settings and reconfiguring the PMem region. Reconfiguration typically clears all data on the persistent memory. You must back up the original copy of the model files before switching.

    3. Inference Framework and Quantization Schemes

    The experiment used a lightweight C++ inference framework, though its name and version were not disclosed. For reproduction, you should record the framework name, version number (or commit hash), compilation options (e.g., whether AVX-512 and OpenMP are enabled), and the number of runtime threads.

    The term “1-bit quantization” is not standardized within the community. It may refer to a pure binary scheme where each weight is only +1 or -1. It could also refer to a low-bit scheme with grouped scales, or a ternary scheme (-1, 0, +1, representing about 1.58 bits of information per parameter). The precision differences between these schemes are substantial and should not be conflated. The experiment report did not specify which was used, making the reported precision conclusions impossible to verify.

    The table below estimates the weight volume based on parameter count, excluding scales and metadata:

    Precision Bits per Parameter Weight Volume (2.8 Trillion Parameters)
    FP16 16 ~5.6TB
    3-bit 3 ~1.05TB
    1-bit 1 ~350GB

    3-bit grouped quantization generally retains more precision than 1-bit schemes, but the volume is roughly three times larger. Given the hardware constraints of this experiment, the choice of scheme depends on available memory capacity and acceptable output quality. Once a scheme is selected, you should measure the perplexity on a smaller model to ensure the deviation from the FP16 baseline is within an acceptable range.

    4. Performance Data and Bandwidth Verification

    The community experiment disclosed three sets of speed data:

    Quantization Scheme Cache Strategy Generation Speed Notes
    1-bit DAX enabled ~0.85 token/s Weights accessed directly via DAX
    1-bit DAX disabled, relies on page cache ~1.50 token/s ~76% improvement over DAX mode
    3-bit Not specified ~0.75 token/s Generating 50k tokens takes ~18.5 hours

    Whether these figures hold up can be evaluated using a simple upper-bound estimation:

    Theoretical Limit ≈ Effective Read Bandwidth ÷ Bytes of Weights Read per Token

    If the model is a dense model, all weights must be read to generate each token. Taking the 1-bit scheme as an example, about 350GB must be read per token. To achieve 0.85 token/s, an effective bandwidth of approximately 298GB/s (350 × 0.85) is required. For the 3-bit scheme, assuming 1.05TB read per token, achieving 0.75 token/s would require about 788GB/s.

    The sequential read bandwidth of a single PMem stick is only in the single-digit GB/s range; even with multiple sticks operating in parallel, it falls far short of these figures. DRAM channel bandwidth on the same generation of servers is higher, but achieving several hundred GB/s of effective bandwidth across the entire system remains highly improbable. Therefore, if the experimental model is dense, the reported speed figures are highly unlikely to be accurate.

    For these numbers to be reasonable, there are two possibilities: first, the model uses a Mixture of Experts (MoE) architecture, where each token only activates a small fraction of parameters, making the actual read volume much smaller than the total weight size; second, the measurement metrics differ—for example, only counting certain phases, or using different context lengths. The original experiment report did not provide the number of activated parameters, making it impossible to determine which scenario applies.

    Regarding the performance improvement in the page cache solution, a prerequisite must be met: the DRAM must be able to accommodate the frequently accessed parts of the model (e.g., KV Cache and high-frequency weights). If DRAM capacity is insufficient, the page cache will constantly swap in and out (thrashing), potentially degrading performance. The reported “76% improvement” should be understood as a result under a specific DRAM capacity, not a universal conclusion.

    When reproducing the test, it is recommended to follow these metrics:

    • Record the model name, total parameter count, and activated parameter count.
    • Record the framework version, quantization format, context length, batch size (typically 1 for single-request scenarios), and number of threads.
    • Separate load time and generation speed statistics, and specify whether preheating is included.
    • Report the prefill and decode phases separately.