TaskPress:基于任务引导剪枝的查询无关键值缓存压缩
TaskPress: Query-Agnostic KV Cache Compression via Task-Guided Pruning
AI总结:
TaskPress是一种基于任务引导剪枝的查询无关KV缓存压缩框架,通过任务引导构建可复用缓存,在长上下文任务上实现了紧凑缓存的高效生成。
AI中文摘要:
大语言模型的长上下文推理受限于键值(KV)缓存随序列长度的线性增长。尽管剪枝可缓解该问题,但现有方法确定的是查询特定的标记重要性,无法在未见过的查询间复用。相比之下,我们提出TaskPress,一种基于任务引导、查询无关的KV缓存淘汰框架。TaskPress并非为单个查询优化缓存,而是基于高级任务引导构建可复用的内存表示;该引导在预填充阶段充当元查询,在下游查询发出前过滤不相关标记。此外,TaskPress利用量化缩放因子作为零成本信号,检测有影响力的表示异常值,为标记重要性提供高效代理。在多种含长上下文输入的任务上开展的实验表明,TaskPress可在不同查询间高效生成紧凑、可复用的缓存。
英文摘要:
Long-context inference with large language models is constrained by the linear growth of the key-value cache to sequence length. While pruning offers mitigation, prevailing methods determine query-specific token importance that cannot be reused across unseen queries. In contrast, we introduce TaskPress, a framework for task-guided, query-agnostic KV cache eviction. Instead of optimizing the cache for a single query, TaskPress constructs a reusable memory representation conditioned on a high-level task guide. The guide functions as a meta-query during prefill to filter irrelevant tokens before downstream queries are issued. In addition, TaskPress leverages quantization scale factors as a zero-cost signal for detecting influential representation outliers, providing an efficient proxy for token importance. Experiments on conducted on various tasks with long context input demonstrate that TaskPress efficiently creates a compact, reusable cache across diverse queries.