Remove the weights that matter least. Measure what remains.

Pruning creates zeros, but zeros only become speed when storage formats and kernels can exploit their pattern. Compare unstructured, block, and channel pruning while tracking error and hardware usefulness.

Open sparse matrix

Sparsity is a pattern, not just a percentage.

Magnitude pruning removes small weights under the assumption that they contribute less. Unstructured masks preserve flexibility but scatter zeros. Structured masks remove blocks or channels that hardware can skip efficiently, often at a higher accuracy cost.

Dense matrix · 0% prunedDrag to orbit · wheel to zoom
retainedremovedhigh magnitude
Weights retained256

Nonzero values remaining after the mask.

Reconstruction error0.000

Normalized energy removed after recovery.

Theoretical compression1.00×

Dense count divided by retained count, excluding indices.

Kernel utilization100%

Modeled fraction of sparsity that available kernels exploit.

Score importance

Magnitude is the simplest proxy. Calibration-aware methods also consider activations, asking whether a weight participates strongly on representative inputs.

score(wᵢⱼ) = |wᵢⱼ| · activation_importanceⱼ

Choose a mask structure

Unstructured pruning chooses individual values. N:M, block, and channel masks constrain removals into predictable layouts that reduce indexing and improve kernel efficiency.

Wpruned = W ⊙ M, M ∈ {0,1}

Recover around the damage

Fine-tuning lets remaining weights compensate for removed connections. Recovery cannot restore capacity that an overly aggressive structured mask eliminated.

minimize L(W ⊙ M) while M stays fixed

Unstructured

Best flexibility at a given sparsity, but index overhead and irregular memory access can erase wall-clock gains.

Zeros are not automatically speed.

Block sparse

Entire tiles disappear, matching matrix kernels more naturally while retaining finer control than channels.

Align blocks to hardware.

Channel sparse

Removing complete rows or columns changes layer dimensions and yields direct dense-kernel savings.

Highest structure, highest capacity risk.

Primary reading

Learning Both Weights and Connections for Efficient Neural Networks Han et al.Wanda: A Simple and Effective Pruning Approach for LLMs Sun et al.SparseGPT: Massive Language Models Can Be Accurately Pruned Frantar & AlistarhMovement Pruning Sanh et al.