SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.01376 · 2026

3BASiL: An Algorithmic Framework for Sparse plus Low-Rank Compression of LLMs

Rahul Mazumder, Mehdi Makni, Xiang Meng

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2603.01376.json · badge: /api/ran/2603.01376.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
mazumder-lab/3BASiL canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
cg_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mazumder-lab/3BASiL/compress.py
code served (permissive licence) · get_code("a5d318de900dc1f1")
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 (4, 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 numpy as np

torch.manual_seed(0)

# Set up dimensions: n=4 (matrix size), m=3 (number of RHS)
n = 4
m = 3

# Create a small positive definite matrix A (4x4)
# Use A = I + random symmetric positive matrix
A_base = torch.randn(n, n)
A = (A_base + A_base.T) / 2 + torch.eye(n) * 5  # Ensure positive definiteness

# Create right-hand side B (4x3)
B = torch.randn(n, m)

# Create support mask A_supp (4x3) - all ones means no sparsity constraint masked out
A_supp = torch.ones(n, m)

# Create a preconditioner M_bmm - identity preconditioner (just returns input)
def M_bmm(x):
    return x

# Create initial guess X0 (4x3)
X0 = torch.zeros(n, m)

# Other parameters
rtol = 1e-3
atol = 1e-6
maxiter = 20
verbose = False

ARGS = {
    "A": A,
    "B": B,
    "A_supp": A_supp,
    "M_bmm": M_bmm,
    "X0": X0,
    "rtol": rtol,
    "atol": atol,
    "maxiter": maxiter,
    "verbose": verbose,
}
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 Tensor, ndim 2, dtype family float, shape (4, 3) — shape (4, 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
find_layers Ran
ran; our contract draft was wrong, not the code
mazumder-lab/3BASiL/pipeline.py
code served (permissive licence) · get_code("a27cec0b3dcb1fec")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Build a simple nested module structure to test find_layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        self.conv1 = nn.Conv2d(1, 1, 3)
        self.nested = nn.Sequential(
            nn.Linear(2, 4),
            nn.ReLU(),
            nn.Linear(4, 1)
        )

model = SimpleModel()

# Test case 1: Find all Linear layers (default behavior)
ARGS = {
    'module': model,
    'layer_type': None,
    'name': ''
}
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 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
randomized_svd Ran
ran; our contract draft was wrong, not the code
mazumder-lab/3BASiL/compress.py
code served (permissive licence) · get_code("8444f46b7b0a8bcf")
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. 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)

# Create a small 2D tensor for the matrix A
# Using distinct dimensions: 5 rows, 3 columns
A = torch.randn(5, 3, dtype=torch.float32)

# num_ranks: number of low-rank components to keep
num_ranks = 2

# num_oversampling: additional samples for randomization
num_oversampling = 1

ARGS = {
    'A': A,
    'num_ranks': num_ranks,
    'num_oversampling': num_oversampling
}
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 tuple — a tuple output has no array shape of its own; none is 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
recursive_getattr Ran
ran, honoured the contract we drafted
mazumder-lab/3BASiL/models/lora_utils.py
code served (permissive licence) · get_code("52c33281ab55761a")
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 torch.nn as nn

torch.manual_seed(0)

# Create a nested module structure to test recursive_getattr
class SubModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.value = 42

class MiddleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.sub = SubModule()

class MainModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.middle = MiddleModule()

# Instantiate the nested structure
obj = MainModule()

# Test with nested attribute path
attr = "middle.sub.value"

ARGS = {
    "obj": obj,
    "attr": attr
}
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
get_algorithm_type Not yet run
unverified (harvested, no recorded run)
mazumder-lab/3BASiL/algos.py
code served (permissive licence) · get_code("476127e5319d5728")
How it ran

no invocation recorded.

rank_regression Not yet run
unverified (harvested, no recorded run)
mazumder-lab/3BASiL/compress.py
code served (permissive licence) · get_code("f562b806128d03c3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 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-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

Sparse plus Low-Rank (S + LR) decomposition of Large Language Models (LLMs) has emerged as a promising direction in model compression, aiming to decompose pre-trained model weights into a sum of sparse and low-rank matrices W ≈ S + LR. Despite recent progress, existing methods often suffer from substantial performance degradation compared to dense models. In this work, we introduce 3BASiL-TM, an efficient one-shot post-training method for (S + LR) decomposition of LLMs that addresses this gap. Our approach first introduces a novel 3-Block Alternating Direction Method of Multipliers (ADMM) method, termed 3BASiL, to minimize the layer-wise reconstruction error with convergence guarantees. We then design an efficient transformer-matching (TM) refinement step that jointly optimizes the sparse and low-rank components across transformer layers. This step minimizes a novel memory-efficient loss that aligns outputs at the transformer level. Notably, the TM procedure is universal as it can enhance any (S + LR) decomposition, including pure sparsity. Our numerical experiments show that 3BASiL-TM reduces the WikiText2 perplexity gap relative to dense LLaMA-8B model by over 30% under a (2:4 Sparse + 64 LR) configuration, compared to prior methods. Moreover, our method achieves over 2.5x faster compression runtime on an A100 GPU compared to SOTA (S + LR) method. Our code is available at https://github.com/mazumder-lab/3BASiL.

For agents

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

get_harvested_code_for_paper("2603.01376")
get_code_for_paper("2603.01376")
have("2603.01376")

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

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

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

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

Connect an agent — have() is free.