Papers › TidalDecode: Fast and Accurate LLM Decoding with Position Persistent Sparse Attention

TidalDecode: Fast and Accurate LLM Decoding with Position Persistent Sparse Attention

7 Oct 2024arXiv:2410.05076archive 2025-07-28

Lijie Yang, Zhihao Zhang, Zhuofu Chen, Zikun Li, Zhihao Jia

Large language models (LLMs) have driven significant advancements across diverse NLP tasks, with long-context models gaining prominence for handling extended inputs. However, the expanding key-value (KV) cache size required by Transformer architectures intensifies the memory constraints, particularly during the decoding phase, creating a significant bottleneck. Existing sparse attention mechanisms designed to address this bottleneck have two limitations: (1) they often fail to reliably identify the most relevant tokens for attention, and (2) they overlook the spatial coherence of token selection across consecutive Transformer layers, which can lead to performance degradation and substantial overhead in token selection. This paper introduces TidalDecode, a simple yet effective algorithm and system for fast and accurate LLM decoding through position persistent sparse attention. TidalDecode leverages the spatial coherence of tokens selected by existing sparse attention methods and introduces a few token selection layers that perform full attention to identify the tokens with the highest attention scores, while all other layers perform sparse attention with the pre-selected tokens. This design enables TidalDecode to substantially reduce the overhead of token selection for sparse attention without sacrificing the quality of the generated results. Evaluation on a diverse set of LLMs and tasks shows that TidalDecode closely matches the generative performance of full attention methods while reducing the LLM decoding latency by up to 2.1x.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.05076")

Code

Syntology Ran 11 of 13 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract; 4 ran · our draft was wrong; 1 ran · fixture could not drive it; 4 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

DerrickYLJ/TidalDecode officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 11 ran; 1 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · violated contract
4ran · our draft was wrong
1ran · fixture could not drive it
4ran
2unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from DerrickYLJ/TidalDecode. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

repeat_kv DerrickYLJ/TidalDecode/src/models/llama_tidaldecoding.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 30d7eec482ebf6b1 · report
apply_rotary_pos_emb DerrickYLJ/TidalDecode/src/models/llama_tidaldecoding.py official repository ran · our draft was wrong Apache-2.0 (permissive) · bac65c3dafaec040 · report
build_chat DerrickYLJ/TidalDecode/experiments/LongBench/pred.py official repository ran Apache-2.0 (permissive) · 1707cb62894075a9 · report
count_score DerrickYLJ/TidalDecode/experiments/LongBench/metrics.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · b349b79d9cc2934b · report
download_url DerrickYLJ/TidalDecode/src/utils.py official repository ran Apache-2.0 (permissive) · d196dde52e17237c · report
load_jsonl DerrickYLJ/TidalDecode/src/utils.py official repository ran Apache-2.0 (permissive) · a8b4a0de765a348c · report
normalize_answer DerrickYLJ/TidalDecode/experiments/LongBench/metrics.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · e7e75981cb464788 · report
normalize_zh_answer DerrickYLJ/TidalDecode/experiments/LongBench/metrics.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 8c5c581f9264c810 · report
post_process DerrickYLJ/TidalDecode/experiments/LongBench/pred.py official repository ran · violated contract fingerprinted Apache-2.0 (permissive) · 4489113b536ca6eb · report
repeat_kv DerrickYLJ/TidalDecode/src/models/yarn_tidaldecoding.py official repository ran Apache-2.0 (permissive) · 53b2e52873fb8342 · report
rotate_half DerrickYLJ/TidalDecode/src/models/llama_tidaldecoding.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · b99eea6376d1e212 · report
parse_args DerrickYLJ/TidalDecode/experiments/LongBench/pred.py official repository unverified Apache-2.0 (permissive) · dc041ea24b9ceb27 · report
rmsnorm_func DerrickYLJ/TidalDecode/src/models/yarn_tidaldecoding.py official repository unverified Apache-2.0 (permissive) · ab6fba34dd3815d7 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSETSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections