TL;DR
HILOS is a novel near-storage processing (NSP) framework designed to accelerate offline, long-context Large Language Model (LLM) inference on a budget. By offloading memory-heavy attention operations directly to accelerators embedded within SSDs (like SmartSSDs), HILOS bypasses the severe PCIe interconnect bottlenecks typical of traditional offloading systems. This cooperative host-storage design achieves up to a 7.86× throughput improvement and an 85% reduction in energy consumption while maintaining 100% lossless accuracy.
What Problem Does This Paper Address?
Serving Large Language Models (LLMs) with long context windows (e.g., >100K tokens) creates a massive memory footprint, primarily driven by the Key-Value (KV) cache. For offline tasks—such as batch processing, information extraction, and large-scale benchmarking—buying clusters of expensive, high-end GPUs just to hold this KV cache is cost-prohibitive.
To save costs, standard practices use "offloading frameworks" (like FlexGen or DeepSpeed) to spill the KV cache from GPU memory into cheaper host DRAM or secondary SSD storage. However, during the LLM generation (decoding) phase, the system must constantly fetch this massive KV cache back to the GPU. As context lengths grow, this data movement completely saturates the PCIe interconnect, consuming over 60% of the total execution time and leaving the GPU severely underutilized.
Methods
The authors introduce HILOS, a framework that implements Attention Near Storage (ANS) alongside three key optimizations to maximize throughput on commodity hardware:
- Attention Near Storage (ANS): Instead of moving the KV cache to the GPU, HILOS offloads the multi-head attention computation directly to a custom FPGA-based accelerator inside the storage device (e.g., Samsung SmartSSD). The massive KV cache traffic remains entirely internal to the SSD, and only the tiny, final attention vectors are sent back to the host GPU.
- Cooperative X-Cache: Offloading attention leaves the host GPU mostly idle. HILOS exploits this by caching pre-projection input activations ($X$) on the host for a fraction ($\alpha$) of the batches. The GPU recomputes the $K$ and $V$ tensors on the fly for its assigned portion, effectively cutting the required storage read traffic in half.
- Delayed KV Cache Writeback: At each decoding step, the model generates small ($1 \times d$) KV vectors that must be appended to storage. Writing these directly creates terrible write amplification and latency. HILOS buffers these new entries in host memory and writes them back in efficient, page-sized chunks. To prevent redundant transfers, the host CPU precomputes partial dot products ($QK^T$) for these buffered tokens.
- Resource-Efficient Temporal Accelerator: FPGAs on commercial SmartSSDs have tight power and logic constraints. Instead of computing attention all at once (spatial architecture), HILOS uses a temporal architecture that processes attention in blocks (e.g., 128 tokens) and implements a streamlined, streaming two-pass softmax algorithm to minimize off-chip memory traffic.
Datasets
HILOS was evaluated across several prominent decoder-only LLM architectures, including OPT (30B, 66B, 175B), Qwen2.5-32B, Mixtral-8x7B, and GLaM-143B.
To validate long-context accuracy, the authors used LongBench, a bilingual benchmark specifically designed for evaluating long-context capabilities across tasks like multi-document QA and summarization. HILOS achieved 100% lossless accuracy compared to standard FlashAttention baselines.
Key Insights and Ideas
- The Bottleneck Shift: Moving computation to storage solves the host-device PCIe bottleneck, but it shifts the performance bottleneck internally to the SSD's own flash-to-accelerator I/O.
- Trading Idle Compute for Less I/O: Traditional offloading treats the host GPU and SSD as separate pipeline stages, leaving the GPU sitting idle (<20% utilization) during decoding. HILOS's Cooperative X-Cache smartly trades these wasted GPU compute cycles to alleviate the newly shifted storage I/O bottleneck.
- Lossless is Possible on Low-Power FPGAs: Prior near-storage attention frameworks (like InstAttention) relied on lossy compression or sparse retrieval to fit hardware constraints, which degrades accuracy on modern long-context models. HILOS proves that a block-based temporal hardware design can achieve lossless attention within a strict SSD power envelope.
Key Results
The authors evaluated HILOS on a real-world testbed featuring a single NVIDIA A100 GPU and 16 Samsung SmartSSDs:
- Throughput Gains: HILOS achieved up to 7.86× higher decoding throughput compared to conventional SSD-based offloading frameworks (FlexGen) when handling long context windows.
- Energy Savings: Due to the massive reduction in inference latency and minimized PCIe traffic, HILOS reduced total system energy consumption by up to 85%.
- Cost-Efficiency: HILOS delivered up to 2.02× higher cost-efficiency (tokens per second per dollar) than baseline SSD configurations. It even achieved 2.91× greater cost-efficiency than upgrading the system to an expensive NVIDIA H100 GPU, which remains bound by I/O bottlenecks.
Limitations and Future Work
- Scaling to PCIe 5.0: The current HILOS prototype saturates internal PCIe 3.0 lanes. Future PCIe 5.0 storage devices will require a 4× increase in accelerator throughput, demanding over 2,000 DSPs on the storage side—exceeding the capacity of current commodity SmartSSD platforms. Dedicated hardware units for exponential functions will be needed.
- PCIe Software Overhead: Explicit DMA orchestration between host DRAM and FPGA DRAM introduces significant software overhead. The authors note that transitioning to CXL (Compute Express Link) architectures would allow a unified address space, eliminating explicit data copies.
- Capacity Underutilization: To maximize aggregate internal bandwidth, the KV cache is distributed across 16 SSDs. However, this leaves the actual storage capacity of the 3.84TB SSDs largely unexploited (under 600 GB used per drive), indicating a hardware design mismatch that future custom computational storage drives should address.
Summary updated