HuggingFace Daily Papers·· 3 天前
TokenGate:用学习式 token 剪枝让 LLM 预填充更快更省内存
TokenGate: Adapting LLMs for Fast and Memory-Efficient Prefill with Learned Token Pruning
AI 导读
TokenGate 是一个小型可插拔组件,通过端到端可学习的 token 剪枝加速长上下文预填充。它借助受 MoE 启发的 token-gated attention 解决 top-K 不可微问题,在多项任务上实现 1.4-11.3 倍更快的 TTFT 和 1.5-3.4 倍更低的峰值内存且无精度损失,相比此前最佳剪枝方法预填充快至 6.4 倍、峰值内存降低 2 倍。
正文 · 原文
Abstract:Expert human readers process large inputs (e.g., code repositories and long documents) by skimming to closely read only what matters. On the other hand, language models process all input tokens through each model layer, resulting in significant processing costs for long-context inputs. We introduce TokenGate, a small, drop-in component that extends existing trained models to enable end-to-end learnable token pruning over long-context inputs for fast and memory-efficient prefill. To enable end-to-end learning despite the non-differentiable top-K operator for token pruning, we introduce token-gated attention, a mechanism inspired by Mixture-of-Experts that re-weights attention logits using token importance scores. Across diverse tasks, TokenGate achieves $1.4$-$11.3\times$ faster time-to-first token (TTFT) and $1.5$-$3.4\times$ lower peak memory at no accuracy degradation for prefill in transformers. Compared to the best-performing prior methods for token-pruning, TokenGate gives up to $6.4\times$ faster prefill and $2\times$ lower peak memory. TokenGate natively extends both standard transformers (e.g., Qwen3) and hybrid-attention models (e.g., Qwen3.5) with simple lightweight adaptation comparable to standard parameter-efficient fine-tuning. We make our code available at: this https URL.
| Subjects: | Computation and Language (cs.CL); Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.26754 [cs.CL] |
| (or arXiv:2610.26754v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2610.26754 arXiv-issued DOI via DataCite |
Submission history
From: Liana Patel [view email]
[v1]
Mon, 19 Oct 2026 17:15:53 UTC (1,427 KB)
来源:HuggingFace Daily Papers · arxiv.org