Introduction
The 2:4 semi-structured pattern asks for two zeros in every four consecutive input weights of every output neuron. It is the one sparsity pattern that GPU sparse tensor cores execute faster than a dense matrix, and it is rigid: a pruner does not choose how much of a layer to remove, or where in a row, only which two of each four. Done without retraining, from a fixed calibration set, the question becomes which weights should go, and what should the surviving weights become?
The field answers in three ways. Score-based methods rank weights by a cheap importance rule, the weight magnitude scaled by its input activation norm, as Wanda [1] does, or a relative-importance variant of it, as RIA does, and leave the survivors unchanged. Reconstruction methods pose a layer-wise least-squares problem, keep the layer's output on calibration inputs close to the dense layer's, and update the survivors to compensate for what was removed: SparseGPT [2] does this with an optimal-brain-surgeon column sweep, Thanos [3] with block-wise updates, and ALPS [4] by solving the constrained problem with ADMM followed by a conjugate-gradient polish on the chosen support; the convex layer-wise solver FISTAPruner [5] and the mask refinement by swaps of SparseSwaps [6] belong to the same family. A third group adds structure beside the sparse core, as ARMOR [7] does with an adaptive matrix factorization.
Our starting observation concerns the pipeline that all of these share. Blocks are pruned in order, and each block is calibrated on the activations of the already-pruned model. A layer that reconstructs its own dense output on those inputs therefore treats the upstream damage as given; a layer that tries to reproduce the dense model's output from them has to decide how much of the upstream damage to undo, and undoing all of it turns out to be harmful. What a layer should be asked to reconstruct, given distorted inputs, is the question our method answers.
Method
Our method, which we call IVR (instrumental-variable reconstruction), changes the target of the layer-wise problem and leaves the problem itself in its standard form. It is defined entirely in the editable pruner class, through the block-level hook, and adds nothing beside the 2:4 core.
Block-sequential stages on two streams
For each decoder block we have two streams of calibration inputs: the pruned model's inputs to this block, , and, through the harness's opt-in dense stream, the unpruned model's inputs for the same windows, together with the unpruned block. We prune the block's linear layers in four stages in data-flow order: the attention input projections together, then the attention output projection, then the MLP input projections, then the MLP output projection. Before each stage we re-run our partially pruned working copy of the block, so a layer's statistics include the pruning of every earlier stage of the same block, and for each layer in the stage we collect three second moments,
the pruned stream's own moment, its cross moment with the dense stream (the dense input of the same layer in the unpruned block) and the dense stream's moment. The dense weights are always taken from the unpruned block.
def prune_block(self, block, cfgs, ctx):
res = {}
for si, stage in enumerate(self._stages(ctx.names)):
a = None if self.alpha_stage is None else self.alpha_stage[si]
if self.asym:
st = ctx.collect(block, names=stage, pair=(ctx.dense_block, ctx.dense_inputs))
else:
st = ctx.collect(block, names=stage)
for nm in stage:
lin = block.get_submodule(nm)
W = ctx.dense_block.get_submodule(nm).weight.data.float()
mask, Wq = self._prune_linear(W, st[nm]["H"], st[nm].get("H_cross"), cfgs[nm],
f"{ctx.index}.{nm}", alpha=a, Hd=st[nm].get("H_pair"))
Wq = Wq.masked_fill(mask, 0.0)
lin.weight.data = Wq.to(lin.weight.dtype)
res[nm] = (mask, Wq)
st[nm] = None
return resThe target: an instrumental-variable condition
The usual reconstruction target is the layer's own weight : find a 2:4 matrix minimising . To reproduce the dense model's output instead, one can regress on , which gives the least-squares target (with a ridge). That target attributes to the layer every part of the dense output that the pruned input can predict, including the noise that pruning upstream added to , and the regression shrinks the weights towards zero to absorb it.
We instead use the dense input as an instrument. We ask for target weights whose residual against the dense output is uncorrelated with the dense input,
which, with a ridge on , gives
Only the component of the upstream error that the dense input linearly predicts, the systematic distortion, is corrected; the part that is unpredictable from is passed through rather than shrunk away. We then apply the correction at half strength,
and set to zero the target's columns for input channels that never fire on the calibration data. The least-squares target remains in the code as an alternative branch but is not the configured one.
def _prune_linear(self, W, H, Hc, cfg, name, alpha=None, Hd=None):
n = W.shape[1]
dev = W.device
H = H.clone()
dead = torch.diag(H) == 0
H[dead, dead] = 1.0
lam = self.damp * torch.mean(torch.diag(H))
diag = torch.arange(n, device=dev)
Hl = H.clone()
Hl[diag, diag] += lam
if self.asym and Hc is not None and self.target == "iv":
# instrumental-variable target: W_t C = W Hd (C = E[x~ x^T], Hd = E[x x^T])
lamd = (self.damp if self.damp_iv is None else self.damp_iv) * torch.mean(torch.diag(Hd))
Cr = Hc.clone()
Cr[diag, diag] += lamd
R = W @ (Hd - Hc)
Wt = W + torch.linalg.solve(Cr.t(), R.t()).t()
elif self.asym and Hc is not None:
# W* = W (C^T + lam I)(H + lam I)^-1, C = X_pruned X_dense^T
Ct = Hc.t().clone()
Ct[diag, diag] += lam
L = torch.linalg.cholesky(Hl)
Wt = torch.cholesky_solve((W @ Ct).t(), L).t()
else:
Wt = W.clone()
a = self.alpha if alpha is None else alpha
if a != 1.0:
Wt = W + a * (Wt - W)
Wt[:, dead] = 0The layer problem and its solver
With the target fixed, the layer problem is the standard constrained least squares on the pruned stream,
and we solve it with our own implementation of the ALPS scheme. We normalise to unit diagonal and work in the scaled weights , . The ADMM alternates an exact ridge solve, applied through one eigendecomposition of the normalised moment, with a projection onto the 2:4 set that keeps the two largest magnitudes of each group of four, and a dual update. The penalty starts at and is adapted every 3 iterations by how much the support changed: it is multiplied by when more than 10% of the kept weights changed and by when more than 0.5% did; when fewer but some changed, it is multiplied by if it has already been raised and otherwise divided by 5 with the iterates restarted; when none changed, the loop stops if the penalty has been raised and otherwise the penalty is divided by 5. The penalty is capped at , the loop also stops from iteration 30 on when less than 0.03% of the support changes, and it runs at most 300 iterations. A final 10 steps of conjugate gradient re-fit the kept weights on the fixed support.
The mask is therefore not given by a separate importance rule. The first projection, on the normalised target , is a magnitude-times-activation score in the style of Wanda applied to the target rather than to , and the ADMM then moves the support towards a lower reconstruction loss.
def _alps(self, Wt, Hl, max_iter=300, update_iter=3, switch_iter=30, rho0=0.1, cg_iters=10):
"""ALPS (Meng et al. 2024) ADMM + PCG for the 2:4 layer problem
min_Wq tr((Wq - Wt) Hl (Wq - Wt)^T). Hl already damped."""
m, n = Wt.shape
dev = Wt.device
xn = torch.sqrt(torch.diag(Hl)) + 1e-8
XtX = Hl / xn.unsqueeze(0) / xn.unsqueeze(1)
B0 = (Wt * xn).t().contiguous() # [n, m]
YtX_T = XtX @ B0 # [n, m]
L, Q = torch.linalg.eigh(XtX.double())
L = L.float(); Q = Q.float()
rho = rho0
def inv_apply(R, rho):
return Q @ ((Q.t() @ R) / (L + rho).unsqueeze(1))
D, supp_prev = self._proj24(B0)
D_init = D.clone()
V = torch.zeros_like(B0)
B = B0.clone()
init_rho = False
k_spar = n * m / 2
for it in range(max_iter):
B = inv_apply(YtX_T - V + rho * D, rho)
D, supp = self._proj24(B + V / rho)
V = V + rho * (B - D)
if (it + 1) % update_iter == 0:The class also contains an optimal-brain-surgeon sweep in the style of SparseGPT and an exact block-coordinate descent over groups of four, from earlier versions; neither is used in the submitted configuration (the solver is set to ALPS and the number of descent sweeps to zero).
Restoring the output energy
Reconstruction under a ridge, and pruning itself, both shrink a layer's output. After solving, we rescale every output row so that its second moment on the pruned stream matches the dense layer's on the dense stream,
with for rows whose pruned output has zero energy. The rescaling multiplies whole rows, so it leaves the 2:4 mask untouched.
if self.vc and Hd is not None:
e_d = ((W @ Hd) * W).sum(1)
e_p = ((Wq @ H) * Wq).sum(1)
s = torch.sqrt(e_d / e_p.clamp_min(1e-12))
s = torch.where(e_p > 0, s, torch.ones_like(s))
if self.verbose:
print(f" {name}: vc scale mean={float(s.mean()):.4f} min={float(s.min()):.4f} max={float(s.max()):.4f}", flush=True)
Wq = Wq * s.unsqueeze(1)
if self.verbose:
print(f" {name}: rel_err init={l1 / l0:.5f} bcd={l2 / l0:.5f}", flush=True)
return mask, WqIVR has no per-model or per-setting constants; the only branch on the model is the stage order, which reads the names of the block's layers.
Results
| Method | ① | ② | ③ | ④ | ⑤ | ⑥ | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| WikiText-2 perplexity ↓ | C4 perplexity ↓ | 2:4 speedup kept ↑ | Zero-shot accuracy, 7 tasks ↑ | 2:4 speedup kept ↑ | MMLU accuracy ↑ | GSM8K accuracy ↑ | 2:4 speedup kept ↑ | WikiText-2 perplexity ↓ | C4 perplexity ↓ | 2:4 speedup kept ↑ | Zero-shot accuracy, 7 tasks ↑ | 2:4 speedup kept ↑ | MMLU accuracy ↑ | GSM8K accuracy ↑ | 2:4 speedup kept ↑ | |
| Claude Opus 5.5 | 2,483 | 2,967 | 1.000 | 42.95 | 1.000 | 32.59 | 0 | 1.000 | 10.66 | 15.56 | 1.000 | 55.87 | 1.000 | 54.89 | 12.51 | 1.000 |
| Wanda | 23.16 | 34.70 | 1.000 | 46.48 | 1.000 | 29.03 | 2.426 | 1.000 | 13.81 | 21.52 | 1.000 | 54.48 | 1.000 | 54.09 | 24.49 | 1.000 |
| RIA | 22.37 | 32.89 | 1.000 | 47.04 | 1.000 | 28.66 | 2.047 | 1.000 | 13.31 | 21.51 | 1.000 | 53.83 | 1.000 | 56.32 | 24.18 | 1.000 |
| SparseGPT | 16.11 | 22.23 | 1.000 | 52.41 | 1.000 | 36.21 | 4.700 | 1.000 | 11.93 | 17.87 | 1.000 | 55.28 | 1.000 | 53.72 | 35.48 | 1.000 |
| ALPS | 14.43 | 19.27 | 1.000 | 53.10 | 1.000 | 39.18 | 5.989 | 1.000 | 10.90 | 16.29 | 1.000 | 57.81 | 1.000 | 55.02 | 31.77 | 1.000 |
| SparseSwaps | 20.02 | 27.84 | 1.000 | 50.19 | 1.000 | 29.65 | 3.260 | 1.000 | 14.77 | 21.84 | 1.000 | 55.12 | 1.000 | 50.05 | 28.05 | 1.000 |
| Thanos | 16.11 | 22.47 | 1.000 | 51.24 | 1.000 | 31.63 | 4.094 | 1.000 | 12.26 | 18.22 | 1.000 | 55.98 | 1.000 | 52.73 | 29.04 | 1.000 |
| Wisp | 21.34 | 31.14 | 1.000 | 47.27 | 1.000 | 30.23 | 2.350 | 1.000 | 13.61 | 20.95 | 1.000 | 52.95 | 1.000 | 54.71 | 22.59 | 1.000 |
| Whisper | 14.31 | 19.32 | 1.000 | 54.13 | 1.000 | 36.11 | 3.942 | 1.000 | 11.44 | 17.21 | 1.000 | 55.67 | 1.000 | 54.11 | 33.51 | 1.000 |
| GBLM-Pruner | 22.58 | 34.38 | 1.000 | 47.07 | 1.000 | 28.17 | 2.350 | 1.000 | 13.82 | 21.58 | 1.000 | 54.77 | 1.000 | 54.04 | 23.20 | 1.000 |
| Pruner-Zero | 22.87 | 34.99 | 1.000 | 47.53 | 1.000 | 28.06 | 1.820 | 1.000 | 12.98 | 20.74 | 1.000 | 54.85 | 1.000 | 53.37 | 16.38 | 1.000 |
| Wanda++ RGS | 24.09 | 35.84 | 1.000 | 46.66 | 1.000 | 28.78 | 2.123 | 1.000 | 14.52 | 23.13 | 1.000 | 54.70 | 1.000 | 53.06 | 26.08 | 1.000 |
| FISTAPruner | 16.00 | 20.74 | 1.000 | 50.45 | 1.000 | 35.93 | 5.914 | 1.000 | 12.15 | 17.70 | 1.000 | 54.44 | 1.000 | 50.82 | 26.38 | 1.000 |
| ARMOR | 11.31 | 17.13 | 0.751 | 56.03 | 0.751 | 46.40 | 7.582 | 0.751 | 9.956 | 15.88 | 0.816 | 60.36 | 0.816 | 66.46 | 47.76 | 0.816 |
| NoWag-P | 23.36 | 34.99 | 1.000 | 47.84 | 1.000 | 27.55 | 1.971 | 1.000 | 13.89 | 22.16 | 1.000 | 53.78 | 1.000 | 54.21 | 25.63 | 1.000 |
| SparseLLM | 15.68 | 21.60 | 1.000 | 52.19 | 1.000 | 34.17 | 4.246 | 1.000 | 12.40 | 18.24 | 1.000 | 54.84 | 1.000 | 51.92 | 34.19 | 1.000 |
| Wanda++ | 15.50 | 22.51 | 1.000 | 49.34 | 1.000 | 34.42 | 3.412 | 1.000 | 13.92 | 21.63 | 1.000 | 53.87 | 1.000 | 53.93 | 25.78 | 1.000 |
- ① Llama-3.1-8B · 2:4 · WikiText-2 + C4 perplexity
- ② Llama-3.1-8B · 2:4 · 7-task zero-shot
- ③ Llama-3.1-8B · 2:4 · MMLU + GSM8K
- ④ Qwen3-8B-Base · 2:4 · WikiText-2 + C4 perplexity
- ⑤ Qwen3-8B-Base · 2:4 · 7-task zero-shot
- ⑥ Qwen3-8B-Base · 2:4 · MMLU + GSM8K
IVR returns only a mask and new weights for each layer, so its speed_keep is 1.000 on Llama-3.1-8B · 2:4 · WikiText-2 + C4 perplexity and the same on every other setting, as it is for every published baseline except ARMOR.
On Qwen3-8B · 2:4 · WikiText-2 + C4 perplexity IVR is close to the strongest method in the table. Its perplexity of 10.66 is behind only ARMOR [7] at 9.956, and ahead of ALPS at 10.90, whose solver we reuse; on the second corpus its 15.56 is below every baseline, the best of which is ARMOR [7] at 15.88. The comparison with ALPS isolates, approximately, what our target, our stages and our energy correction add on top of the shared solver.
That advantage does not carry over to the downstream measures. On Qwen3-8B · 2:4 · 7-task zero-shot the zero-shot accuracy of 55.87 is behind ALPS (57.81), Thanos (55.98) and ARMOR (60.36) and ahead of the other baselines. On Qwen3-8B · 2:4 · MMLU + GSM8K the MMLU accuracy of 54.89 is behind RIA, ALPS and ARMOR, but the GSM8K accuracy of 12.51 is below every published baseline, against 31.77 for ALPS and 47.76 for the best, ARMOR [7]. Lower perplexity bought with a dense-output target appears, here, to have cost multi-step reasoning.
On Llama-3.1-8B · 2:4 · WikiText-2 + C4 perplexity, Llama-3.1-8B · 2:4 · 7-task zero-shot and Llama-3.1-8B · 2:4 · MMLU + GSM8K the pruned model is broken. The perplexity on Llama-3.1-8B · 2:4 · WikiText-2 + C4 perplexity is 2,483 against 11.31 for ARMOR [7] and 23.16 for Wanda, the zero-shot accuracy on Llama-3.1-8B · 2:4 · 7-task zero-shot, 42.95, is below every baseline, and the GSM8K accuracy on Llama-3.1-8B · 2:4 · MMLU + GSM8K is 0.000. The MMLU accuracy on Llama-3.1-8B · 2:4 · MMLU + GSM8K, 32.59, is ahead of nine of the sixteen baselines, which sits oddly beside a perplexity in the thousands; we have no outputs that would explain it. The submitted configuration was run in development only on the smallest development model, and the collapse is not explained by anything we measured.
How we got here
Our development used small models, most of them downloaded for the purpose, and our own copy of the pipeline, with perplexity on two held-out corpora as the signal. The figures below are our development measurements, on the smallest development model unless stated, written as the pair of perplexities; on that model the dense model scored 27.66 and 24.61, ALPS 51.2 and 36.7, SparseGPT 61.1 and 44.2, and FISTAPruner 47.7 and 34.5.
- We started from SparseGPT's sweep plus exact group descent. Our first version used the optimal-brain-surgeon sweep followed by exact block-coordinate descent over groups of four, which enumerates the six ways to keep two of four weights against the Schur complement of the group. Three sweeps took the plain sweep from 64.3 and 45.6 to 56.6 and 40.6; ten sweeps added nothing more. Layer loss mattered end to end.
- We switched to ALPS after an offline solver comparison. We dumped the weights and moments of several layers and compared solvers on the layer objective directly. ALPS reached a lower loss than the sweep with ten descent sweeps on every layer in the visible output (on one MLP layer of a middle block, a relative loss of 0.00940 against 0.00994, and 0.01219 for the plain sweep), and descent started from the ALPS solution changed almost nothing, so the descent code stayed in the file with zero sweeps. Our reimplementation of ALPS matched the baseline's layer loss to within 0.01% on the two layers we checked, and in the pipeline it gave 50.3 and 36.8.
- The full least-squares dense-output target made things worse. Reconstructing the dense output from the pruned stream at full strength gave 70.1 and 44.7 with ALPS, against 50.3 and 36.8 without it; with the sweep solver it had been 78.0 and 47.3. At half strength the same target gave 46.5 and 33.7, and 0.25 gave 46.2 and 33.8, 0.75 gave 52.2 and 36.4. A larger ridge did not rescue the full target (57.9 and 39.0). Per stage, most of the gain came from the attention output and MLP stages.
- The per-layer error against the dense output was the wrong proxy. A diagnostic that fitted the target on half of the calibration windows and measured on the other half found the per-layer error minimised at a strength between 0.75 and 1 even out of sample, while end to end full strength was the worst choice. It also showed the full target shrinking the output energy of some deep layers by 15 to 20%, and the uncorrected target (strength zero) inflating the attention output's energy by up to 1.4 times. That is where the energy correction came from: it improved half strength from 46.5 and 33.7 to 44.1 and 32.9 and no correction from 50.3 and 36.8 to 48.0 and 34.8, but did not rescue full strength (72.3 and 45.6).
- The instrumental-variable target replaced least squares. Our reading was that least squares attributes upstream noise to the layer and shrinks it away. With the instrumental-variable target, full strength stopped collapsing (43.5 and 32.1 without the energy correction, 42.3 and 32.0 with it), and the result became flat in the strength: 41.9 and 31.8 at 0.25, 40.4 and 31.3 at 0.5, 42.0 and 31.4 at 0.75. We kept 0.5 and the energy correction; this is the submitted configuration, and 40.4 and 31.3 is its only development measurement. The instrumental-variable runs also took several times longer to prune than the least-squares ones in our development batches, which we did not investigate.
- We also checked the least-squares variant on three larger development models of different families, in runs launched before the switch of targets whose results arrived after it, with half strength and the energy correction. It was ahead of SparseGPT on all three (for example 15.43 and 16.44 against 19.70 and 20.71 on one of them, and 50.92 and 52.42 against 88.56 and 80.74 on another). The instrumental-variable target was not run on any of them before development stopped.
- Block-level refinement was tried and not kept. We added a refinement of the kept weights by Adam on the block's output error, with masks fixed. It lowered the block error on held-out windows, but the one variant that finished in the trace gave 44.7 and 33.0, worse than the submitted configuration, and it is not in the submission.
Limitations
- The method breaks on Llama-3.1-8B · 2:4 · WikiText-2 + C4 perplexity, Llama-3.1-8B · 2:4 · 7-task zero-shot and Llama-3.1-8B · 2:4 · MMLU + GSM8K. A perplexity of 2,483 is a failure, not a weak result, and it makes IVR unusable as submitted on those settings. We cannot say what broke. One candidate is visible in the method itself: the instrumental-variable solve inverts the cross moment , which, unlike , is in general neither symmetric nor positive definite, so the ridge does not guarantee that it is well conditioned, and a near-singular would produce a large target that the energy correction then rescales rather than repairs. This is a hypothesis, not a measurement.
- The submission was validated on a single small model. The instrumental-variable target and its strength were chosen on the smallest development model alone; the multi-model checks used the least-squares variant. Development ended early, and the design was never tested beyond that one model.
- Perplexity is not the whole story even where the method works. On Qwen3-8B · 2:4 · MMLU + GSM8K the GSM8K accuracy is the lowest in the table while the Qwen3-8B · 2:4 · WikiText-2 + C4 perplexity perplexities are among the best. A target that pulls each layer towards the dense model's output on calibration text may be fitting what that text rewards; our development signal was perplexity only and could not have shown this.
- The constants are set, not derived. The strength was chosen on one model's perplexity; the layer ridge of 0.01 of the mean diagonal, reused for the instrumental-variable solve, and the solver's schedule follow the ALPS baseline.
- The file carries unused machinery. The sweep solver, the group descent and the least-squares target are all present and switched off; the docstring still names the descent as part of the method. They do not affect what was scored, but the submitted class describes more than it does.
References
- Mingjie Sun, Zhuang Liu, Anna Bair et al. (2024). A Simple and Effective Pruning Approach for Large Language Models. ICLR.
- Elias Frantar, Dan Alistarh (2023). SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot. ICML.
- Ivan Ilin, Peter Richtarik (2025). Thanos: A Block-wise Pruning Algorithm for Efficient Large Language Model Compression.
- Xiang Meng, Kayhan Behdin, Haoyue Wang et al. (2024). ALPS: Improved Optimization for Highly Sparse One-Shot Pruning for Large Language Models. NeurIPS.
- Pengxiang Zhao, Hanyu Hu, Ping Li et al. (2024). A Convex-optimization-based Layer-wise Post-training Pruner for Large Language Models.
- Max Zimmer, Christophe Roux, Moritz Wagner et al. (2025). SparseSwaps: Tractable LLM Pruning Mask Refinement at Scale.
- Lawrence Liu, Alexander Liu, Mengdi Wang et al. (2026). ARMOR: High-Performance Semi-Structured Pruning via Adaptive Matrix Factorization. ICLR.
- Linghao Kong, Inimai Subramanian, Micah Adler et al. (2026). The Sparsity Whisperer. NeurIPS.
- Rocktim Jyoti Das, Mukul Ranjan, Mingjie Sun et al. (2023). Beyond Size: How Gradients Shape Pruning Decisions in Large Language Models.
- Peijie Dong, Lujun Li, Zhenheng Tang et al. (2024). Pruner-Zero: Evolving Symbolic Pruning Metric from scratch for Large Language Models. ICML.
- Yifan Yang, Kai Zhen, Bhavana Ganesh et al. (2025). Wanda++: Pruning Large Language Models via Regional Gradients. ACL.
- Lawrence Liu, Inesh Chakrabarti, Yixiao Li et al. (2025). NoWag: A Unified Framework for Shape Preserving Compression of Large Language Models.
- Guangji Bai, Yijiang Li, Chen Ling et al. (2024). SparseLLM: Towards Global Pruning for Pre-trained Language Models. NeurIPS.