SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.10900 · 2026

CASK: Core-Aware Selective KV Compression for Reasoning Traces

Buseong Kim D'strict Korea, Heejun Gwon

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 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; 10 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2604.10900.json · badge: /api/ran/2604.10900.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
THUDM/LongBench canonical (classifier label)
classifier basis: census
13 ran · 1 no recorded run
FunctionStatusWhere it lives
add_embeddings Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
THUDM/LongBench/LongBench/retrieval/contriever/passage_retrieval.py
pointer only (licence: MIT); the stored copy get_code serves, from FenQQQ/Fusion-in-decoder, is pointer only (licence: NOASSERTION) · get_code("bc7a7a194c238080")
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 FenQQQ/Fusion-in-decoder, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

build_chat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
THUDM/LongBench/LongBench/pred.py
code served (permissive licence) · get_code("324506640e971548")
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

# Create mock tokenizers for different model types
class ChatGLM3Tokenizer:
    def build_chat_input(self, prompt):
        return f"chatglm3_processed: {prompt}"

class ChatGLMTokenizer:
    def build_prompt(self, prompt):
        return f"chatglm_processed: {prompt}"

class DefaultTokenizer:
    pass

# Test with chatglm3 model
tokenizer_chatglm3 = ChatGLM3Tokenizer()
prompt_text = "Hello, how are you?"
model_name_chatglm3 = "chatglm3-6b"

ARGS = {
    "tokenizer": tokenizer_chatglm3,
    "prompt": prompt_text,
    "model_name": model_name_chatglm3
}
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
build_chat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
THUDM/LongBench/LongBench/retrieval/pred.py
code served (permissive licence) · get_code("2e148fc130561394")
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

class MockTokenizer:
    def build_prompt(self, prompt):
        return f"[CHATGLM_PROMPT]{prompt}"

class MockConversation:
    def __init__(self):
        self.roles = ["Human", "Assistant"]
        self.messages = []
    
    def append_message(self, role, message):
        self.messages.append((role, message))
    
    def get_prompt(self):
        prompt = ""
        for role, message in self.messages:
            if message is not None:
                prompt += f"{role}: {message}\n"
            else:
                prompt += f"{role}:"
        return prompt

def mock_get_conversation_template(model_name):
    return MockConversation()

# Patch fastchat if needed
import sys
from types import ModuleType

fastchat_model = ModuleType('fastchat.model')
fastchat_model.get_conversation_template = mock_get_conversation_template

fastchat = ModuleType('fastchat')
fastchat.model = fastchat_model

sys.modules['fastchat'] = fastchat
sys.modules['fastchat.model'] = fastchat_model

torch.manual_seed(0)

tokenizer = MockTokenizer()
prompt = "What is the meaning of life?"
model_name = "chatglm-6b"

ARGS = {
    "tokenizer": tokenizer,
    "prompt": prompt,
    "model_name": model_name,
}
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
build_chat Ran
ran; our contract draft was wrong, not the code
THUDM/LongBench/LongBench/summ/compress.py
code served (permissive licence) · get_code("04b0e165da9a0405")
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

class MockTokenizer:
    def build_prompt(self, prompt):
        return f"[GLM2]{prompt}[/GLM2]"

class MockTokenizerLlama:
    pass

class MockTokenizerXgen:
    pass

class MockTokenizerInternLM:
    pass

# Test with different model names to ensure all branches work
tokenizer_glm2 = MockTokenizer()
tokenizer_llama = MockTokenizerLlama()
tokenizer_xgen = MockTokenizerXgen()
tokenizer_internlm = MockTokenizerInternLM()

prompt = "What is the meaning of life?"

model_name_glm2 = "glm2-6b"
model_name_llama = "Llama2-7b"
model_name_xgen = "xgen-7b"
model_name_internlm = "internlm-7b"

ARGS = {
    "tokenizer": tokenizer_glm2,
    "prompt": prompt,
    "model_name": model_name_glm2
}
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 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
THUDM/LongBench/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.

get_word_len Ran
ran, honoured the contract we drafted
THUDM/LongBench/LongBench/retrieval/splitter.py
code served (permissive licence) · get_code("03bffbf21c24cb7b")
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 re

