HyperOffload: Graph-Driven Hierarchical Memory Management for Large Language Models on SuperNode Architectures

Fangxin Liu, Qinghua Zhang, Hanjing Shen, Zhibo Liang, Li Jiang, Haibing Guan, Chong Bao, Xuefeng JinarXiv 2026 · OpenReview

TL;DR

This paper introduces HyperOffload, a novel compiler-assisted framework that treats remote memory access as explicit operations within the computation graph. By enabling global, compile-time analysis and optimization of data movement, HyperOffload effectively hides remote memory latency and significantly reduces peak device memory usage for LLMs on supernode architectures, without compromising performance.

What Problem Does This Paper Address?

The ever-increasing size and complexity of Large Language Models (LLMs), particularly their demand for long-context reasoning and sparse architectures, have created a severe memory bottleneck. Traditional approaches rely on device memory (HBM), which quickly becomes insufficient. While emerging "supernode" architectures offer massive, high-bandwidth shared memory pools, existing software stacks fail to fully exploit this hardware. Current runtime-based offloading mechanisms operate with a limited, local view, leading to reactive scheduling, exposed communication latency, and stalled computation pipelines. This prevents LLMs from scaling effectively and efficiently.

Methods

HyperOffload tackles this problem by shifting memory management from the runtime to the compiler. The core innovation is graph-driven memory management:

  • Operatorized Remote Memory Access: Remote memory operations (like loading data from or storing data to remote memory) are transformed into explicit "cache operators" within the compiler's Intermediate Representation (IR). This makes data movement a first-class citizen in the computation graph, allowing the compiler to analyze and schedule it.
  • Global Visibility and Lifetime Analysis: By treating memory operations as graph nodes, the compiler gains a global view of tensor lifetimes and dependencies. This enables precise, compile-time planning of memory allocation and deallocation, reducing redundant usage.
  • Graph-Driven Execution-Order Optimization: The framework employs an algorithm to refine the execution order of independent operators. This optimization strategically schedules data transfers to occur just in time – early enough to hide latency behind computation, but late enough to minimize the time data resides in device memory. This ensures optimal overlap between computation and communication.
  • Non-Intrusive Integration: HyperOffload integrates seamlessly into the MindSpore deep learning framework. Users can continue writing standard model scripts, and the framework automatically infers and inserts necessary cache operators and optimizations during Just-In-Time (JIT) compilation. Expert users also have optional interfaces for finer control.

Datasets

The paper evaluates HyperOffload on representative large-scale models for both training and inference:

  • Training: LLaMA-8B and DeepSeek-V3 models.
  • Inference: DeepSeek-V3 integrated with the NSA (sparse attention) algorithm.

The evaluation focuses on scenarios involving KV cache offloading and long-context inference.

Key Insights and Ideas

  • Runtime is Too Late: Reactive, runtime-based memory management fundamentally limits performance because it lacks the global foresight needed to effectively schedule data movement and hide latency.
  • Compiler is Key: Elevating memory operations to graph-level operators empowers the compiler with the necessary visibility and control to perform sophisticated optimizations, such as just-in-time prefetching and execution-order refinement.
  • Just-In-Time is Optimal: The sweet spot for memory transfers lies in executing them precisely when needed – not too early to waste memory, and not too late to stall computation. This requires static, compiler-driven scheduling.
  • Supernodes Need Super-Compilers: Emerging supernode architectures with massive shared memory pools are powerful, but unlocking their full potential requires a corresponding evolution in compiler technology to manage this hierarchical memory effectively.

Key Results

  • Reduced Peak Memory Usage: HyperOffload reduces peak device memory usage by up to 26% for inference.
  • Enhanced Long-Context Capability: In inference, offloading KV caches to remote memory allows for a 1.73x increase in the maximum supported sequence length.
  • Improved Inference Stability: For long-sequence inference, HyperOffload reduces defragmentation events from dozens to zero, leading to a 23.13% reduction in prefill latency and a 13.78% reduction in overall end-to-end latency.
  • Maintained Performance: Crucially, these memory savings and stability improvements are achieved while maintaining end-to-end performance, and in some cases, even improving it by hiding communication latency.
  • Robustness to Bandwidth: The approach demonstrates robustness to varying Host-Device bandwidth, with performance gains increasing as bandwidth improves.

Limitations and Future Work

  • Sparse Block Granularity: The paper notes that for inference with sparse blocks, increasing the granularity of these blocks can lead to a performance slowdown due to CPU-side overheads. Future work could explore optimizations for data parallelism or finer-grained scheduling to mitigate this.
  • Model Compression Orthogonality: HyperOffload is presented as orthogonal to model compression techniques. Combining these approaches could potentially yield even greater benefits.
  • Further Optimization: While the framework achieves significant results, there's always room for further refinement in scheduling algorithms and compiler optimizations to maximize overlap and minimize memory footprint across an even wider range of workloads.

Summary updated

BibTeX
@misc{liu2026hyperoffload,
  author = {Fangxin Liu and Qinghua Zhang and Hanjing Shen and Zhibo Liang and Li Jiang and Haibing Guan and Chong Bao and Xuefeng Jin},
  title = {{HyperOffload: Graph-Driven Hierarchical Memory Management for Large Language Models on SuperNode Architectures}},
  year = {2026},
  eprint = {2602.00748},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.00748},
}
Figure