Abstract
Large Language Model (LLM) inference is increasingly constrained by GPU memory limits, forcing a reliance on offloading weights to slower system RAM or SSDs. This offloading introduces a massive data transfer bottleneck where PCIe bandwidth, rather than GPU compute, dictates performance. We introduce Endor, a novel sparse memory format designed specifically for hardware-efficient offloading. By utilizing a simple bitmap to represent unstructured sparsity, Endor significantly reduces the volume of data transferred across the PCIe bus while ensuring minimal decompression overhead on the GPU. Our results demonstrate that Endor achieves up to a 2.37× speedup for models like Llama2-70B, effectively bridging the gap between storage and computation in resource-constrained environments.
Introduction: The Data Transfer Bottleneck
Modern LLMs, such as the 70-billion parameter Llama2, require approximately 140GB of memory for 16-bit weights, far exceeding the 16GB-24GB VRAM typical of consumer-grade GPUs. To run these models, practitioners employ offloading, where weights reside in system DRAM or SSDs and are streamed to the GPU for each layer's computation.
Analysis of offloaded inference reveals a "peculiar situation": because PCIe bandwidth (e.g., 11 GB/s for CPU-GPU or 2.5 GB/s for SSD-CPU) is orders of magnitude lower than GPU memory bandwidth and compute throughput, the system spends nearly 100% of its time waiting for data. In this regime, the actual computation time is negligible, making data transfer the primary target for optimization.
The Endor Sparse Format
To address this bottleneck, we propose Endor, a sparse format optimized for the hardware constraints of offloaded inference. Unlike structured pruning, which can degrade model accuracy, Endor supports flexible unstructured pruning (e.g., 50% sparsity via Wanda or SparseGPT).
The core of Endor is its simplicity. Instead of using complex indexing structures like Compressed Sparse Row (CSR), which add significant metadata overhead, Endor stores non-zero values alongside a compact bitmap. In this bitmap, a single bit indicates whether a weight is zero or non-zero.
This format is "hardware-friendly" because the decompression process—inflating the sparse weights back into a dense matrix for computation—is highly parallelizable and can be executed almost instantly on the GPU. This ensures that the time saved during transfer is not lost to processing overhead.
Performance Evaluation
We evaluated Endor using OPT-66B and Llama2-70B models. A critical insight from our experiments is the trade-off between compression ratio and decompression speed. While standard compression algorithms like ZSTD offer high ratios, their decompression overhead on the CPU or GPU is too high for real-time inference.
As shown in the figure above, Endor significantly reduces the SSD-to-CPU and CPU-to-GPU transfer times compared to the dense baseline. Crucially, its decompression time is minimal compared to ZSTD, allowing for a net performance gain. When combined with NVIDIA GPUDirect Storage to bypass the CPU, Endor achieves a 2.37× speedup for Llama2-70B.
Furthermore, Endor preserves model accuracy. On the WikiText validation set, Llama2-70B at 50% sparsity with Endor maintained a perplexity of 3.97, significantly outperforming structured 2:4 sparsity (5.20). Endor is also orthogonal to quantization; combining it with INT8 quantization yields cumulative speedups and memory savings.
Conclusion
Endor demonstrates that in offloaded LLM inference, reducing data volume through simple, hardware-aligned compression is more effective than complex algorithmic optimizations. By slashing the PCIe transfer bottleneck, Endor enables high-performance inference of massive models on modest hardware. Future work will explore multi-SSD parallelism and native GPU support for unstructured sparse computation to further enhance these gains.
Summary updated