def get_word_list(s1):
    regEx = re.compile('[\\W]')
    res = re.compile('([\\u4e00-\\u9fa5])')
    p1 = regEx.split(s1.lower())
    str1_list = []
    for str in p1:
        if res.split(str) == None:
            str1_list.append(str)
        else:
            ret = res.split(str)
            for ch in ret:
                str1_list.append(ch)
    list_word1 = [w for w in str1_list if len(w.strip()) > 0]
    return list_word1

def get_word_len(s1):
    return len(get_word_list(s1))

# Setup code to construct valid arguments
s1_input = "Hello World! This is a test string with 中文 characters."

ARGS = {
    "s1": s1_input
}
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 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_word_list Ran
ran; our contract draft was wrong, not the code
THUDM/LongBench/LongBench/retrieval/splitter.py
code served (permissive licence) · get_code("b80b1e9bf939544f")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 re

def get_word_list(s1):
    regEx = re.compile('[\\W]')
    res = re.compile('([\\u4e00-\\u9fa5])')
    p1 = regEx.split(s1.lower())
    str1_list = []
    for str in p1:
        if res.split(str) == None:
            str1_list.append(str)
        else:
            ret = res.split(str)
            for ch in ret:
                str1_list.append(ch)
    list_word1 = [w for w in str1_list if len(w.strip()) > 0]
    return list_word1


# Setup code
s1 = "Hello World! This is a test. 你好世界"

