QUOKA: Query-Oriented KV Selection For Efficient LLM Prefill

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Jones, Dalton, Park, Junyoung, Morse, Matthew, Lee, Mingu, Lott, Chris, Langston, Harper
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914315788877824
author Jones, Dalton
Park, Junyoung
Morse, Matthew
Lee, Mingu
Lott, Chris
Langston, Harper
author_facet Jones, Dalton
Park, Junyoung
Morse, Matthew
Lee, Mingu
Lott, Chris
Langston, Harper
contents We present QUOKA: Query-oriented KV selection for efficient attention, a training-free and hardware agnostic sparse attention algorithm for accelerating transformer inference under chunked prefill. While many queries focus on a smaller group of keys in the attention operator, we observe that queries with low cosine similarity with respect to the mean query interact more strongly with more keys and have the greatest contribution to final attention logits. By prioritizing these low cosine similarity queries, the behavior of full attention during the prefill stage can be closely approximated. QUOKA leverages this observation, accelerating attention by (1) first retaining a small set of representative queries and (2) then subselectin the keys most aligned with those queries. Through experiments on Needle-In-A-Haystack, LongBench, RULER, and Math500, we show that, while realizing a 3x reduction in time-to-first-token, 5x speedup in attention on Nvidia GPUs and up to nearly a 7x speedup on Intel Xeon CPUs, QUOKA achieves near-baseline accuracy, utilizing 88% fewer key-value pairs per attention evaluation.
format Preprint
id arxiv_https___arxiv_org_abs_2602_08722
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle QUOKA: Query-Oriented KV Selection For Efficient LLM Prefill
Jones, Dalton
Park, Junyoung
Morse, Matthew
Lee, Mingu
Lott, Chris
Langston, Harper
Machine Learning
Artificial Intelligence
We present QUOKA: Query-oriented KV selection for efficient attention, a training-free and hardware agnostic sparse attention algorithm for accelerating transformer inference under chunked prefill. While many queries focus on a smaller group of keys in the attention operator, we observe that queries with low cosine similarity with respect to the mean query interact more strongly with more keys and have the greatest contribution to final attention logits. By prioritizing these low cosine similarity queries, the behavior of full attention during the prefill stage can be closely approximated. QUOKA leverages this observation, accelerating attention by (1) first retaining a small set of representative queries and (2) then subselectin the keys most aligned with those queries. Through experiments on Needle-In-A-Haystack, LongBench, RULER, and Math500, we show that, while realizing a 3x reduction in time-to-first-token, 5x speedup in attention on Nvidia GPUs and up to nearly a 7x speedup on Intel Xeon CPUs, QUOKA achieves near-baseline accuracy, utilizing 88% fewer key-value pairs per attention evaluation.
title QUOKA: Query-Oriented KV Selection For Efficient LLM Prefill
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2602.08722