paper-with-me

홈 › Papers

Exploiting Sparsity for Long Context Inference: Million Token Contexts on Commodity GPUs

2025-02-10 · Ryan Synk, Monte Hoover, John Kirchenbauer, Neel Jain, Alex Stein, Manli Shu, Josue Melendez Sanchez, Ramani Duraiswami, Tom Goldstein

There is growing demand for performing inference with hundreds of thousands of input tokens on trained transformer models. Inference at this extreme scale demands significant computational resources, hindering the application of transformers at long contexts on commodity (i.e not data center scale) hardware. To address the inference time costs associated with running self-attention based transformer language models on long contexts and enable their adoption on widely available hardware, we propose a tunable mechanism that reduces the cost of the forward pass by attending to only the most relevant tokens at every generation step using a top-k selection mechanism. We showcase the efficiency gains afforded by our method by performing inference on context windows up to 1M tokens using approximately 16GB of GPU RAM. Our experiments reveal that models are capable of handling the sparsity induced by the reduced number of keys and values. By attending to less than 2% of input tokens, we achieve over 95% of model performance on common benchmarks (RULER, AlpacaEval, and Open LLM Leaderboard).

📄 PDF Abstract BibTeX arXiv:2502.06766

Code (1)

ryansynk/topk-decoding 공식 구현 pytorch

Tasks

GPU

Similar Papers 제목 키워드 기반

Qwen2.5-1M Technical Report

2025-01-26 · An Yang, Bowen Yu, Chengyuan Li, Dayiheng Liu 외

We introduce Qwen2.5-1M, a series of models that extend the context length to 1 million tokens. Compared to the previous 128K version, the Qwen2.5-1M series have significantly enhanced long-context capabilities through l…

Scheduling

Adamas: Hadamard Sparse Attention for Efficient Long-Context Inference

2025-10-21 · Siyuan Yan, Guo-Qing Jiang, Yuchen Zhang, Xiaoxing Ma 외 arxiv

Large language models (LLMs) now support context windows of hundreds of thousands to millions of tokens, enabling applications such as long-document summarization, large-scale code synthesis, multi-document question answ…

Document SummarizationQuestion Answering

DeltaLLM: A Training-Free Framework Exploiting Temporal Sparsity for Efficient Edge LLM Inference

2025-07-25 · Jiawen Qi, Chang Gao, Zhaochun Ren, Qinyu Chen arxiv

Deploying Large Language Models (LLMs) on edge devices remains challenging due to their quadratically increasing computations with the sequence length. Existing studies for dynamic attention pruning are designed for hard…

Inference Time Context Sparsity: Illusion or Opportunity?

2026-05-22 · Sahil Joshi, Prithvi Dixit, Agniva Chowdhury, Anshumali Shrivastava 외 arxiv

Sparsity has long been a central theme in LLM efficiency, but its role in context processing remains unresolved. As LLM workloads shift toward longer contexts and agentic interactions, the compute and memory bottlenecks …

Mathematical Reasoning

S2TA: Exploiting Structured Sparsity for Energy-Efficient Mobile CNN Acceleration

2021-07-16 · Zhi-Gang Liu, Paul N. Whatmough, Yuhao Zhu, Matthew Mattina

Exploiting sparsity is a key technique in accelerating quantized convolutional neural network (CNN) inference on mobile devices. Prior sparse CNN accelerators largely exploit un-structured sparsity and achieve significan…