SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.18403 · 2023

LoRAPrune: Structured Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning

arXiv · PDF · Open in the Atlas

Code that ran

2 of 5 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; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2305.18403.json · badge: /api/ran/2305.18403.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
aim-uofa/loraprune canonical (classifier label)
classifier basis not recorded on the link
2 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_sensitivity Ran
ran on a synthesized input
aim-uofa/loraprune/loraprune/utils.py
code served (permissive licence) · get_code("1caba93d370f1566")
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 (32,) 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)

# Build a minimal layer that has the attributes used in compute_sensitivity
class MinimalLoRALayer(nn.Module):
    def __init__(self, in_features, out_features, rank, has_state=False):
        super().__init__()
        self.in_features = in_features
        self.out_features = out_features
        self.scaling = 1.0
        
        # LoRA components
        self.lora_A = nn.Linear(in_features, rank, bias=False)
        self.lora_B = nn.Linear(rank, out_features, bias=False)
        
        # Base weight
        self.weight = nn.Parameter(torch.randn(out_features, in_features))
        
        # Optional quantization state
        if has_state:
            self.state = type('obj', (object,), {
                'SCB': torch.ones(out_features)
            })()
        
        # Initialize gradients for testing
        self.lora_A.weight.grad = torch.randn_like(self.lora_A.weight)
        self.lora_B.weight.grad = torch.randn_like(self.lora_B.weight)
        self.weight.grad = torch.randn_like(self.weight)

# Create layer with dimensions:
# - out_features = 64 (divisible by NUM_ATTENTION_HEADS=32, so head_dim=2)
# - in_features = 8
# - rank = 4
layer = MinimalLoRALayer(
    in_features=8,
    out_features=64,
    rank=4,
    has_state=False
)

ARGS = {
    'layer': layer,
    'is_attn': True,
    'prune_metric': 'lora',
    'transpose': False,
    'norm': True,
}
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 (32,) — shape (32,) 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
generate_prompt Ran
ran on a synthesized input
aim-uofa/loraprune/prune.py
code served (permissive licence) · get_code("2d8a5c5d1c76d421")
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

def generate_prompt(data_point):
    return f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{data_point['instruction']}\n\n### Response:\n{data_point['response']}"

data_point = {
    'instruction': 'What is the capital of France?',
    'response': 'Paris'
}

ARGS = {
    'data_point': data_point
}
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
get_peft_model Not yet run
unverified (harvested, no recorded run)
aim-uofa/loraprune/loraprune/peft_model.py
code served (permissive licence) · get_code("b40a44ce0414cf76")
How it ran

no invocation recorded.

init_sensitivity_dict Not yet run
unverified (harvested, no recorded run)
aim-uofa/loraprune/loraprune/utils.py
code served (permissive licence) · get_code("b68a84213c479165")
How it ran

no invocation recorded.

update_sensitivity_dict Not yet run
unverified (harvested, no recorded run)
aim-uofa/loraprune/loraprune/utils.py
code served (permissive licence) · get_code("6dddc1737d9db4cf")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 later) and 0 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
compute_sensitivity 1 other paper
1 later
2024.findings-acl.178 (2024 (year only))
LoRAPrune: Structured Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning
generate_prompt 1 other paper
1 later
2024.findings-acl.178 (2024 (year only))
LoRAPrune: Structured Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning
get_peft_model 1 other paper
1 later
2024.findings-acl.178 (2024 (year only))
LoRAPrune: Structured Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning
init_sensitivity_dict 1 other paper
1 later
2024.findings-acl.178 (2024 (year only))
LoRAPrune: Structured Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning
update_sensitivity_dict 1 other paper
1 later
2024.findings-acl.178 (2024 (year only))
LoRAPrune: Structured Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning

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

Repositories linked to this paper

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

Abstract

Large Language Models (LLMs), such as LLaMA and T5, have shown exceptional performance across various tasks through fine-tuning. Although low-rank adaption (LoRA) has emerged to cheaply fine-tune these LLMs on downstream tasks, their deployment is still hindered by the vast model scale and computational costs. Post-training model pruning offers a way to compress LLMs. However, the current pruning methods designed for LLMs are not compatible with LoRA. This is due to their utilization of unstructured pruning on LLMs, impeding the merging of LoRA weights, or their dependence on the gradients of pre-trained weights to guide pruning, which can impose significant memory overhead. To this end, we propose LoRAPrune, a new framework that delivers an accurate structured pruned model in a highly memory-efficient manner. Specifically, we first design a LoRA-guided pruning criterion, which uses the weights and gradients of LoRA, rather than the gradients of pre-trained weights for importance estimation. We subsequently integrate this criterion into an iterative pruning process, effectively removing redundant channels and heads. Extensive experimental results demonstrate the superior performance of our LoRAPrune over existing approaches on the LLaMA series models. At a 50\% compression rate, LoRAPrune demonstrates superior performance over LLM-Pruner, achieving a reduction in perplexity by 4.81 on WikiText2 and 3.46 on PTB, while also decreasing memory usage by 52.6%. Besides, LoRAPrune also matches semi-structural pruning across multiple LLMs, proving its wide applicability. The code is available at https://github.com/aim-uofa/LoRAPrune.

For agents

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

get_harvested_code_for_paper("2305.18403")
get_code_for_paper("2305.18403")
have("2305.18403")

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

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

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

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

Connect an agent — have() is free.