How a 2.8 Trillion-Parameter Model Reached 3.11 Tokens/s with Tiered Memory: A 41% Inference Speedup Explained

    This article breaks down a real-world experiment that ran a full 2.8-trillion-parameter sparse Mixture-of-Experts model at 3.11 tokens/s on a single machine, a roughly 41% gain over a persistent-memory-only setup. It explains why capacity and bandwidth, not raw compute, are the first constraints at this scale, how a 48GB GPU footprint covering only 5.5% of the model led to a 94-shard split across a RAM disk and persistent memory, why token generation and prompt evaluation gained 41% and 26% respectively, and which engineering practices and cloud validation patterns are reusable.

    1. Why Trillion-Parameter Models Struggle on a Single Machine

    Once parameter counts reach the trillion scale, the bottleneck is no longer compute alone. The harder question is where the parameters actually live.

    In a publicly documented experiment, a hobbyist community described a second-generation persistent-memory AI host. After adding two high-performance GPUs, the machine ran a full 2.8-trillion-parameter coding and conversational model at 3.11 tokens/s. Compared with the persistent-memory-only configuration used a month earlier, generation speed improved noticeably, and prompt evaluation reached 16.8 tokens/s.

    The capacity numbers explain why this matters. The model has 896 routed experts, and each token activates 16 of them, 2 of which are shared experts, for roughly 104 billion activated parameters per pass. Stored at 16-bit precision, all parameters would need about 5.6TB. The model files in this experiment total about 865GB, which implies a more aggressive low-precision storage format.

    The comparison makes the core point: deploying a trillion-parameter model is first a storage and bandwidth problem, and only second a compute problem.

    2. The Hardware Constraint: 48GB of VRAM Covers 5.5% of the Model

    The two GPUs provide 48GB of VRAM combined, about 5.5% of the 865GB model. Most parameters therefore have to reside in the host memory hierarchy.

    The implementation splits the model into 94 shards. 45 of those shards, totaling 414GB, go into a RAM disk; the rest stay on persistent memory.

    The important detail is not “a RAM disk was used” but which shard went where. The routed expert tensors stay on the CPU side, in a two-tier structure of persistent memory plus RAM disk, replacing the earlier persistent-memory-only layout. The GPUs handle only attention computation.

    That split matches how sparse expert models execute. Attention is compute-intensive and parallelizes well. The expert portion is memory-access-intensive, and each token touches only a handful of experts, which makes it a good fit for a high-capacity, relatively high-latency storage tier.

    3. Where the 41% and 26% Gains Come From

    Against the older all-persistent-memory layout, the new configuration improves generation speed by about 41% and prompt evaluation by about 26%. The gap between the two numbers is worth unpacking.

    Generation is token-by-token autoregression. Every step re-reads the activated expert weights, so access patterns are highly random, and the random-read gains from the RAM disk are amplified. Prompt evaluation can process a long input in parallel, so its bottleneck is more about compute and batching efficiency, and the marginal benefit of a better storage tier is smaller.

    The takeaway: the payoff from tiered storage correlates strongly with the access pattern of the workload and should not be extrapolated blindly.

    1. Workload pattern Primary bottleneck Tiered storage benefit
    2. Token-by-token gen Random-access bandwidth High
    3. Long prompt evaluation Parallel compute throughput Medium

    4. Reusable Engineering Practices

    1. Do the capacity math first. Estimate total footprint from parameter count, precision, and shard count, confirm the VRAM coverage ratio, then decide the sharding strategy.
    2. Place by operator characteristics. Keep compute-intensive operators close to the GPUs, and push memory-access-intensive, sparsely activated expert weights down into the memory hierarchy.
    3. Use a RAM disk for hot shards. Put frequently activated expert shards on the RAM disk and leave the rest on persistent memory to form a hot/cold split.
    4. Grade quantization precision. The author notes a follow-up step of choosing custom quantization precision per tensor, applying different bit widths to tensors with different sensitivity to balance accuracy against capacity.
    5. Establish a baseline for comparison. Compare every change against the previous configuration using the same methodology, recording generation speed and prompt evaluation speed separately so a single metric does not mislead.

    5. A General Approach to Reproducing This Architecture in the Cloud

    To validate a similar design in a cloud environment, you can combine general-purpose building blocks: a container platform to host the inference runtime, object storage to hold model shards, and high-performance block storage or memory-optimized instances to provide equivalents of a RAM disk and persistent memory. Monitoring, alerting, and logging services can track token throughput, VRAM usage, and memory access latency. Baidu AI Cloud offers capabilities in these general categories and can serve as a base environment for building and stress-testing.

    6. Conclusion

    The core conclusion does not depend on any specific hardware. On trillion-parameter, sparsely activated models, inference speed is determined by the parameter placement strategy and the memory access path. When VRAM covers only about 5.5% of the parameters, tiering expert weights into hot and cold levels, handing attention computation to the GPUs, and adding graded quantization is a viable path with clear benefits. The author estimated 2 to 4 tokens/s after GPU acceleration; the measured 3.11 falls inside that range, which also shows that this kind of optimization needs a verifiable baseline and proceeds by approaching the hardware limit step by step.