SKIM:通过选择性知识引导掩码剪枝大语言模型智能体
SKIM: Pruning Large Language Model Agents via Selective Knowledge Informed Masking
AI总结:
针对结构化生成场景下的大语言模型智能体,提出首个类别感知的剪枝与蒸馏框架 SKIM,在高稀疏度下仍能提升工具调用等任务的准确率,为语法约束智能体的部署提供了有效压缩方案。
摘要:
大语言模型(LLM)智能体越来越多地部署在结构化生成场景中,推理时语法约束会强制规定输出格式。现有压缩方法针对的是无约束生成,我们首先发现了一个根本性不匹配:在结构化生成下,语法约束会将模型的输出分布缩减为有效 token,而 logit 值在决定智能体动作的少数位置最为关键。基于这一发现,我们提出了 SKIM(Selective Knowledge-Informed Masking,选择性知识引导掩码),这是首个针对结构化生成场景下 LLM 智能体的剪枝与蒸馏框架,其两个阶段均由 token 角色引导。SKIM 将 token 位置划分为上下文、决策和格式三类,该划分驱动两个互补方向:(1)类别感知的剪枝显著性分数,用于保留与决策位置最相关的参数;(2)在线策略蒸馏目标,使学生模型与教师模型在有效 token 上对齐,并结合类别感知的特征匹配。我们在工具调用基准和多步骤智能体循环中,针对多种模型规模和稀疏度水平评估了 SKIM。SKIM 始终比基线方法提升准确率,其优势在高稀疏度 regime( regime 译为“ regime”,此处保留原词)下最为显著,而传统方法在该 regime 下表现不佳,证明了类别感知压缩在部署时语法约束智能体中的应用潜力。
英文摘要:
Large Language Model (LLM) agents are increasingly deployed under structured generation, where grammar constraints enforce output format at inference time. Whereas existing compression methods target unconstrained generation, we first identify a fundamental mismatch: under structured generation, grammar constraints reduce the model's output distribution to valid tokens, and the logits matter most at the small set of positions that decide the agent's action. Motivated by this finding, we propose SKIM (Selective Knowledge-Informed Masking), the first pruning and distillation framework for LLM agents under structured generation, with both stages guided by token role. SKIM partitions token positions into context, decision, and format categories, and this partition drives two complementary axes: (1) category-aware pruning saliency scores that preserve parameters most relevant for decision positions; and (2) an on-policy distillation objective that aligns student and teacher on valid tokens, paired with category-aware feature matching. We evaluate SKIM on tool-calling benchmarks and within multi-step agent loops, across multiple model scales and sparsity levels. SKIM consistently improves accuracy over baselines, with its superiority becoming most striking in high-sparsity regimes where conventional methods struggle, demonstrating the potential of category-aware compression for deployment-time grammar-constrained agents.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。