SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.07092 · 2024

Post-Training Sparse Attention with Double Sparsity

arXiv · PDF · Open in the Atlas

Code that ran

15 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 12 failures of our instrument; 7 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2408.07092.json · badge: /api/ran/2408.07092.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
andy-yang-1/doublesparse canonical (classifier label)
classifier basis: census
15 ran · 7 no recorded run
FunctionStatusWhere it lives
build_chat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
andy-yang-1/doublesparse/LongBench/pred.py
code served (permissive licence) · get_code("c9d682400f2b2384")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

# Stand-in tokenizer for chatglm3
class ChatGLM3Tokenizer:
    def build_chat_input(self, prompt):
        return f"[chatglm3_formatted] {prompt}"

# Stand-in tokenizer for chatglm
class ChatGLMTokenizer:
    def build_prompt(self, prompt):
        return f"[chatglm_formatted] {prompt}"

# Stand-in tokenizer for other models
class SimpleTokenizer:
    pass

# Create instances
tokenizer_chatglm3 = ChatGLM3Tokenizer()
tokenizer_chatglm = ChatGLMTokenizer()
tokenizer_simple = SimpleTokenizer()

# Test cases for different model names
prompt_text = "Hello, how are you?"

ARGS = {
    "tokenizer": tokenizer_chatglm3,
    "prompt": prompt_text,
    "model_name": "chatglm3-6b"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
fastchat, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
count_score Ran
ran, honoured the contract we drafted
andy-yang-1/doublesparse/LongBench/metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from borealisai/radar-decoding, is pointer only (licence: LGPL-3.0) · get_code("b349b79d9cc2934b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from borealisai/radar-decoding, and LGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

dynamically_quantize_per_channel Ran
ran; our contract draft was wrong, not the code
andy-yang-1/doublesparse/models/quantize.py
pointer only (licence: MIT); the stored copy get_code serves, from amarka8/SOCKET, is pointer only (licence: NONE) · get_code("55ec8fea60e1d7e7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amarka8/SOCKET, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_multiple Ran
ran, honoured the contract we drafted
andy-yang-1/doublesparse/models/model.py
code served (permissive licence) · get_code("aba86ffbed27ba65")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

def find_multiple(n: int, k: int) -> int:
    if n % k == 0:
        return n
    return n + k - n % k

# The function takes two integers and returns an integer
# It finds the next multiple of k that is >= n
ARGS = {
    "n": 17,
    "k": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_group_qparams Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
andy-yang-1/doublesparse/models/quantize.py
pointer only (licence: MIT); the stored copy get_code serves, from amarka8/SOCKET, is pointer only (licence: NONE) · get_code("dbabfb89a4b530ac")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amarka8/SOCKET, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

logits_to_probs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
andy-yang-1/doublesparse/models/generate.py
pointer only (licence: MIT); the stored copy get_code serves, from amarka8/SOCKET, is pointer only (licence: NONE) · get_code("fd0cfe048b12c6f2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amarka8/SOCKET, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

multinomial_sample_one_no_sync Ran
ran; our contract draft was wrong, not the code
andy-yang-1/doublesparse/models/generate.py
code served (permissive licence) · get_code("968f7cbd56cd3206")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes probs_sort as input and performs operations on it:
# - Creates a tensor of same shape with exponential distribution
# - Divides probs_sort by q element-wise
# - Takes argmax along dim=-1 with keepdim=True
# - Converts to int dtype

# probs_sort should be a probability tensor with shape (batch, vocab_size)
# Using batch=2, vocab_size=4 for small tensors with distinct dimensions

probs_sort = torch.rand(2, 4)  # Small batch of probability distributions

ARGS = {
    "probs_sort": probs_sort
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (2, 1) — shape (2, 1) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize_answer Ran
ran; our contract draft was wrong, not the code
andy-yang-1/doublesparse/LongBench/metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from borealisai/radar-decoding, is pointer only (licence: LGPL-3.0) · get_code("e7e75981cb464788")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from borealisai/radar-decoding, and LGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

normalize_zh_answer Ran
ran; our contract draft was wrong, not the code
andy-yang-1/doublesparse/LongBench/metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from borealisai/radar-decoding, is pointer only (licence: LGPL-3.0) · get_code("8c5c581f9264c810")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from borealisai/radar-decoding, and LGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pack_scales_and_zeros Ran
ran; our contract draft was wrong, not the code
andy-yang-1/doublesparse/models/quantize.py
pointer only (licence: MIT); the stored copy get_code serves, from amarka8/SOCKET, is pointer only (licence: NONE) · get_code("146cdcef0c195fd7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amarka8/SOCKET, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse_args Ran
ran; our contract draft was wrong, not the code
andy-yang-1/doublesparse/LongBench/pred.py
code served (permissive licence) · get_code("4b9ff9b601e07731")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Namespace. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse

ARGS = {
    'args': [
        '--task', 'qasper',
        '--model', 'llama2-7b-chat-4k',
        '--e',
        '--token_budget', '4096',
        '--chunk_size', '512',
        '--group_factor', '2',
        '--heavy_const', '256',
        '--q_bits', '2',
        '--channel', 'q',
        '--quest',
        '--ds',
        '--h2o',
        '--streaming',
        '--sparq',
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
post_process Ran
ran, violated the contract we drafted
andy-yang-1/doublesparse/LongBench/pred.py
code served (permissive licence) · get_code("4489113b536ca6eb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function post_process takes two parameters:
# 1. response: a string that gets processed based on model_name
# 2. model_name: a string used to determine which processing branch to take

# Test case 1: xgen model
response_xgen = "Some response text\nAssistant: This is the assistant response"
model_name_xgen = "xgen-7b"

# Test case 2: internlm model
response_internlm = "Some response<eoa>This should be removed"
model_name_internlm = "internlm-chat"

# Test case 3: other model (no special processing)
response_other = "Just a regular response"
model_name_other = "gpt2"

# We'll use the xgen case as the primary test
ARGS = {
    "response": "Some response text\nAssistant: This is the assistant response",
    "model_name": "xgen-7b"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
precompute_freqs_cis Ran
ran; our contract draft was wrong, not the code
andy-yang-1/doublesparse/models/model.py
pointer only (licence: MIT); the stored copy get_code serves, from amarka8/SOCKET, is pointer only (licence: NONE) · get_code("26cf476e99a51b14")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amarka8/SOCKET, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pseudo_quantize Ran
ran; our contract draft was wrong, not the code
andy-yang-1/doublesparse/AIME/modify_llama.py
code served (permissive licence) · get_code("6c58a3a856b83402")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small tensor with shape (batch=2, features=4)
# The function uses min/max operations along dim=-1, so we need at least 2D
tensor = torch.randn(2, 4)

# q_bit is an integer representing quantization bits
q_bit = 8

ARGS = {
    "tensor": tensor,
    "q_bit": q_bit,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
andy-yang-1/doublesparse/models/generate.py
pointer only (licence: MIT); the stored copy get_code serves, from amarka8/SOCKET, is pointer only (licence: NONE) · get_code("b0856105fbfe6f4f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amarka8/SOCKET, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

apply_rotary_emb Not yet run
unverified (harvested, no recorded run)
andy-yang-1/doublesparse/models/model.py
code served (permissive licence) · get_code("1102ffb719fa5cde")
How it ran

no invocation recorded.

convert_h2o Not yet run
unverified (harvested, no recorded run)
andy-yang-1/doublesparse/LongBench/h2o_llama.py
code served (permissive licence) · get_code("1bc3eae58a3d0167")
How it ran

no invocation recorded.

convert_kvcache_llama_heavy_recent Not yet run
unverified (harvested, no recorded run)
andy-yang-1/doublesparse/AIME/modify_llama.py
code served (permissive licence) · get_code("423b6b0a2a7a06fb")
How it ran

no invocation recorded.

convert_kvcache_qwen2_heavy_recent Not yet run
unverified (harvested, no recorded run)
andy-yang-1/doublesparse/AIME/modify_qwen2.py
code served (permissive licence) · get_code("18842172af05afe4")
How it ran

no invocation recorded.

convert_llama_channel_config Not yet run
unverified (harvested, no recorded run)
andy-yang-1/doublesparse/AIME/modify_llama.py
code served (permissive licence) · get_code("39e907bab1c70346")
How it ran

no invocation recorded.

convert_qwen2_channel_config Not yet run
unverified (harvested, no recorded run)
andy-yang-1/doublesparse/AIME/modify_qwen2.py
code served (permissive licence) · get_code("1ced27a7a4ec46b8")
How it ran

no invocation recorded.

reset_h2o Not yet run
unverified (harvested, no recorded run)
andy-yang-1/doublesparse/LongBench/h2o_llama.py
code served (permissive licence) · get_code("0166832f476ba7ea")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 13 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 4 the same month, 13 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
normalize_answer 133 other papers
89 dated earlier, 43 later, 1 undated · 1 only as an assembly brick
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 130 more not named here
normalize_zh_answer 28 other papers
13 dated earlier, 13 later, 1 same year, order not determinable, 1 undated
2311.04934 (2023-11)
Prompt Cache: Modular Attention Reuse for Low-Latency Inference
2311.09198 (2023-11)
Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional Training
2024.findings-emnlp.230 (2024 (year only))
CLongEval: A Chinese Benchmark for Evaluating Long-Context Large Language Models
and 25 more not named here
count_score 24 other papers
11 dated earlier, 12 later, 1 undated
2311.04934 (2023-11)
Prompt Cache: Modular Attention Reuse for Low-Latency Inference
2311.09198 (2023-11)
Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional Training
2402.02750 (2024-02)
KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cache
and 21 more not named here
post_process 14 other papers
5 dated earlier, 9 later
2311.09198 (2023-11)
Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional Training
2402.02750 (2024-02)
KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cache
2404.14469 (2024-04)
SnapKV: LLM Knows What You are Looking for Before Generation
and 11 more not named here
find_multiple 9 other papers
5 dated earlier, 1 the same month, 3 later
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
2310.06434 (2023-10)
Whispering LLaMA: A Cross-Modal Generative Error Correction Framework for Speech Recognition
2310.08278 (2023-10)
Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting
and 6 more not named here
multinomial_sample_one_no_sync 8 other papers
5 dated earlier, 1 the same month, 2 later
2212.04356 (2022-12)
Robust Speech Recognition via Large-Scale Weak Supervision
2306.05284 (2023-06)
Simple and Controllable Music Generation
2308.02560 (2023-08)
From Discrete Tokens to High-Fidelity Audio Using Multi-Band Diffusion
and 5 more not named here
logits_to_probs 5 other papers
2 dated earlier, 1 the same month, 2 later
2402.04396 (2024-02)
QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks
2406.11235 (2024-06)
QTIP: Quantization with Trellises and Incoherence Processing
2408.14690 (2024-08)
Training-Free Activation Sparsity in Large Language Models
and 2 more not named here
dynamically_quantize_per_channel 4 other papers
1 dated earlier, 1 the same month, 2 later
2308.02560 (2023-08)
From Discrete Tokens to High-Fidelity Audio Using Multi-Band Diffusion
2408.11049 (2024-08)
MagicDec: Breaking the Latency-Throughput Tradeoff for Long Context Generation with Speculative Decoding
2511.00351 (2025-11)
Reject Only Critical Tokens: Pivot-Aware Speculative Decoding
and 1 more not named here
apply_rotary_emb 3 other papers
3 later
2501.06589 (2025-01)
Ladder-Residual: Parallelism-Aware Architecture for Accelerating Large Model Inference with Communication Overlapping
2505.02707 (2025-05)
Voila: Voice-Language Foundation Models for Real-Time Autonomous Interaction and Voice Role-Play
2602.06283 (2026-02)
SOCKET: SOft Collision Kernel EsTimator for Sparse Attention
get_group_qparams 3 other papers
1 dated earlier, 2 later
2308.02560 (2023-08)
From Discrete Tokens to High-Fidelity Audio Using Multi-Band Diffusion
2511.00351 (2025-11)
Reject Only Critical Tokens: Pivot-Aware Speculative Decoding
2602.06283 (2026-02)
SOCKET: SOft Collision Kernel EsTimator for Sparse Attention
pack_scales_and_zeros 3 other papers
1 dated earlier, 2 later
2308.02560 (2023-08)
From Discrete Tokens to High-Fidelity Audio Using Multi-Band Diffusion
2511.00351 (2025-11)
Reject Only Critical Tokens: Pivot-Aware Speculative Decoding
2602.06283 (2026-02)
SOCKET: SOft Collision Kernel EsTimator for Sparse Attention
precompute_freqs_cis 1 other paper
1 later
2602.06283 (2026-02)
SOCKET: SOft Collision Kernel EsTimator for Sparse Attention
sample 1 other paper
1 later
2602.06283 (2026-02)
SOCKET: SOft Collision Kernel EsTimator for Sparse Attention

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The inference process for large language models is slow and memory-intensive, with one of the most critical bottlenecks being excessive Key-Value (KV) cache accesses. This paper introduces "Double Sparsity," a novel post-training sparse attention technique designed to alleviate this bottleneck by reducing KV cache access. Double Sparsity combines token sparsity, which focuses on utilizing only the important tokens for computing self-attention, with channel sparsity, an approach that uses important feature channels for identifying important tokens. Our key insight is that the pattern of channel sparsity is relatively static, allowing us to use offline calibration to make it efficient at runtime, thereby enabling accurate and efficient identification of important tokens. Moreover, this method can be combined with offloading to achieve significant memory usage reduction. Experimental results demonstrate that Double Sparsity can achieve $\frac{1}{16}$ token and channel sparsity with minimal impact on accuracy across various tasks, including wiki-2 perplexity, key-value retrieval, and long context benchmarks with models including Llama-2-7B, Llama-2-70B, and Mixtral-8x7B. It brings up to a 14.1$\times$ acceleration in attention operations and a 1.9$\times$ improvement in end-to-end inference on GPUs. With offloading, it achieves a decoding speed acceleration of 16.3$\times$ compared to state-of-the-art solutions at a sequence length of 256K. Our code is publicly available at https://github.com/andy-yang-1/DoubleSparse.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2408.07092")
get_code_for_paper("2408.07092")
have("2408.07092")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2408.07092.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2408.07092.svg)](https://syntology.ai/paper/2408.07092)

Connect an agent — have() is free.