SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.19920 · 2026

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

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

arXiv · PDF · Open in the Atlas

Code that ran

21 of 29 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 5 violated it and 2 have no contract verdict; 11 failures of our instrument; 8 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/2608.19920.json · badge: /api/ran/2608.19920.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
vllm-project/vllm canonical (classifier label)
classifier basis: census
10 ran · 5 no recorded run
NVIDIA-NeMo/RL canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
awslabs/keys_values canonical (classifier label)
classifier basis: census
2 ran · 0 no recorded run
NVIDIA/kvpress community
Papers with Code archive
5 ran · 3 no recorded run
FunctionStatusWhere it lives
KVzapConfig Ran
ran on a synthesized input · constructed an object; no result was computed
NVIDIA/kvpress/kvpress/presses/kvzap_press.py
code served (permissive licence) · get_code("dce5ec8f0e700472")
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 an instance of its own class, KVzapConfig: the run constructed the object and did not call it, so no result was computed. 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
from transformers import PretrainedConfig

torch.manual_seed(0)

class KVzapConfig(PretrainedConfig):
    model_type = 'kvzap'
    has_no_defaults_at_init = True

    def __init__(self, *, input_dim: int, output_dim: int, n_modules: int, hidden_dim=None, **kwargs):
        super().__init__(**kwargs)
        self.input_dim = input_dim
        self.output_dim = output_dim
        self.hidden_dim = hidden_dim
        self.n_modules = n_modules

