SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.02559 · 2026

From Layers to Submodules: Rethinking Granularity in Replacement-Based LLM Compression

Giovanni Iacca, Elia Cunegatti, Marcus Vukojevic, Erik Nielsen

arXiv · PDF · Open in the Atlas

Code that ran

14 of 30 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; 4 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 9 failures of our instrument; 16 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/2606.02559.json · badge: /api/ran/2606.02559.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
eliacunegatti/SubFit community
Papers with Code archive
14 ran · 16 no recorded run
FunctionStatusWhere it lives
WindowedDataset Ran
ran on a synthesized input
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("22ade1d75a862541")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned dict. 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 torch.utils.data import Dataset

class DummyBaseDataset(Dataset):
    def __init__(self, num_samples=5, seq_len=256):
        self.num_samples = num_samples
        self.seq_len = seq_len
        
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        # Return a dict with input_ids, attention_mask, and assistant_mask
        input_ids = torch.randint(0, 1000, (self.seq_len,), dtype=torch.long)
        attention_mask = torch.ones(self.seq_len, dtype=torch.long)
        
        # Create assistant_mask with a span in the middle
        assistant_mask = torch.zeros(self.seq_len, dtype=torch.long)
        start_pos = self.seq_len // 3
        end_pos = 2 * self.seq_len // 3
        assistant_mask[start_pos:end_pos] = 1
        
        return {
            'input_ids': input_ids,
            'attention_mask': attention_mask,
            'assistant_mask': assistant_mask
        }

base_dataset = DummyBaseDataset(num_samples=5, seq_len=256)

INIT_ARGS = {
    'base': base_dataset,
    'window_size': 128,
    'windows_per_seq': 1,
    'window_selection_mode': 'assistant',
    'seed': 42,
    'emit_window_size_metadata': False
}

METHOD = '__getitem__'

