ChatPaper.aiChatPaper

SpeContext: LLMにおける推論的コンテキスト疎化による効率的な長文脈推論の実現

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

November 30, 2025
著者: Jiaming Xu, Jiayi Pan, Hanzhen Wang, Yongkang Zhou, Jiancai Ye, Yu Wang, Guohao Dai
cs.AI

要旨

本論文では、検索アルゴリズムの目的がLLMとの整合性を取ることにある点を指摘する。これはLLMにおける知識蒸留の目的と類似している。我々は、情報理論の観点から蒸留言語モデル(DLM)と元のLLMの情報焦点の類似性を分析し、DLMを検索アルゴリズムとして活用する新たなパラダイムを提案する。この知見に基づき、長文脈推論のためのアルゴリズムとシステムの協調設計であるSpeContextを発表する。(1) アルゴリズムレベルでは、SpeContextはDLMのヘッドレベル注意重みに基づく軽量検索ヘッドを提案し、冗長性の剪定により90%以上のパラメータ削減を達成する。(2) システムレベルでは、弾力的ロード戦略による非同期プリフェッチデータフローを設計し、KVキャッシュ検索とLLM計算を効果的に重畳させる。(3) コンパイルレベルでは、理論的メモリモデルを構築し、GPUメモリ利用率を最大化することで加速を実現する適応型メモリ管理システムを実装する。SpeContextをクラウドとエッジという二つのリソース制約環境に展開し評価した。大規模実験により、Huggingfaceフレームワークと比較して、SpeContextは精度劣化をほぼ無視しつつ、クラウド環境で最大24.89倍、エッジ環境で10.06倍のスループット向上を達成し、精度とスループットのパレートフロンティアを推進することを示した。
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.
PDF111December 3, 2025