SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.13171 · 2023

ComPEFT: Compression for Communicating Parameter Efficient Updates via Sparsification and Quantization

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2311.13171.json · badge: /api/ran/2311.13171.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
prateeky2806/compeft canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
add_ptm_to_tv Ran
ran; our contract draft was wrong, not the code
prateeky2806/compeft/src/utils.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from wzj1718/DiM3, is pointer only (licence: NONE) · get_code("860bf587f2fbf4e0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from wzj1718/DiM3, 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.

browse_all_files_in_a_directory Ran
ran; our contract draft was wrong, not the code
prateeky2806/compeft/src/merge_utils.py
code served (permissive licence) · get_code("76cdb08bb3df4d7f")
How it ran

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

import os
import tempfile
import shutil

# Create a temporary directory with some test files
temp_dir = tempfile.mkdtemp()

# Create test files with different extensions
with open(os.path.join(temp_dir, "file1.txt"), "w") as f:
    f.write("test")
with open(os.path.join(temp_dir, "file2.txt"), "w") as f:
    f.write("test")
with open(os.path.join(temp_dir, "file3.py"), "w") as f:
    f.write("test")
with open(os.path.join(temp_dir, "file4.log"), "w") as f:
    f.write("test")

ARGS = {
    "directory": temp_dir,
    "file_extension": ".txt"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_number Ran
ran, honoured the contract we drafted
prateeky2806/compeft/src/merge_utils.py
code served (permissive licence) · get_code("0e04f05ef437bf17")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# The function extract_number takes a filename string and:
# 1. Splits by '_' and takes the last element
# 2. Splits by '.' and takes the first element
# 3. Converts to int
# Example: "file_name_123.txt" -> "123" -> 123

ARGS = {
    "filename": "data_file_456.txt"
}
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
extract_unnatural_instructions_data Ran
ran; our contract draft was wrong, not the code
prateeky2806/compeft/src/qlora/utils.py
code served (permissive licence) · get_code("f82430123a91cf21")
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 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

torch.manual_seed(0)

ARGS = {
    'examples': {
        'instances': [
            [
                {
                    'instruction_with_input': 'What is 2+2?',
                    'output': '4'
                },
                {
                    'instruction_with_input': 'What is 3+3?',
                    'output': '6'
                }
            ],
            [
                {
                    'instruction_with_input': 'What is 5+5?',
                    'output': '10'
                }
            ]
        ],
        'reformulations': [
            [
                {
                    'instruction_with_input': 'Calculate 2+2',
                    'output': '4'
                }
            ],
            None
        ]
    },
    'extract_reformulations': True
}
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 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: none by the harness; any seed is in the setup block
state_dict_to_vector Ran
ran, honoured the contract we drafted
prateeky2806/compeft/src/utils.py
code served (permissive licence) · get_code("dd5b558a499d4685")
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 (25,) 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
from collections import OrderedDict
import copy

torch.manual_seed(0)

# Create a simple state dict with various tensor shapes
state_dict = OrderedDict([
    ('layer1.weight', torch.randn(3, 4)),
    ('layer1.bias', torch.randn(3)),
    ('layer2.weight', torch.randn(5, 2)),
    ('layer2.bias', torch.randn(5)),
])

ARGS = {
    'state_dict': state_dict,
    'remove_keys': ['layer2.bias']
}
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 (25,) — shape (25,) 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
vector_to_state_dict Ran
ran; our contract draft was wrong, not the code
prateeky2806/compeft/src/utils.py
code served (permissive licence) · get_code("1b1a016089577bfe")
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 OrderedDict. 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 collections import OrderedDict
import copy

torch.manual_seed(0)

# Create a small model to generate a state_dict
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear2(self.linear1(x))

model = SimpleModel()
state_dict = model.state_dict()

# Create a vector from the state_dict
# Count total parameters
total_params = sum(p.numel() for p in state_dict.values())
vector = torch.randn(total_params)

# Create remove_keys list (empty or with some keys)
remove_keys = []

ARGS = {
    'vector': vector,
    'state_dict': state_dict,
    'remove_keys': remove_keys
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
vector_to_state_dict Ran
ran; our contract draft was wrong, not the code
prateeky2806/compeft/src/qlora/ties_utils.py
code served (permissive licence) · get_code("771baa0aee5d6f6b")
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 OrderedDict. 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 collections import OrderedDict
import copy

torch.manual_seed(0)

# Create a simple neural network to generate a state_dict
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Instantiate the network and get its state_dict
model = SimpleNet()
state_dict = model.state_dict()

# Create a vector from the state_dict parameters
# We need to flatten all parameters into a single vector
params = []
for key in sorted(state_dict.keys()):
    params.append(state_dict[key].flatten())
vector = torch.cat(params)

# Define the ARGS dictionary
ARGS = {
    "vector": vector,
    "state_dict": state_dict,
    "remove_keys": ["linear2.weight"]
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
walk_through_all_files_in_a_directory Ran
ran; our contract draft was wrong, not the code
prateeky2806/compeft/src/merge_utils.py
code served (permissive licence) · get_code("57a08fe41768dc0b")
How it ran

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

import os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create some test files with different extensions
os.makedirs(os.path.join(temp_dir, "subdir1"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir2"), exist_ok=True)

# Create test files
open(os.path.join(temp_dir, "file1.txt"), "w").close()
open(os.path.join(temp_dir, "file2.py"), "w").close()
open(os.path.join(temp_dir, "subdir1", "file3.txt"), "w").close()
open(os.path.join(temp_dir, "subdir1", "file4.log"), "w").close()
open(os.path.join(temp_dir, "subdir2", "file5.txt"), "w").close()

ARGS = {
    "directory": temp_dir,
    "file_extension": ".txt"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_metrics Not yet run
unverified (harvested, no recorded run)
prateeky2806/compeft/src/bert_eval.py
code served (permissive licence) · get_code("6746178a5f7cbcc1")
How it ran

no invocation recorded.

preprocess_function Not yet run
unverified (harvested, no recorded run)
prateeky2806/compeft/src/bert_eval.py
code served (permissive licence) · get_code("ed1d520d4fd927b3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 8 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
extract_unnatural_instructions_data 7 other papers
4 dated earlier, 3 later
2305.14314 (2023-05)
QLORA: Efficient Finetuning of Quantized LLMs
2305.16300 (2023-05)
Random-Access Infinite Context Length for Transformers
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 4 more not named here
add_ptm_to_tv 2 other papers
2 later
2405.17461 (2024-05)
EMR-MERGING: Tuning-Free High-Performance Model Merging
2605.12960 (2026-05)
DiM 3 : Bridging Multilingual and Multimodal Models via Direction-and Magnitude-Aware Merging

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

Parameter-efficient fine-tuning (PEFT) techniques make it possible to efficiently adapt a language model to create "expert" models that specialize to new tasks or domains. Recent techniques in model merging and compositional generalization leverage these expert models by dynamically composing modules to improve zero/few-shot generalization. Despite the efficiency of PEFT methods, the size of expert models can make it onerous to retrieve expert models per query over high-latency networks like the Internet or serve multiple experts on a single GPU. To address these issues, we present ComPEFT, a novel method for compressing fine-tuning residuals (task vectors) of PEFT based models. ComPEFT employs sparsification and ternary quantization to reduce the size of the PEFT module without performing any additional retraining while preserving or enhancing model performance. In extensive evaluation across T5, T0, and LLaMA-based models with 200M - 65B parameters, ComPEFT achieves compression ratios of 8x - 50x. In particular, we show that ComPEFT improves with scale - stronger models exhibit higher compressibility and better performance. For example, we show that ComPEFT applied to LLaMA outperforms QLoRA by 4.16% on MMLU with a storage size reduction of up to 26x. In addition, we show that the compressed experts produced by ComPEFT maintain few-shot compositional generalization capabilities, facilitate efficient communication and computation, and exhibit enhanced performance when merged. Lastly, we provide an analysis of different method components, compare it with other PEFT methods, and test ComPEFT's efficacy for compressing the residual of full-finetuning. Our code is available at https://github.com/prateeky2806/compeft.

For agents

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

get_harvested_code_for_paper("2311.13171")
get_code_for_paper("2311.13171")
have("2311.13171")

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

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

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

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

Connect an agent — have() is free.