Papers › Learning how to Forget: Fine-tuning for Long-Context Sparse Attention

Learning how to Forget: Fine-tuning for Long-Context Sparse Attention

20 Aug 2026arXiv:2608.19920added by Syntology

Matthias Seeger, Zeyu Zhang, Vihang Patil, Konstantinos Benidis, Sebastian Schelter

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

A lot of prior work addressed key-value (KV) cache selection and compression by sparse attention to enable long-context inference for transformer language models without excessive hardware budgets. We provide a new method for fine-tuning models with sparse attention. It works for any KV cache policy, runs on a moderate hardware budget (e.g., a single Nvidia A100 GPU with 40 GB RAM), and allows the model to co-adapt with the policy, often outperforming models trained with exact attention (sequence parallelism). We also provide an efficient implementation of H2O sparse attention (the leading policy in our experiments) with dedicated scaled dot product attention kernel support. KeysAndValues (https://github.com/awslabs/keys_values), a new open source library for long-context inference and fine-tuning, provides easy-to-use and performant code for all methods discussed here.

PaperPDFCode 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="2608.19920")

Code

Syntology Ran 21 of 29 code samples harvested from 4 repositories linked to this paper; 8 have no recorded run. Of those that ran: 2 ran · honoured contract; 1 ran · fixture could not drive it; 18 ran with no contract checked.

By repository: found in paper text by Syntology: 29 samples from 4 repositories, 21 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

vllm-project/vllm found in paper text by Syntology report
NVIDIA/kvpress found in paper text by Syntology report
princeton-nlp/HELMET found in paper text by SyntologyMIT report
awslabs/keys_values found in paper text by Syntology report
NVIDIA-NeMo/RL found in paper text by Syntology report

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

29 samples harvested; 21 ran; 2 honoured the contract we drafted; 8 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.

2ran · honoured contract
1ran · fixture could not drive it
18ran
8unverified

Licence: 0 of the 29 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 4 repositories linked to this paper, official or community; each sample names its own and says which. “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.

KVzapConfig NVIDIA/kvpress/kvpress/presses/kvzap_press.py found in paper text by Syntology ran Apache-2.0 (permissive) · dce5ec8f0e700472 · report
KVzapModel NVIDIA/kvpress/kvpress/presses/kvzap_press.py found in paper text by Syntology ran Apache-2.0 (permissive) · 390f2223c94a9bdf · report
compute_n_kept NVIDIA/kvpress/kvpress/presses/kvzap_press.py found in paper text by Syntology ran · honoured contract fingerprinted Apache-2.0 (permissive) · c6741a473e4b5d88 · report
create_fp4_scale_tensor vllm-project/vllm/vllm/_custom_ops.py found in paper text by Syntology ran Apache-2.0 (permissive) · f3d574bb884ebadf · report
dora_forward awslabs/keys_values/keys_values/dora_utils.py found in paper text by Syntology ran Apache-2.0 (permissive) · 09a68fd43550658d · report
extract_keys_and_values NVIDIA/kvpress/kvpress/presses/kvzap_press.py found in paper text by Syntology ran · honoured contract Apache-2.0 (permissive) · c5bf1d342feb6b7e · report
format_model_inspection vllm-project/vllm/vllm/model_inspection.py found in paper text by Syntology ran Apache-2.0 (permissive) · a696f84b9b36ab84 · report
get_opd_full_config NVIDIA-NeMo/RL/nemo_rl/algorithms/opd.py found in paper text by Syntology ran Apache-2.0 (permissive) · 575f6d08d4b33f01 · report
get_served_model_name vllm-project/vllm/vllm/config/model.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 92fc6b49c51ae2c1 · report
is_non_colocated_teachers_enabled NVIDIA-NeMo/RL/nemo_rl/algorithms/opd.py found in paper text by Syntology ran Apache-2.0 (permissive) · 7238fb26e22641ce · report
is_opd_enabled NVIDIA-NeMo/RL/nemo_rl/algorithms/opd.py found in paper text by Syntology ran Apache-2.0 (permissive) · fd2a68b4b6107f05 · report
is_prefilling NVIDIA/kvpress/kvpress/presses/kvzap_press.py found in paper text by Syntology ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · c4d4026d335f3102 · report
maybe_convert_bool vllm-project/vllm/vllm/envs.py found in paper text by Syntology ran Apache-2.0 (permissive) · a39aa5bb3cefb4d0 · report
maybe_convert_int vllm-project/vllm/vllm/envs.py found in paper text by Syntology ran Apache-2.0 (permissive) · d11a43f137351612 · report
maybe_convert_scale_out_endpoints vllm-project/vllm/vllm/envs.py found in paper text by Syntology ran Apache-2.0 (permissive) · 4de83f83e0db58d9 · report
need_top_k_or_top_p_filtering NVIDIA-NeMo/RL/nemo_rl/algorithms/logits_sampling_utils.py found in paper text by Syntology ran Apache-2.0 (permissive) · 27af758c29b9670e · report
row_lengths awslabs/keys_values/keys_values/dora_utils.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · a8366e372555af6c · report
run vllm-project/vllm/vllm/collect_env.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · bd5675c0d72d5295 · report
run_and_parse_first_match vllm-project/vllm/vllm/collect_env.py found in paper text by Syntology ran Apache-2.0 (permissive) · 0b342669284f2be6 · report
run_and_read_all vllm-project/vllm/vllm/collect_env.py found in paper text by Syntology ran Apache-2.0 (permissive) · 5ae630bfc3821b6e · report
str_dtype_to_torch_dtype vllm-project/vllm/vllm/config/model.py found in paper text by Syntology ran Apache-2.0 (permissive) · 653b6f1bab40d0d2 · report
BasePress NVIDIA/kvpress/kvpress/presses/kvzap_press.py found in paper text by Syntology unverified Apache-2.0 (permissive) · a6d6671dfa24727c · report
KVzapPress NVIDIA/kvpress/kvpress/presses/kvzap_press.py found in paper text by Syntology unverified Apache-2.0 (permissive) · f5aa6fc2cc9d9435 · report
ScorerPress NVIDIA/kvpress/kvpress/presses/kvzap_press.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 29d5102db5552b1d · report
create_fp4_output_tensors vllm-project/vllm/vllm/_custom_ops.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 09c700f728396ed7 · report
get_graph_partition_signature_patched vllm-project/vllm/vllm/env_override.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 41329a8dffd43d3a · report
memory_plan_reuse_patched vllm-project/vllm/vllm/env_override.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 2842ff1da04c998d · report
should_partition_patched vllm-project/vllm/vllm/env_override.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 7793c3aaf91b92fd · report
vocab_parallel_embedding vllm-project/vllm/vllm/_custom_ops.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 93056c2a2adcef43 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2608.19920, was issued in August 2026, after that date, so the archive has no leaderboard rows for it.

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