ARGS = {
    'input_dim': 8,
    'output_dim': 16,
    'n_modules': 4,
    'hidden_dim': 32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KVzapConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a KVzapConfig 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
KVzapModel Ran
ran on a synthesized input · constructed an object; no result was computed
NVIDIA/kvpress/kvpress/presses/kvzap_press.py
code served (permissive licence) · get_code("390f2223c94a9bdf")
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 an instance of its own class, KVzapModel: the run constructed the object and did not call it, so no result was computed. 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
from transformers import PretrainedConfig, PreTrainedModel

torch.manual_seed(0)

class KVzapConfig(PretrainedConfig):
    model_type = 'kvzap'
    has_no_defaults_at_init = True

    def __init__(self, *, input_dim: int, output_dim: int, n_modules: int, hidden_dim=None, **kwargs):
        super().__init__(**kwargs)
        self.input_dim = input_dim
        self.output_dim = output_dim
        self.hidden_dim = hidden_dim
        self.n_modules = n_modules

class KVzapModel(PreTrainedModel):
    config_class = KVzapConfig

    def __init__(self, config):
        super().__init__(config)
        self.all_tied_weights_keys = {}
        if config.hidden_dim is None:
            self.layers = nn.ModuleList([nn.Linear(config.input_dim, config.output_dim) for _ in range(config.n_modules)])
        else:
            self.layers = nn.ModuleList((nn.Sequential(nn.Linear(config.input_dim, config.hidden_dim), nn.GELU(), nn.Linear(config.hidden_dim, config.output_dim)) for _ in range(config.n_modules)))

    def forward(self, x):
        return torch.stack([module(x[:, i, :]) for i, module in enumerate(self.layers)], dim=1)

# Create config
config = KVzapConfig(
    input_dim=4,
    output_dim=3,
    n_modules=2,
    hidden_dim=None
)

ARGS = {
    'config': config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KVzapModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a KVzapModel 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
compute_n_kept Ran
ran, honoured the contract we drafted
NVIDIA/kvpress/kvpress/presses/kvzap_press.py
code served (permissive licence) · get_code("c6741a473e4b5d88")
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

# Construct valid arguments for compute_n_kept function
ARGS = {
    "k_len": 100,
    "compression_ratio": 0.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
create_fp4_scale_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vllm-project/vllm/vllm/_custom_ops.py
code served (permissive licence) · get_code("f3d574bb884ebadf")
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 (256, 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

# Mock the vllm.utils.math_utils.round_up function
class MockMathUtils:
    @staticmethod
    def round_up(value, multiple):
        return ((value + multiple - 1) // multiple) * multiple

# Patch the import
import sys
from types import ModuleType

vllm = ModuleType('vllm')
vllm.utils = ModuleType('vllm.utils')
vllm.utils.math_utils = ModuleType('vllm.utils.math_utils')
vllm.utils.math_utils.round_up = MockMathUtils.round_up
sys.modules['vllm'] = vllm
sys.modules['vllm.utils'] = vllm.utils
sys.modules['vllm.utils.math_utils'] = vllm.utils.math_utils

torch.manual_seed(0)

ARGS = {
    "m": 256,
    "n": 64,
    "device": torch.device("cpu"),
    "is_sf_swizzled_layout": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, vllm — 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 (256, 1) — shape (256, 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
dora_forward Ran
ran; our contract draft was wrong, not the code
awslabs/keys_values/keys_values/dora_utils.py
code served (permissive licence) · get_code("09a68fd43550658d")
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, 3) 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 linear layer
# The function uses: linear.weight.data and linear.bias
linear = nn.Linear(in_features=4, out_features=3, bias=True)

# Create input tensor: batch_size=2, feature_dim=4
x = torch.randn(2, 4)

# Create lora_ab tensor with same shape as linear.weight
# linear.weight has shape (out_features, in_features) = (3, 4)
lora_ab = torch.randn(3, 4)

# Create scales parameter with shape matching output dimension
# The function does: (scales / weight_norm).unsqueeze(-1)
# weight_norm has shape (3,) after row_lengths
# So scales should have shape (3,)
scales = nn.Parameter(torch.ones(3))

# Small epsilon value
eps = 1e-8

ARGS = {
    "x": x,
    "linear": linear,
    "lora_ab": lora_ab,
    "scales": scales,
    "eps": eps
}
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, 3) — shape (2, 3) 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
extract_keys_and_values Ran
ran, honoured the contract we drafted
NVIDIA/kvpress/kvpress/presses/kvzap_press.py
code served (permissive licence) · get_code("c5bf1d342feb6b7e")
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 tuple, ndim 4, 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 torch
from transformers import Cache, QuantizedCache

torch.manual_seed(0)

# Create a mock cache layer for unquantized cache
class MockCacheLayer:
    def __init__(self, keys, values):
        self.keys = keys
        self.values = values

# Create a mock unquantized cache
class MockCache(Cache):
    def __init__(self, layers):
        self.layers = layers
    
    def to(self, *args, **kwargs):
        return self
    
    def get_seq_length(self, layer_idx=None):
        return 2

# Create a mock quantized cache layer
class MockQuantizedCacheLayer:
    def __init__(self, keys, values):
        self._quantized_keys = keys
        self._quantized_values = values
    
    def _dequantize(self, tensor):
        # Simple dequantization: just return the tensor as is
        return tensor.float()

# Create a mock quantized cache
class MockQuantizedCache(QuantizedCache):
    def __init__(self, layers):
        self.layers = layers
    
    def to(self, *args, **kwargs):
        return self
    
    def get_seq_length(self, layer_idx=None):
        return 2

# Build test data
batch_size = 2
seq_length = 3
head_dim = 4

# For unquantized cache
keys_tensor = torch.randn(batch_size, seq_length, head_dim)
values_tensor = torch.randn(batch_size, seq_length, head_dim)
mock_layer = MockCacheLayer(keys_tensor, values_tensor)
unquantized_cache = MockCache([mock_layer])

# For quantized cache
quantized_keys = torch.randint(0, 256, (batch_size, seq_length, head_dim), dtype=torch.uint8)
quantized_values = torch.randint(0, 256, (batch_size, seq_length, head_dim), dtype=torch.uint8)
quantized_layer = MockQuantizedCacheLayer(quantized_keys, quantized_values)
quantized_cache = MockQuantizedCache([quantized_layer])

ARGS = {
    "cache": unquantized_cache,
    "layer_idx": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple 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
format_model_inspection Ran
ran; our contract draft was wrong, not the code
vllm-project/vllm/vllm/model_inspection.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Ravi-VK/SSR, is pointer only (licence: NONE) · get_code("a696f84b9b36ab84")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Ravi-VK/SSR, 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.

get_opd_full_config Ran
ran; our contract draft was wrong, not the code
NVIDIA-NeMo/RL/nemo_rl/algorithms/opd.py
code served (permissive licence) · get_code("575f6d08d4b33f01")
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 OnPolicyDistillationFullConfig. 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
from typing import Any, Optional

torch.manual_seed(0)

# Build a minimal master_config object that satisfies the function's needs
class MasterConfig:
    """Minimal config object with on_policy_distillation field."""
    def __init__(self, on_policy_distillation: dict[str, Any]):
        self.on_policy_distillation = on_policy_distillation

# Test case 1: OPD enabled with full config enabled
master_config_enabled = MasterConfig({
    'enabled': True,
    'full': {
        'enabled': True,
        'teacher_payload': 'hidden_states',
        'divergence': 'reverse_kl',
        'payload_dtype': 'bfloat16',
        'chunk_size': 128,
        'teacher_lm_head_lifecycle': 'offload',
        'validate_decomposition': False,
    }
})

# Test case 2: OPD enabled but full config disabled
master_config_full_disabled = MasterConfig({
    'enabled': True,
    'full': {
        'enabled': False,
        'teacher_payload': 'logits',
        'divergence': 'reverse_kl',
    }
})

# Test case 3: OPD disabled (no full config)
master_config_opd_disabled = MasterConfig({
    'enabled': False,
    'full': {
        'enabled': True,
    }
})

# Test case 4: Plain dict master_config
master_config_dict = {
    'enabled': True,
    'full': {
        'enabled': True,
        'payload_dtype': 'float32',
        'chunk_size': 64,
    }
}

# Test case 5: Object without on_policy_distillation field
class EmptyConfig:
    pass

master_config_empty = EmptyConfig()

# Test case 6: Plain dict with no on_policy_distillation field
master_config_dict_empty = {'some_other_field': 'value'}

ARGS = {
    'master_config': master_config_enabled,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OnPolicyDistillationFullConfig — a OnPolicyDistillationFullConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OnPolicyDistillationFullConfig 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
get_served_model_name Ran
ran; our contract draft was wrong, not the code
vllm-project/vllm/vllm/config/model.py
code served (permissive licence) · get_code("92fc6b49c51ae2c1")
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

torch.manual_seed(0)

# Test case 1: served_model_name is None (empty), should return model
model_1 = "gpt-3.5-turbo"
served_model_name_1 = None

# Test case 2: served_model_name is empty list, should return model
model_2 = "gpt-4"
served_model_name_2 = []

# Test case 3: served_model_name is non-empty string, should return served_model_name
model_3 = "claude"
served_model_name_3 = "custom-model-v1"

# Test case 4: served_model_name is non-empty list, should return first element
model_4 = "llama"
served_model_name_4 = ["served-v1", "served-v2", "served-v3"]

# Use test case 3 (non-empty string) as the primary test
ARGS = {
    "model": "gpt-3.5-turbo",
    "served_model_name": "custom-served-model"
}
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
is_non_colocated_teachers_enabled Ran
ran, violated the contract we drafted
NVIDIA-NeMo/RL/nemo_rl/algorithms/opd.py
code served (permissive licence) · get_code("7238fb26e22641ce")
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 bool, ndim 0, dtype family float, 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
from pydantic import BaseModel, Field

class OnPolicyDistillationConfig(BaseModel):
    enabled: bool = False
    non_colocated_teachers: dict = Field(default_factory=dict)

class MasterConfig(BaseModel):
    on_policy_distillation: OnPolicyDistillationConfig = Field(default_factory=OnPolicyDistillationConfig)

# Test case 1: OPD enabled with non-colocated teachers enabled
config_opd_enabled = MasterConfig(
    on_policy_distillation=OnPolicyDistillationConfig(
        enabled=True,
        non_colocated_teachers={'enabled': True}
    )
)

ARGS = {
    'master_config': config_opd_enabled
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, 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
is_opd_enabled Ran
ran, violated the contract we drafted
NVIDIA-NeMo/RL/nemo_rl/algorithms/opd.py
code served (permissive licence) · get_code("fd2a68b4b6107f05")
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 bool, ndim 0, dtype family float, 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.

from pydantic import BaseModel, Field
from typing import Any, Optional

class OnPolicyDistillationConfig(BaseModel):
    enabled: bool = False
    learning_rate: float = 0.001

class MasterConfig(BaseModel):
    on_policy_distillation: Optional[OnPolicyDistillationConfig] = None
    other_field: str = "test"

# Test case 1: MasterConfig with on_policy_distillation enabled
config_with_opd_enabled = MasterConfig(
    on_policy_distillation=OnPolicyDistillationConfig(enabled=True)
)

# Test case 2: MasterConfig with on_policy_distillation disabled
config_with_opd_disabled = MasterConfig(
    on_policy_distillation=OnPolicyDistillationConfig(enabled=False)
)

# Test case 3: MasterConfig without on_policy_distillation
config_without_opd = MasterConfig()

# Test case 4: Plain dict with enabled=True
dict_config_enabled = {
    'on_policy_distillation': {'enabled': True, 'learning_rate': 0.01}
}

# Test case 5: Plain dict with enabled=False
dict_config_disabled = {
    'on_policy_distillation': {'enabled': False}
}

# Test case 6: Plain dict without on_policy_distillation key
dict_config_no_opd = {'other_field': 'value'}

ARGS = {
    'master_config': config_with_opd_enabled
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, 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
is_prefilling Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
NVIDIA/kvpress/kvpress/presses/kvzap_press.py
code served (permissive licence) · get_code("c4d4026d335f3102")
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 bool, ndim 0, dtype family float, 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

torch.manual_seed(0)

# Construct arguments for is_prefilling function
# The function expects:
# - cache_position: torch.Tensor (accessed with [-1] and +1 operation, compared to q_len)
# - q_len: int (compared to cache_position[-1] + 1)

# Case 1: During prefilling (cache_position[-1] + 1 == q_len)
cache_position = torch.tensor([0, 1, 2, 3], dtype=torch.long)
q_len = 4

ARGS = {
    "cache_position": cache_position,
    "q_len": q_len
}
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 bool, ndim 0, dtype family float, 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
maybe_convert_bool Ran
ran, violated the contract we drafted
vllm-project/vllm/vllm/envs.py
code served (permissive licence) · get_code("a39aa5bb3cefb4d0")
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 bool, ndim 0, dtype family float, 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

torch.manual_seed(0)

ARGS = {
    "value": "1"
}
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 bool, ndim 0, dtype family float, 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
maybe_convert_int Ran
ran, honoured the contract we drafted
vllm-project/vllm/vllm/envs.py
code served (permissive licence) · get_code("d11a43f137351612")
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

ARGS = {
    "value": "42"
}
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 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
maybe_convert_scale_out_endpoints Ran
ran, violated the contract we drafted
vllm-project/vllm/vllm/envs.py
code served (permissive licence) · get_code("4de83f83e0db58d9")
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 bool, ndim 0, dtype family float, 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.

# The function maybe_convert_scale_out_endpoints takes a single parameter: value
# which is a str | None

# Looking at the function body:
# - It checks if value is None
# - It calls value.strip() (so value must be a string with strip method)
# - It checks if normalized is in ('0', '1')
# - It calls maybe_convert_bool(normalized)

# We need to provide test cases for this function

# Test case 1: None value
value_none = None

# Test case 2: Valid '0' value
value_zero = '0'

# Test case 3: Valid '1' value
value_one = '1'

# Test case 4: Value with whitespace that normalizes to valid
value_with_space = '  1  '

ARGS = {
    'value': '1'
}
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 bool, ndim 0, dtype family float, 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
need_top_k_or_top_p_filtering Ran
ran, violated the contract we drafted
NVIDIA-NeMo/RL/nemo_rl/algorithms/logits_sampling_utils.py
code served (permissive licence) · get_code("27af758c29b9670e")
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 bool, ndim 0, dtype family float, 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.

from dataclasses import dataclass
from typing import Optional

@dataclass
class TrainingSamplingParams:
    """Training-specific sampling parameters to match generation parameters.

    Used to ensure consistency between training and inference by applying the same sampling strategy during
    logprob computation. Not directly using vLLM's SamplingParams class to avoid dependency on vLLM in this env.

    Attributes:
        top_k: Top-k filtering parameter (None or -1 to disable)
        top_p: Top-p filtering parameter (1.0 to disable)
        temperature: Temperature for scaling logits (default: 1.0)
    """
    top_k: int | None = None
    top_p: float = 1.0
    temperature: float = 1.0

def _need_top_k_filtering(top_k: int | None) -> bool:
    """Check if top-k filtering is needed."""
    return top_k is not None and top_k > 0

def _need_top_p_filtering(top_p: float | None) -> bool:
    """Check if top-p filtering is needed."""
    return top_p is not None and top_p != 1.0

def need_top_k_or_top_p_filtering(sampling_params: Optional[TrainingSamplingParams]) -> bool:
    """Check if top-k or top-p filtering is needed."""
    if sampling_params is None:
        return False
    top_k = sampling_params.top_k
    top_p = sampling_params.top_p
    return _need_top_k_filtering(top_k) or _need_top_p_filtering(top_p)


# Test case 1: None sampling_params
params_none = None

# Test case 2: sampling_params with default values (no filtering needed)
params_default = TrainingSamplingParams()

# Test case 3: sampling_params with top_k filtering
params_with_top_k = TrainingSamplingParams(top_k=10, top_p=1.0, temperature=1.0)

# Test case 4: sampling_params with top_p filtering
params_with_top_p = TrainingSamplingParams(top_k=None, top_p=0.9, temperature=1.0)

# Test case 5: sampling_params with both top_k and top_p filtering
params_with_both = TrainingSamplingParams(top_k=50, top_p=0.95, temperature=0.8)

# Test case 6: sampling_params with top_k=None explicitly
params_top_k_none = TrainingSamplingParams(top_k=None, top_p=1.0, temperature=1.0)

# Test case 7: sampling_params with top_k=-1 (disabled)
params_top_k_disabled = TrainingSamplingParams(top_k=-1, top_p=1.0, temperature=1.0)

ARGS = {
    "sampling_params": params_with_top_k
}
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 bool, ndim 0, dtype family float, 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
row_lengths Ran
ran; our contract draft was wrong, not the code
awslabs/keys_values/keys_values/dora_utils.py
code served (permissive licence) · get_code("a8366e372555af6c")
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 1, dtype family float, shape (2,) 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
from torch.linalg import vector_norm

torch.manual_seed(0)

# Create a small tensor with batch size 2 and dimension 4
x = torch.randn(2, 4, dtype=torch.float32)

# Small positive epsilon value
eps = 1e-6

ARGS = {
    "x": x,
    "eps": eps,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
run Ran
ran; our contract draft was wrong, not the code
vllm-project/vllm/vllm/collect_env.py
code served (permissive licence) · get_code("bd5675c0d72d5295")
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 tuple, 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 locale
import subprocess
import sys

def get_platform():
    if sys.platform.startswith('linux'):
        return 'linux'
    elif sys.platform.startswith('win32'):
        return 'win32'
    elif sys.platform.startswith('cygwin'):
        return 'cygwin'
    elif sys.platform.startswith('darwin'):
        return 'darwin'
    else:
        return sys.platform

def run(command):
    """Return (return-code, stdout, stderr)."""
    shell = True if type(command) is str else False
    try:
        p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=shell)
        raw_output, raw_err = p.communicate()
        rc = p.returncode
        if get_platform() == 'win32':
            enc = 'oem'
        else:
            enc = locale.getpreferredencoding()
        output = raw_output.decode(enc)
        if command == 'nvidia-smi topo -m':
            output = output.rstrip()
        else:
            output = output.strip()
        err = raw_err.decode(enc)
        return (rc, output, err.strip())
    except FileNotFoundError:
        cmd_str = command if isinstance(command, str) else command[0]
        return (127, '', f'Command not found: {cmd_str}')


# Test with a simple string command
ARGS = {
    'command': 'echo hello'
}
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 tuple, ndim 1, dtype family float — a tuple 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
run_and_parse_first_match Ran
ran; our contract draft was wrong, not the code
vllm-project/vllm/vllm/collect_env.py
code served (permissive licence) · get_code("0b342669284f2be6")
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 regex as re

def mock_run_lambda(command):
    """Mock run_lambda that returns (return_code, output, error)"""
    # Simulate successful command execution with output containing a match
    if command == "test_command":
        return (0, "version: 1.2.3", None)
    else:
        return (1, "", None)

ARGS = {
    "run_lambda": mock_run_lambda,
    "command": "test_command",
    "regex": r"version: ([\d.]+)"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — 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
run_and_read_all Ran
ran; our contract draft was wrong, not the code
vllm-project/vllm/vllm/collect_env.py
code served (permissive licence) · get_code("5ae630bfc3821b6e")
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

def create_run_lambda():
    """Create a mock run_lambda function that returns (rc, stdout, stderr)"""
    def mock_run_lambda(command):
        # Simulate successful command execution
        if "error" in command:
            return 1, "", "error occurred"
        else:
            return 0, "command output", ""
    return mock_run_lambda

ARGS = {
    "run_lambda": create_run_lambda(),
    "command": "echo 'test command'"
}
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
str_dtype_to_torch_dtype Ran
ran; our contract draft was wrong, not the code
vllm-project/vllm/vllm/config/model.py
code served (permissive licence) · get_code("653b6f1bab40d0d2")
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 dtype. 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

torch.manual_seed(0)

# The function takes a single parameter 'type' which is a string
# It looks up the string in a dictionary mapping to torch dtypes
# Valid strings are: 'half', 'float16', 'float', 'float32', 'bfloat16'

ARGS = {
    'type': 'float32'
}
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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype 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
BasePress Not yet run
unverified (harvested, no recorded run)
NVIDIA/kvpress/kvpress/presses/kvzap_press.py
code served (permissive licence) · get_code("a6d6671dfa24727c")
How it ran

no invocation recorded.

KVzapPress Not yet run
unverified (harvested, no recorded run)
NVIDIA/kvpress/kvpress/presses/kvzap_press.py
code served (permissive licence) · get_code("f5aa6fc2cc9d9435")
How it ran

no invocation recorded.

ScorerPress Not yet run
unverified (harvested, no recorded run)
NVIDIA/kvpress/kvpress/presses/kvzap_press.py
code served (permissive licence) · get_code("29d5102db5552b1d")
How it ran

no invocation recorded.

create_fp4_output_tensors Not yet run
unverified (harvested, no recorded run)
vllm-project/vllm/vllm/_custom_ops.py
code served (permissive licence) · get_code("09c700f728396ed7")
How it ran

no invocation recorded.

get_graph_partition_signature_patched Not yet run
unverified (harvested, no recorded run)
vllm-project/vllm/vllm/env_override.py
code served (permissive licence) · get_code("41329a8dffd43d3a")
How it ran

no invocation recorded.

memory_plan_reuse_patched Not yet run
unverified (harvested, no recorded run)
vllm-project/vllm/vllm/env_override.py
code served (permissive licence) · get_code("2842ff1da04c998d")
How it ran

no invocation recorded.

should_partition_patched Not yet run
unverified (harvested, no recorded run)
vllm-project/vllm/vllm/env_override.py
code served (permissive licence) · get_code("7793c3aaf91b92fd")
How it ran

no invocation recorded.

vocab_parallel_embedding Not yet run
unverified (harvested, no recorded run)
vllm-project/vllm/vllm/_custom_ops.py
code served (permissive licence) · get_code("93056c2a2adcef43")
How it ran

no invocation recorded.

Also present in other papers' code

Of 29 samples lifted from this paper's linked repositories, 29 carry a function identity and 0 do not. Of the 29 distinct functions with an identity, 19 are also present in other papers whose code we hold (19 with at least one paper dated earlier, 1 the same month, 0 later) and 10 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
run_and_parse_first_match 14 other papers
14 dated earlier
2109.04003 (2021-09)
Improving Deep Metric Learning by Divide and Conquer
2109.08267 (2021-09)
CompilerGym: Robust, Performant Compiler Optimization Environments for AI Research
2202.04053 (2022-02)
DALL-Eval: Probing the Reasoning Skills and Social Biases of Text-to-Image Generation Models
and 11 more not named here
run_and_read_all 14 other papers
14 dated earlier
2109.04003 (2021-09)
Improving Deep Metric Learning by Divide and Conquer
2109.08267 (2021-09)
CompilerGym: Robust, Performant Compiler Optimization Environments for AI Research
2202.04053 (2022-02)
DALL-Eval: Probing the Reasoning Skills and Social Biases of Text-to-Image Generation Models
and 11 more not named here
format_model_inspection 4 other papers
3 dated earlier, 1 the same month
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
2601.14327 (2026-01)
Yuan3.0 Ultra: A Trillion-Parameter Enterprise-Oriented MoE LLM
2602.07223 (2026-02)
Vegas: Self-Speculative Decoding with Verification-Guided Sparse Attention
and 1 more not named here
extract_keys_and_values
brick of this paper's assembly: helper
3 other papers
3 dated earlier · 2 only as an assembly brick
2407.11550 (2024-07)
Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference
2502.03805 (2025-02)
CriticalKV: Optimizing KV Cache Eviction from an Output Perturbation Perspective
2605.23200 (2026-05)
Adaptive Mass-Segmented KV Compression for Long-Form Reasoning
BasePress
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2407.11550 (2024-07)
Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference
2502.03805 (2025-02)
CriticalKV: Optimizing KV Cache Eviction from an Output Perturbation Perspective
ScorerPress
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2407.11550 (2024-07)
Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference
2502.03805 (2025-02)
CriticalKV: Optimizing KV Cache Eviction from an Output Perturbation Perspective
compute_n_kept
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 2 only as an assembly brick
2407.11550 (2024-07)
Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference
2502.03805 (2025-02)
CriticalKV: Optimizing KV Cache Eviction from an Output Perturbation Perspective
get_graph_partition_signature_patched 2 other papers
2 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
2606.00516 (2026-06)
Threshold-Based Exclusive Batching for LLM Inference
get_served_model_name 2 other papers
2 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
2606.00516 (2026-06)
Threshold-Based Exclusive Batching for LLM Inference
is_prefilling
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 2 only as an assembly brick
2407.11550 (2024-07)
Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference
2502.03805 (2025-02)
CriticalKV: Optimizing KV Cache Eviction from an Output Perturbation Perspective
memory_plan_reuse_patched 2 other papers
2 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
2606.00516 (2026-06)
Threshold-Based Exclusive Batching for LLM Inference
run 2 other papers
2 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
2606.00516 (2026-06)
Threshold-Based Exclusive Batching for LLM Inference
should_partition_patched 2 other papers
2 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
2606.00516 (2026-06)
Threshold-Based Exclusive Batching for LLM Inference
create_fp4_output_tensors 1 other paper
1 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
create_fp4_scale_tensor 1 other paper
1 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
maybe_convert_bool 1 other paper
1 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
maybe_convert_int 1 other paper
1 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
str_dtype_to_torch_dtype 1 other paper
1 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention
vocab_parallel_embedding 1 other paper
1 dated earlier
2309.06180 (2023-09)
Efficient Memory Management for Large Language Model Serving with PagedAttention

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

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, a new open source library for long-context inference and fine-tuning, provides easy-to-use and performant code for all methods discussed here.

For agents

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

get_harvested_code_for_paper("2608.19920")
get_code_for_paper("2608.19920")
have("2608.19920")

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

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

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

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

Connect an agent — have() is free.