Abstract
Large Language Models (LLMs) with tens of billions of parameters currently require expensive, enterprise-grade GPU clusters due to their immense memory footprints. Consumer-grade GPUs, while computationally capable, lack the high-speed memory capacity to store these models, and traditional CPU-offloading methods are severely limited by the PCIe bandwidth bottleneck. This paper presents Hermes, a heterogeneous system that augments consumer GPUs with Near-Data Processing (NDP) DIMMs. By exploiting activation sparsity and performing computations directly within memory modules, Hermes achieves a 75x speedup over state-of-the-art offloading systems. This approach enables the execution of models like LLaMA2-70B on consumer hardware at interactive speeds, reducing deployment costs by approximately 95%.
Introduction
The deployment of Large Language Models (LLMs) is currently hindered by a "memory wall." A model such as LLaMA2-70B requires over 140GB of memory for its weights alone, necessitating server-grade hardware like NVIDIA A100 or H100 GPUs, which can cost upwards of $50,000. While consumer GPUs like the RTX 4090 possess significant compute power, their memory capacity is typically capped at 24GB.
Existing solutions attempt to bridge this gap through "offloading," where model weights are stored in system RAM and swapped into the GPU as needed. However, the PCIe bus acts as a massive bottleneck; in these scenarios, up to 99% of inference time is spent moving data rather than performing calculations. Hermes addresses this by shifting the paradigm: instead of moving massive weight matrices to the processor, it moves the computation to the memory.
The Hermes System Architecture
Hermes is a heterogeneous architecture that combines a standard consumer GPU with specialized NDP-DIMMs. The system relies on four key technical pillars:
1. Neuron Partitioning and Activation Sparsity
Analysis of LLM inference reveals significant "activation sparsity." Typically, only about 20% of neurons (referred to as "hot" neurons) contribute to 80% of the computational activity for a given input. Hermes exploits this by keeping the frequently used hot neurons in the fast GPU memory while offloading the remaining "cold" neurons to the NDP-DIMMs.
2. NDP-DIMM Hardware
Unlike standard RAM, NDP-DIMMs are equipped with a specialized "Buffer Chip" containing General Matrix-Vector multiplication (GEMV) units. When the system processes cold neurons, the computation happens directly on the memory stick. This effectively bypasses the PCIe bottleneck because only the final, low-bandwidth results (kilobytes) are transmitted back to the GPU, rather than the massive weight matrices (gigabytes).
3. Lightweight Online Predictor
Because the set of active neurons changes based on the input context, Hermes employs a 4-bit state machine to predict neuron activity in real-time. This predictor leverages token-wise similarity (the tendency for adjacent tokens to trigger similar neurons) and layer-wise correlation. Despite its simplicity and small memory footprint (less than 1MB), the predictor achieves 98% accuracy without the overhead of a secondary neural network.
4. Load Balancing
To prevent any single memory module from becoming a performance bottleneck, Hermes utilizes a window-based scheduler. This component redistributes computational tasks across multiple DIMMs, ensuring parallel efficiency during the inference process.
Evaluation
The authors evaluated Hermes across several prominent LLM architectures, including OPT (13B to 66B), LLaMA2 (13B and 70B), and Falcon-40B. Profiling was conducted using the C4 and Pile datasets, while end-to-end performance and accuracy were measured using COPA, Wikitext2, and PIQA.
Key Results
- Performance: Hermes achieved an average 75.24x speedup compared to existing offloading frameworks like FlexGen and Deja Vu.
- Throughput: The system successfully ran LLaMA2-70B at 13.75 tokens per second on consumer-grade hardware, exceeding the average human reading speed (5–8 tokens per second).
- Cost-Efficiency: A Hermes-enabled workstation can be assembled for approximately $2,500, providing a local alternative to $50,000+ server clusters.
- Scalability: The system demonstrated high efficiency across varying batch sizes, benefiting from the inherent parallelism of the NDP-DIMM array.
Discussion and Limitations
While Hermes represents a significant step toward democratizing LLM inference, several challenges remain. The specialized NDP-DIMMs are currently research prototypes and not yet available as commodity hardware. Additionally, while the system excels at the token generation phase, the initial "prompting" or prefill stage remains GPU-intensive, which may present a bottleneck for very long input sequences. Finally, the system's reliance on activation sparsity is most effective with ReLU-based models; while other activation functions (SiLU, GELU) can be converted to ReLU with minimal accuracy loss, this remains a necessary preprocessing step.
Conclusion
Hermes demonstrates that the "memory wall" in LLM inference can be overcome by rethinking the relationship between storage and computation. By augmenting consumer GPUs with near-data processing capabilities, the system makes elite-level AI performance accessible at a fraction of the traditional hardware cost.
Summary updated