Researchers from Stanford and UC Berkeley Introduce TokenGate: Token-Gated Attention Makes Long-Context Prefill Up to 11.3x Faster

Impact 8 MarkTechPost

Summary

  • Researchers from Stanford and UC Berkeley introduced TokenGate, a module adding learned token pruning to pretrained LLMs for faster long-context prefill.
  • TokenGate combines a small MLP gate and LoRA to selectively process important tokens, achieving 1.4x to 11.3x faster time-to-first-token with no accuracy loss.
  • Peak prefill memory drops by 1.5x to 3.4x, and the method supports contexts up to 128k tokens while operating on models like Qwen3 and hybrid Qwen3.5.
  • The approach uses a Mixture-of-Experts router trick to make top-K selection differentiable, enabling end-to-end training with plain next-token loss.
  • Code, checkpoints, and implementation details are made publicly available under an Apache-2.0 license on GitHub.

Why it matters

TokenGate significantly accelerates long-context LLM prefill and reduces memory usage without sacrificing accuracy, offering a practical drop-in optimization for transformer and hybrid-attention architectures.

Who should care