Consumer Dual-GPU and Tiered Storage: Running a Massive MoE Model Locally
This engineering case study shows how consumer GPUs, CPU-based expert execution, and tiered storage can make a 2.8-trillion-parameter Mixture-of-Experts model usable on a local server. By moving frequently accessed tensors to a tmpfs memory disk while keeping colder shards on persistent memory, the system achieved 3.11 tokens per second during generation and improved performance without requiring enough GPU memory to hold the full model.
1. Why Running a Full-Scale Model Is So Difficult
A personal server enthusiast recently shared an upgrade to a second-generation AI system. After adding two consumer flagship GPUs, the machine successfully ran a cloud provider’s 2.8-trillion-parameter full model at 3.11 tokens per second. This represents a substantial improvement over an earlier design that relied entirely on persistent memory.
The example highlights a broader engineering challenge: when a model is far larger than the available GPU memory, how can hardware components and storage tiers be coordinated to make inference both possible and reasonably fast?
Several figures illustrate the scale of the problem. The model files occupy approximately 865 GB. Storing all parameters at 16-bit precision would theoretically require about 5.6 TB. The model uses a typical Mixture-of-Experts architecture with 896 experts, of which only 16 are activated for each token, including two shared experts. The active parameter count is approximately 104 billion.
This creates two contrasting characteristics:
- The total weight volume is enormous: The complete parameter set exceeds the memory capacity of any single consumer GPU and is larger than the total memory available in many workstations.
- The computation is sparse: Each forward pass touches only a small subset of the expert tensors. This creates a natural opportunity to place cold data on slower media and hot data on faster media.
2. System Architecture: Three-Tier Storage and CPU/GPU Division of Labor
2.1 Tiered Storage Design
The central idea behind the new configuration is to redistribute the model’s 94 shards according to access frequency:
- 45 shards, totaling approximately 414 GB, are loaded into a tmpfs memory disk. These are generally high-frequency tensors that benefit from the lowest possible read latency.
- The remaining shards stay on persistent memory. This provides a larger and more economical layer for colder data.
- Compared with the previous design, in which the entire model remained on persistent memory, this change increased generation speed by approximately 41% and improved prompt evaluation speed by about 26%.
tmpfs is a temporary filesystem backed by system memory. Its reads and writes operate at memory-like speeds, but it consumes main memory and loses its contents when the system powers off. For inference, model weights are normally read-only during execution, making them a suitable workload for a memory-backed filesystem.
2.2 Workload Distribution: GPUs for Attention, CPUs for Expert Routing
The two GPUs provide a combined 48 GB of VRAM, equivalent to only about 5.5% of the model’s 865 GB of files. They therefore cannot store the main model.
Instead, the system divides the workload as follows:
- Attention computation runs on the GPUs. Attention layers are dense computation paths used by every token and benefit from GPU parallelism and memory bandwidth.
- Routed expert tensors remain on the CPU side. Expert layers are sparsely activated, while their total weight volume is extremely large. Keeping them on the CPU and using tiered storage is more economical.
This hybrid pipeline—GPUs handling hot, dense computation while CPUs manage sparse, large-scale weights—is a representative approach for running very large MoE models in memory-constrained environments.
3. Performance Analysis and Validation
The measured performance fell within the author’s earlier estimate of 2 to 4 tokens per second, suggesting that the performance model was reasonably accurate. The results can be understood from two perspectives.
Generation, or decode: Each newly generated token must traverse the active computation paths, making memory bandwidth a major bottleneck. A rate of 3.11 tokens per second makes single-response generation practical for interactive use.
Prompt evaluation, or prefill: The new configuration reached 16.8 tokens per second, an improvement of approximately 26%. Prefill can be highly parallelized and makes more effective use of available compute resources, so its absolute throughput is significantly higher than decode throughput.
It is also notable that moving only 5.5% of the model files to faster storage produced a 41% improvement in generation speed. This shows that performance gains do not scale linearly with the amount of data migrated. Data on frequently accessed execution paths can have a disproportionately large effect on end-to-end latency.
4. Reusable Deployment Lessons and Future Optimizations
This case provides several general lessons for deploying large MoE models locally:
- Analyze activation patterns before deciding where data should reside. Shared experts and attention weights are accessed for every token and should receive priority on the fastest storage tier. Long-tail experts can remain on slower media.
- GPU memory does not need to hold the entire model. A small amount of VRAM can still deliver substantial acceleration when it is reserved for attention and other dense, compute-intensive operations.
- Tiered storage is a practical path for running large models on consumer hardware. Combining a memory disk with persistent memory or other high-capacity storage balances capacity, cost, and speed.
The system still has room for further optimization. One major direction is custom mixed-precision quantization: different tensor types could use different quantization levels according to their sensitivity. This could reduce data movement further while keeping accuracy degradation within an acceptable range.
For teams that want to deploy very large models in local or private environments, the broader lesson is that a combination of tiered storage, specialized hardware responsibilities, and gradual quantization can be more practical than simply adding more hardware.
