paper-with-me

홈 › Papers

Loki: Low-rank Keys for Efficient Sparse Attention

2024-06-04 · Prajwal Singhania, Siddharth Singh, Shwai He, Soheil Feizi, Abhinav Bhatele

Inference on large language models (LLMs) can be expensive in terms of the compute and memory costs involved, especially when long sequence lengths are used. In particular, the self-attention mechanism used in LLM inference contributes significantly to these costs, which has sparked an interest in approximating the self-attention computation to reduce such costs. In this work, we propose to approximate self-attention by focusing on the dimensionality of key vectors computed in the attention block. Our analysis reveals that key vectors lie in a significantly lower-dimensional space, consistently across several datasets and models. Exploiting this observation, we propose Loki, a novel sparse attention method that ranks and selects tokens in the KV-cache based on attention scores computed in low-dimensional space. Our evaluations show that Loki is able to speed up the attention computation due to reduced data movement (load/store) and compute costs while maintaining the efficacy of the models better than other popular approximation methods.

📄 PDF Abstract BibTeX arXiv:2406.02542

Code (1)

hpcgroup/loki 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

SPEED The monocular depth estimation (MDE) is the task of estimating depth from a single frame. This information is an essential knowledge in many computer vision tasks such as scene…

Similar Papers 제목 키워드 기반

Fathom: Per-Query Read Depth for Sparse Decoding over Offloaded KV Caches

2026-09-15 · Vivek Kalyanarangan hf

When agentic sessions run to a million tokens with many sessions resident at once, the KV cache and the index that ranks it live in host memory, and the scan that ranks all n keys for a top-k step becomes the traffic tha…

H1B-KV: Hybrid One-Bit Caches for Memory-Efficient Large Language Model Inference

2025-10-07 · Harshil Vejendla arxiv

Autoregressive decoding in large language models (LLMs) requires caching a growing list of past key-value (KV) pairs, making long-context inference a memory-bound problem. While recent methods have explored quantizing th…

Mathematical ReasoningCode Generation

ELSAA: Efficient Low-Rank and Sparse Attention Approximation for Training Transformers

2026-07-22 · Mahdi Heidari, Mohammad Mahdi Rahimi, Jaekyun Moon arxiv

The quadratic $N\times N$ attention score matrix remains a central obstacle to extending Transformers to longer input lengths. Existing efficient attention methods usually reduce this bottleneck by either imposing sparsi…

LOKI: A Comprehensive Synthetic Data Detection Benchmark using Large Multimodal Models

2024-10-13 · Junyan Ye, Baichuan Zhou, Zilong Huang, Junan Zhang 외

With the rapid development of AI-generated content, the future internet may be inundated with synthetic data, making the discrimination of authentic and credible multimodal data increasingly challenging. Synthetic data d…

Multiple-choice

ATP: Enabling Fast LLM Serving via Attention on Top Principal Keys

2024-03-01 · Yue Niu, Saurav Prakash, Salman Avestimehr

We propose a new attention mechanism with linear complexity, ATP, that fixates \textbf{A}ttention on \textbf{T}op \textbf{P}rincipal keys, rather than on each individual token. Particularly, ATP is driven by an important…