ARGS = {
    'idx': 0
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_apply_attn_output_postprocess Ran
ran, honoured the contract we drafted
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("fdbf1092b0413252")
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
from torch import nn

torch.manual_seed(0)

# Create a minimal nn.Module layer
# The function takes a layer but doesn't appear to use it based on the body
class DummyLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Create the layer instance
layer = DummyLayer()

# Create a small output tensor (batch=2, dim=4)
out = torch.randn(2, 4)

ARGS = {
    "layer": layer,
    "out": out
}
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
_apply_mlp_output_postprocess Ran
ran, honoured the contract we drafted
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("fe56314f6b1d9c4a")
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 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
from torch import nn

torch.manual_seed(0)

# Create a simple MLP layer
layer = nn.Linear(4, 3)

# Create a small output tensor (batch_size=2, output_dim=3)
out = torch.randn(2, 3)

ARGS = {
    "layer": layer,
    "out": out,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
_assistant_token_weights Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("f15e611aa91a0505")
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 Tensor, ndim 1, dtype family float, shape (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

torch.manual_seed(0)

# Construct arguments for _assistant_token_weights
device = torch.device('cpu')

# Create a small assistant_flat tensor with boolean-like values
# This will be converted to bool in the function
assistant_flat = torch.tensor([1, 0, 1, 0], dtype=torch.float32)

# Number of tokens
n_tokens = 4

# Weights for assistant and non-assistant tokens
assistant_weight = 1.5
non_assistant_weight = 0.5

ARGS = {
    'assistant_flat': assistant_flat,
    'n_tokens': n_tokens,
    'assistant_weight': assistant_weight,
    'non_assistant_weight': non_assistant_weight,
    'device': device,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (4,) — shape (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
_collate_varlen_token_tensors Ran
ran, honoured the contract we drafted
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("6ba2213d95e03c2b")
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 tuple, ndim 3, dtype family int; 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 torch.nn.utils.rnn import pad_sequence

torch.manual_seed(0)

# Create a batch of variable-length token tensors
# The function expects a list of samples, where each sample can be:
# - a tensor of shape [L] or [1, L]
# - a dict with 'input_ids' key containing such a tensor

batch = [
    torch.tensor([101, 2054, 2003, 0], dtype=torch.long),  # shape [4]
    torch.tensor([[103, 2054, 0, 0, 0]]),  # shape [1, 5]
    torch.tensor([104, 105], dtype=torch.long),  # shape [2]
]

ARGS = {
    "batch": batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family int — 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
_flatten_token_features Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("12b2075f30cdf403")
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 Tensor, ndim 2, dtype family float, shape (6, 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

torch.manual_seed(0)

# The function takes a torch.Tensor and reshapes it
# It checks if dim == 3, but both branches do the same thing
# It reshapes to (-1, out.size(-1)), flattening all but the last dimension
# It calls .detach() and .reshape()

# Create a 3D tensor (batch=2, seq_len=3, features=4)
out = torch.randn(2, 3, 4)

ARGS = {
    "out": out
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (6, 4) — shape (6, 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
_flatten_token_features_masked Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("5534aee17b434704")
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 Tensor, ndim 2, dtype family float, shape (3, 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

torch.manual_seed(0)

# Create a 3D tensor with shape (batch=2, seq_len=3, hidden_dim=4)
out = torch.randn(2, 3, 4)

# Create an attention mask with shape (batch=2, seq_len=3)
# Values > 0 indicate tokens to keep
attn_mask = torch.tensor([[1, 1, 0], [1, 0, 0]], dtype=torch.float32)

ARGS = {
    "out": out,
    "attn_mask": attn_mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (3, 4) — shape (3, 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
_flatten_token_mask_masked Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("034932c0f705cff6")
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 Tensor, ndim 1, dtype family float, shape (12,) 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)

# token_mask: a tensor that will be reshaped and compared with > 0
# attn_mask: optional tensor for masking, also reshaped and compared

# Create a small token_mask tensor
token_mask = torch.tensor([
    [[1, 0, 1, 2],
     [0, 1, 0, 1]],
    [[2, 1, 0, 0],
     [1, 1, 1, 0]]
], dtype=torch.float32)

# Create a small attn_mask tensor with same total elements as token_mask when flattened
# token_mask flattens to 16 elements, so attn_mask should also flatten to 16
attn_mask = torch.tensor([
    [[1, 1, 0, 1],
     [1, 0, 1, 1]],
    [[1, 1, 1, 0],
     [0, 1, 1, 1]]
], dtype=torch.float32)

ARGS = {
    "token_mask": token_mask,
    "attn_mask": attn_mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (12,) — shape (12,) 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_attn_input_norm Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("937d791503e3bbdb")
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 LayerNorm. 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 torch import nn

torch.manual_seed(0)

# Test case 1: Layer with input_layernorm (Llama/Phi style)
class LlamaStyleLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.input_layernorm = nn.LayerNorm(4)
    
    def forward(self, x):
        return self.input_layernorm(x)

# Test case 2: Layer with self_attn_layer_norm (OPT style)
class OPTStyleLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.self_attn_layer_norm = nn.LayerNorm(4)
    
    def forward(self, x):
        return self.self_attn_layer_norm(x)

# Create a layer with input_layernorm for testing
layer_with_input_norm = LlamaStyleLayer()

ARGS = {
    'layer': layer_with_input_norm
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LayerNorm — a LayerNorm output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LayerNorm 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_mlp_input_norm Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("9026fa333bb5c5e1")
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 LayerNorm. 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 torch import nn

torch.manual_seed(0)

# Create a test layer with post_attention_layernorm attribute
class LlamaStyleBlock(nn.Module):
    def __init__(self):
        super().__init__()
        self.post_attention_layernorm = nn.LayerNorm(4)
        self.mlp = nn.Linear(4, 8)

# Create a test layer with input_layernorm attribute (Phi-style)
class PhiStyleBlock(nn.Module):
    def __init__(self):
        super().__init__()
        self.input_layernorm = nn.LayerNorm(4)
        self.mlp = nn.Linear(4, 8)

# Test case 1: Layer with post_attention_layernorm
layer_llama = LlamaStyleBlock()

ARGS = {
    "layer": layer_llama
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LayerNorm — a LayerNorm output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LayerNorm 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_mlp_output_linear Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("ea4ff3f930627b36")
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 Linear. 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 torch import nn

torch.manual_seed(0)

# Create a minimal MLP class with down_proj (Llama/Mistral style)
class MinimalMLP(nn.Module):
    def __init__(self):
        super().__init__()
        self.down_proj = nn.Linear(8, 4)

# Create a minimal layer with mlp attribute
class MinimalLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.mlp = MinimalMLP()

# Construct the layer argument
layer = MinimalLayer()

ARGS = {
    'layer': layer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
_paint Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("4a9a9cc790153aa0")
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 sys
import os

# The function _paint takes parameters: text, color, bold, dim
# Looking at the function body:
# - text: str - used in f-string formatting
# - color: str - used in f-string formatting, default ''
# - bold: bool - checked with if statement, default False
# - dim: bool - checked with if statement, default False

ARGS = {
    'text': 'Hello World',
    'color': '\x1b[31m',  # Red color code
    'bold': True,
    'dim': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
pad_collate_with_assistant Ran
ran, honoured the contract we drafted
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("9e74419c2ab89e49")
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 tuple, ndim 3, dtype family int; 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
import torch.nn.functional as F
from torch.nn.utils.rnn import pad_sequence

torch.manual_seed(0)

# Create a small batch of data matching the expected format
batch = [
    {
        'input_ids': torch.tensor([101, 2054, 2003, 0], dtype=torch.long),
        'attention_mask': torch.tensor([1, 1, 1, 0], dtype=torch.long),
        'assistant_mask': torch.tensor([0, 0, 1, 0], dtype=torch.long),
    },
    {
        'input_ids': torch.tensor([101, 2054], dtype=torch.long),
        'attention_mask': torch.tensor([1, 1], dtype=torch.long),
        'assistant_mask': torch.tensor([0, 1], dtype=torch.long),
    },
]

ARGS = {
    'batch': batch,
    'window_size': 1024,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family int — 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
replaceModel Ran
ran; our contract draft was wrong, not the code
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("36012fe19343da69")
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 MinimalLlama. 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 torch import nn

torch.manual_seed(0)

# Build a minimal Llama-like model structure
class MinimalLlamaLayer(nn.Module):
    def __init__(self, hidden_dim=4):
        super().__init__()
        self.self_attn = nn.Linear(hidden_dim, hidden_dim)
        self.mlp = nn.Linear(hidden_dim, hidden_dim)
    
    def forward(self, hidden_states):
        return hidden_states

class MinimalLlamaModel(nn.Module):
    def __init__(self, num_layers=3, hidden_dim=4):
        super().__init__()
        self.layers = nn.ModuleList([
            MinimalLlamaLayer(hidden_dim) for _ in range(num_layers)
        ])
    
    def forward(self, hidden_states):
        return hidden_states

class MinimalLlama(nn.Module):
    def __init__(self, num_layers=3, hidden_dim=4):
        super().__init__()
        self.model = MinimalLlamaModel(num_layers, hidden_dim)
    
    def forward(self, hidden_states):
        return self.model(hidden_states)

# Create model instance
model = MinimalLlama(num_layers=3, hidden_dim=4)

# Create replacement modules
class SimpleAttnReplacement(nn.Module):
    def __init__(self, hidden_dim=4):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, hidden_dim)
    
    def forward(self, hidden_states):
        return self.linear(hidden_states)

class SimpleMlpReplacement(nn.Module):
    def __init__(self, hidden_dim=4):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, hidden_dim)
    
    def forward(self, hidden_states, layer_idx=None):
        return self.linear(hidden_states)

# Create attention and MLP replacements
attn_repl = SimpleAttnReplacement(hidden_dim=4)
mlp_repl = SimpleMlpReplacement(hidden_dim=4)

# Create masks for 3 layers: replace layers 0 and 2 attention, layers 1 and 2 MLP
attnMask = [1, 0, 1]
mlpMask = [0, 1, 1]

ARGS = {
    "model": model,
    "attnMask": attnMask,
    "mlpMask": mlpMask,
    "attn_repl": attn_repl,
    "mlp_repl": mlp_repl
}
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 MinimalLlama — a MinimalLlama output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalLlama 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
ResidualDiagLowRankBypass Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("519cab6d0b778dd9")
How it ran

no invocation recorded.

_bar_color Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("daaa3c15c13a0768")
How it ran

no invocation recorded.

_fit_attention_diag_lowrank_streaming Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("0581539059360498")
How it ran

no invocation recorded.

_fit_mlp_diag_lowrank_shared_streaming Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("072be8cfc41ba44c")
How it ran

no invocation recorded.

_fmt_layers Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("4e21c9b35ed3b030")
How it ran

no invocation recorded.

_prepare_windowed_sentence_subset Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("d71432d675b8f997")
How it ran

no invocation recorded.

_print_legend Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("0e8a596b6afd9aad")
How it ran

no invocation recorded.

_select_attention_blocks_pass0 Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("98e873a5f9cd57b7")
How it ran

no invocation recorded.

_select_layers_and_build_masks Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("c3700710c99d77cd")
How it ran

no invocation recorded.

_select_layers_pass1 Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("ece209c7b9daf884")
How it ran

no invocation recorded.

_step Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("9b772050197ea3c4")
How it ran

no invocation recorded.

_warn Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("10440362d3aeac8f")
How it ran

no invocation recorded.

maskModel Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("da72bdf599b63aed")
How it ran

no invocation recorded.

set_seed Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("af9dc55c45798b01")
How it ran

no invocation recorded.

subfit Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("74d13b755b96be54")
How it ran

no invocation recorded.

unmaskModel Not yet run
unverified (harvested, no recorded run)
eliacunegatti/SubFit/subfit/distill.py
code served (permissive licence) · get_code("382d744050a412f3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 30 samples lifted from this paper's linked repositories, 30 carry a function identity and 0 do not. Of the 30 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 30 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.

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

Post-training compression of Large Language Models (LLMs) removes entire architectural components, either deleting them or replacing them with fitted modules. Existing replacement-based methods share two design constraints: full-layer granularity and contiguous selection. We argue that this is overly restrictive: in fact, redundancy in pretrained transformers is not confined to contiguous regions, nor does it evenly distribute between Attention and FeedForward outputs, implying that different strategies best approximate different submodule types and that removable components need not cluster within contiguous depth ranges. Based on this intuition, we introduce SUB-FIT (Submodule-level Fitted residual replacement), which compresses LLMs at the submodule level: Attention and FeedForward submodules are selected non-contiguously, and each receives its own lightweight fitted residual bypass. SUBFIT operates post-training and requires only calibration data. Across ten LLMs (five base, five instruction-tuned), five sparsity levels from 12.5% to 37.5%, and four replacementbased baselines, SUBFIT achieves the best aggregate perplexity-accuracy trade-off across the evaluated sparsity levels, with larger gains under aggressive compression. At 25% sparsity, it retains 84.6% of dense downstream accuracy and incurs 2.42× perplexity degradation, against 81.6% and 4.34× for the strongest baselines, while delivering measurable inference speedup and KV-cache savings. Code is available at https://github.com/eliacunegatti/SubFit.

For agents

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

get_harvested_code_for_paper("2606.02559")
get_code_for_paper("2606.02559")
have("2606.02559")

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

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

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

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

Connect an agent — have() is free.