DynamicInfer: Runtime-Aware Sparse Offloading for LLMs Inference on a Consumer-Grade GPU

Zhui Zhu, Weichen Zhang, Zhenghan Zhou, Yunhao Liu, Fan DangICLR 2026

TL;DR

DynamicInfer is a runtime framework designed to significantly accelerate Large Language Model (LLM) inference on consumer-grade GPUs. By dynamically moving "active" neurons between CPU and GPU memory based on on-the-fly predictions, it achieves up to a 253% speedup over standard engines like llama.cpp and a 59% speedup over state-of-the-art sparse offloaders like PowerInfer, all while maintaining model accuracy.

The Bottleneck: Static Offloading in LLMs

Modern LLMs are massive, often requiring hundreds of gigabytes of memory. Consumer GPUs, such as the RTX 4090, are typically capped at 24GB, creating a major deployment bottleneck.

Existing solutions tackle this using offloading (storing weights in system RAM and swapping them to the GPU) and sparse activation (only computing the small fraction of neurons that "fire" for a given input). Previous state-of-the-art systems, like PowerInfer, rely on static partitioning. They decide which neurons are "hot" (frequently used) based on offline profiling and pin them to the GPU.

Comparison of offloading strategies, highlighting PowerInfer's sparsity-aware hybrid approach.

However, the authors of DynamicInfer discovered a critical flaw in this approach: neuron activation is highly dynamic. Depending on the specific prompt or even the specific token being generated, the "hot" neurons change. Static partitioning leads to "cold" neurons being processed on the slower CPU while "hot" neurons sit idle on the GPU, wasting precious VRAM and causing massive latency.

The CPU Anchor Problem

In previous hybrid systems, nearly 86% of the forward pass time was spent waiting on the CPU to finish its share of the work. The CPU acts as an anchor, dragging down the overall inference speed.

Activated neuron proportion and runtime breakdown showing the severe CPU bottleneck in existing hybrid systems.

DynamicInfer shifts the focus to reducing this CPU load by maximizing GPU "cache hits" for active neurons, ensuring the faster hardware handles the bulk of the dynamic workload.

DynamicInfer's Approach

DynamicInfer introduces three core mechanisms to transform static offloading into a dynamic, runtime-aware process:

  1. Hierarchical Neural Caching: The system uses a two-tier strategy. Macro-level scheduling keeps historically high-frequency neurons on the GPU. Micro-level scheduling uses a lightweight MLP predictor to forecast which neurons will be needed for the current input and prioritizes loading them.
  2. Load-Aware Neuron Activation: In a hybrid CPU-GPU system, the slower processor creates a bottleneck. DynamicInfer dynamically adjusts the activation thresholds for the GPU and CPU. By lowering the threshold for the GPU (making it do more work) and raising it for the CPU, it balances the workload to minimize total latency.
  3. Activation-Aware Prefetching Pipeline: Because hidden states in LLMs evolve slowly across layers, the system can use the output of layer $i$ to predict the active neurons for layer $i+k$. This "look-ahead" allows the system to prefetch weights from the CPU to the GPU over the PCIe bus while the GPU is still busy computing the current layer, effectively hiding the data transfer time.

Key Results and Insights

Extensive experiments were conducted on ReluLLaMA (7B, 13B, 70B) and Prosparse models, as well as standard Llama-2 (SiLU-based) to test generalization. The evaluation yielded several key insights:

  • Massive Speedups: On a high-end setup (RTX 4090), DynamicInfer achieved a 253% speedup over llama.cpp and a 59% speedup over PowerInfer for the 70B model.
  • Better Hardware Utilization: The system increased the proportion of active neurons handled by the GPU from 51% to 68%, significantly reducing the time the system spent waiting on the CPU.
  • Accuracy Preservation: Despite aggressive dynamic pruning and thresholding, the models maintained comparable accuracy to their "dense" (non-sparse) counterparts across logic and reasoning benchmarks (RTE, PIQA, COPA, and Winogrande).
  • Low Overhead: The MLP predictor used for these dynamic decisions is tiny, accounting for less than 10% of total parameters and adding less than 2% to total inference latency.
  • Generalization Beyond ReLU: While ReLU models have "hard" zeros (explicit sparsity), the authors show their method works on SiLU models (like Llama-2) by pruning neurons with the lowest activation magnitudes.

Limitations and Future Work

The current optimization model assumes the GPU and CPU are dedicated entirely to the LLM. In real-world scenarios with background tasks and resource contention, the static timing parameters used for scheduling might become inaccurate. Additionally, while small, the predictor still consumes some VRAM. On extremely memory-constrained devices (e.g., 8GB or 12GB GPUs), this overhead might limit the number of model weights that can be cached.

Future directions include developing more sophisticated online measurement mechanisms that can sense system load in real-time and adjust scheduling fluidly in multi-tenant environments.

Summary updated

BibTeX
@inproceedings{zhu2026dynamicinfer,
  author = {Zhui Zhu and Weichen Zhang and Zhenghan Zhou and Yunhao Liu and Fan Dang},
  title = {{DynamicInfer: Runtime-Aware Sparse Offloading for LLMs Inference on a Consumer-Grade GPU}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=CvjmvjlczZ},
}
Figure