arXiv:2512.00722cs.AI2025-12中稿 · ASPLOS 2026被引 7

用轻量检索头提升大模型长文本推理效率,兼顾速度与精度。

SpeContext: Enabling Efficient Long-context Reasoning with Speculative Context Sparsity in LLMs

  • 用小模型做检索,通过注意力权重剪枝减少90%以上参数。
  • 异步预取数据流让缓存加载与计算并行,提升吞吐。
  • 自适应内存管理最大化显存利用,适合云端和边缘部署。

本文指出检索算法的目标应与大模型对齐,类似知识蒸馏中的信息聚焦。基于信息论分析蒸馏模型(DLM)与原模型的信息一致性,提出新范式:以DLM作为检索算法。SpeContext实现三重优化:(1) 算法层设计轻量级检索头,基于DLM头部注意力权重剪枝,参数减少超90%;(2) 系统层采用弹性加载策略实现异步预取流水线,有效重叠KV缓存检索与LLM计算;(3) 编译层构建理论内存模型,实现自适应内存管理系统,最大化GPU内存利用率。在云和边缘两个资源受限环境中部署评估,相比HuggingFace框架,云上最高达24.89倍吞吐提升,边缘达10.06倍加速,精度损失可忽略,显著推进了准确率与吞吐的帕累托前沿。

原文摘要 · Abstract (English)

In this paper, we point out that the objective of the retrieval algorithms is to align with the LLM, which is similar to the objective of knowledge distillation in LLMs. We analyze the similarity in information focus between the distilled language model(DLM) and the original LLM from the perspective of information theory, and thus propose a novel paradigm that leverages a DLM as the retrieval algorithm. Based on the insight, we present SpeContext, an algorithm and system co-design for long-context reasoning. (1) At the algorithm level, SpeContext proposes lightweight retrieval head based on the head-level attention weights of DLM, achieving > 90% parameters reduction by pruning the redundancy. (2) At the system level, SpeContext designs an asynchronous prefetch dataflow via the elastic loading strategy, effectively overlapping KV cache retrieval with the LLM computation. (3) At the compilation level, SpeContext constructs the theoretical memory model and implements an adaptive memory management system to achieve acceleration by maximizing GPU memory utilization. We deploy and evaluate SpeContext in two resourceconstrained environments, cloud and edge. Extensive experiments show that, compared with the Huggingface framework, SpeContext achieves up to 24.89x throughput improvement in cloud and 10.06x speedup in edge with negligible accuracy loss, pushing the Pareto frontier of accuracy and throughput.

长文本推理检索优化高效推理内存管理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。