ARGS = {
    "s1": s1
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
THUDM/LongBench/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
THUDM/LongBench/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.

parse_args Ran
ran; our contract draft was wrong, not the code
THUDM/LongBench/LongBench/pred.py
code served (permissive licence) · get_code("d1a22a0b120644af")
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

def parse_args(args=None):
    parser = argparse.ArgumentParser()
    parser.add_argument('--model', type=str, default=None, choices=['llama2-7b-chat-4k', 'longchat-v1.5-7b-32k', 'xgen-7b-8k', 'internlm-7b-8k', 'chatglm2-6b', 'chatglm2-6b-32k', 'chatglm3-6b-32k', 'vicuna-v1.5-7b-16k'])
    parser.add_argument('--e', action='store_true', help='Evaluate on LongBench-E')
    return parser.parse_args(args)

ARGS = {
    'args': ['--model', 'llama2-7b-chat-4k', '--e']
}
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
parse_args Ran
ran; our contract draft was wrong, not the code
THUDM/LongBench/LongBench/retrieval/pred.py
code served (permissive licence) · get_code("58fbc2d5556574d2")
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

# The parse_args function takes optional 'args' parameter (a list of strings)
# and returns a Namespace object with three attributes: model, top_k, data

# Construct valid arguments for parse_args
ARGS = {
    'args': ['--model', 'chatglm2-6b', '--top_k', '5', '--data', 'B1000']
}
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
THUDM/LongBench/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
split_long_sentence Ran
ran; our contract draft was wrong, not the code
THUDM/LongBench/LongBench/retrieval/splitter.py
code served (permissive licence) · get_code("a4493a19d135ca1d")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 re

def get_word_list(s1):
    regEx = re.compile('[\\W]')
    res = re.compile('([\\u4e00-\\u9fa5])')
    p1 = regEx.split(s1.lower())
    str1_list = []
    for str in p1:
        if res.split(str) == None:
            str1_list.append(str)
        else:
            ret = res.split(str)
            for ch in ret:
                str1_list.append(ch)
    list_word1 = [w for w in str1_list if len(w.strip()) > 0]
    return list_word1

def get_word_len(s1):
    return len(get_word_list(s1))

regex_pattern = '([。?!;\\n.!?;]\\s*)'

def split_long_sentence(sentence, regex, chunk_size=200, filename='Unknown'):
    chunks = []
    sentences = re.split(regex, sentence)
    current_chunk = ''
    for s in sentences:
        if current_chunk and get_word_len(current_chunk) + get_word_len(s) <= chunk_size:
            current_chunk += ' ' if s == '' else s
        else:
            if current_chunk:
                chunks.append(current_chunk)
                current_len = get_word_len(current_chunk)
                if current_len > chunk_size * 1.5:
                    print(f'\n{filename}-{len(chunks) - 1} Chunk size: {current_len}')
            current_chunk = s
    if current_chunk:
        chunks.append(current_chunk)
    return chunks

ARGS = {
    'sentence': 'This is a test sentence. It contains multiple parts! And some Chinese characters like 中文。This part should be split correctly? Yes it should.',
    'regex': regex_pattern,
    'chunk_size': 50,
    'filename': 'test_doc'
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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_pred Not yet run
unverified (harvested, no recorded run)
THUDM/LongBench/LongBench/retrieval/pred.py
code served (permissive licence) · get_code("7de062709da87b4f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 1 the same month, 1 later) and 3 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
129 dated earlier, 3 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
27 dated earlier, 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
23 dated earlier, 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
14 dated earlier
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
add_embeddings 6 other papers
5 dated earlier, 1 the same month
2012.04584 (2020-12)
Distilling Knowledge from Reader to Retriever for Question Answering
2311.09805 (2023-11)
DocMath-Eval: Evaluating Math Reasoning Capabilities of LLMs in Understanding Long and Specialized Documents
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
and 3 more not named here
build_chat 4 other papers
4 dated earlier
2406.10774 (2024-06)
Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference
2410.13846 (2024-10)
LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptation
2025.emnlp-main.443 (2025 (year only))
A Training-Free Length Extrapolation Approach for LLMs: Greedy Attention Logit Interpolation
and 1 more not named here
build_chat 1 other paper
1 dated earlier
2404.04793 (2024-04)
SqueezeAttention: 2D Management of KV-Cache in LLM Inference via Layer-wise Optimal Budget
build_chat 1 other paper
1 dated earlier
2603.04759 (2026-03)
Stacked from One: Multi-Scale Self-Injection for Context Window Extension
get_word_len 1 other paper
1 dated earlier
2603.04759 (2026-03)
Stacked from One: Multi-Scale Self-Injection for Context Window Extension
get_word_list 1 other paper
1 dated earlier
2603.04759 (2026-03)
Stacked from One: Multi-Scale Self-Injection for Context Window Extension
parse_args 1 other paper
1 dated earlier
2025.emnlp-main.443 (2025 (year only))
A Training-Free Length Extrapolation Approach for LLMs: Greedy Attention Logit Interpolation

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-23.

Repositories linked to this paper

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

Abstract

In large language models performing long-form reasoning, the KV cache grows rapidly with decode length, creating bottlenecks in both memory and stability. Existing reasoning-oriented KV compression has largely remained within an evictioncentered perspective that estimates per-token importance more precisely in order to discard less important tokens. However, our preliminary analysis showed that scorer refinement alone struggles to substantially reorganize the actual keep-set and therefore may not be the primary lever governing reasoning behavior. Building on this observation, this paper redefines reasoning KV compression not as a simple ranking problem but as a behavior-preserving structured consolidation problem. CASK partitions the decode-time reasoning trace into a protected core that directly contributes to answer formation and state anchoring, and mergeable scratch with high redundancy. The core is protected, and selective consolidation is applied only to the scratch. To address the failure mode in prompt-heavy regimes where the prefix pre-empts the budget and deactivates decode-stage compression, CASK further introduces two-stage compression that applies eviction to the prefix and selective consolidation to the decode stage. On the H100 reasoning gate, CASK shows higher full-KV continuation fidelity than TriAttention at the same budget on both AIME24 and AIME25, with recurring cask@384 > triattention@512 crossings. In prompt-heavy replay, multi_news and vcsum emerge as replay-level decode-active same-budget witnesses, while qmsum and gov_report reveal the prefix_budget_exhausted boundary. Moreover, the actual-output layer is not summarized by a single lexical-overlap metric; instead, it is read separately through official task metric, lexical overlap, and semantic/reference similarity. The most defensible conclusion supported by current evidence is therefore that the key to reasoning KV compression lies not in more complex scorer engineering but in combining core preservation with selective scratch consolidation to lower the usable budget frontier. Existing reasoning-oriented KV compression has generally treated this as a problem of more precise importance ranking: assign scalar importance to each token, retain the top tokens, and discard the Preprint.

For agents

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

get_harvested_code_for_paper("2604.10900")
get_code_for_paper("2604.10900")
have("2604.10900")

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

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

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

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

Connect an agent — have() is free.