Skip to content

Pruning, Quantizing, and Rewiring: Three Ways to Shrink an LLM Without Starting Over

#llm-compression #sparse-tuning #vector-quantization #pruning #peft

The bill arrives at 140GB ​

A 70B model in bf16 is 140GB of weights. That's two 80GB H100s holding the parameters still, before you've allocated a single KV cache block or a batch. Everything downstream of that number, the instance type, the tokens-per-dollar curve, whether you can run the thing on-prem at all, is set by the weight footprint.

So the interesting question in compression research isn't "can we shrink the model." It's "how much quality do we lose per byte, and what does the recovery cost." Three papers landed on my desk this month that answer that in different currencies. One trades sparsity for FLOPs during training. One trades bits for a distillation pass. One doesn't compress anything at all, it just changes where the tuning delta is allowed to connect.

MethodWhat it removesTraining costHeadline result
ETAPS50% to 90% of weights via a maskSparse delta with a fixed small budget, one H20042% lower perplexity than ELSA at matched sparsity
TVQBits per weight, down to 2Block-wise distillation with straight-through gradients1% QA accuracy drop for LLaMA2-70B at 2 bits
SWIFTNothing; it reroutes the tuning deltaSparse delta only, no extra trainable parametersMatches or beats full fine-tuning on average

The three overlap more than the abstracts suggest. All of them are fighting the same failure mode: you do something drastic to the weights, quality falls off a cliff, and the recovery procedure costs as much as the thing you were trying to save.

ETAPS: tighten the constraint instead of solving for the mask ​

The state of the art at extreme sparsity is to optimize the pruning mask directly under the end-to-end objective, rather than pruning once and patching up afterwards. That works, and it's expensive in a specific way. To get gradients for the mask you end up carrying model-sized optimizer state plus auxiliary variables. For LLaMA2-7B, that extra state is roughly the memory of the model again, which is why those methods need multiple H200s to prune a 7B network.

ETAPS sidesteps this by never solving for the mask in one shot. It tightens a global sparsity constraint in stages, and between stages it trains a sparse delta with a small, fixed budget. The observation that makes this work: if each pruning step is small enough, the sparse adaptation can absorb the damage, and the adapted model's end-to-end gradients are a good enough signal to guide the next pruning decision. You get mask-quality gradients without ever holding a second full-size optimizer state.

The loop is unglamorous, and that's the point. Each iteration is a cheap prune followed by a cheap adapt, and the total wall clock stays bounded because the delta budget doesn't grow with the model.

What the staging actually buys ​

Key numbers

  • 42% perplexity reduction over ELSA at matched sparsity, measured across six models from 125M to 13B parameters.
  • 50% to 90% sparsity range where ETAPS wins at every evaluated point.
  • 1 H200 to prune LLaMA2-7B at 90% sparsity, versus 4 for ELSA.
  • 5.0x smaller total persistent state.
  • 49% fewer GPU-hours.

The GPU-hour number matters less than the persistent-state number. Pruning runs once; serving runs for months. What you actually care about is the quality of the mask you end up shipping, and 42% lower perplexity at 90% sparsity is the difference between a model you'd deploy and one you wouldn't.

Translate 90% sparsity into weights. For LLaMA2-7B that's roughly 675M nonzero parameters, about 1.4GB in bf16. That fits comfortably in a 24GB card alongside a KV cache, if your runtime can exploit the sparsity. That last clause is doing a lot of work, and I'll come back to it.

TVQ: give the codebook a gradient ​

Vector quantization replaces groups of weights with indices into a learned codebook. It's the mechanism behind most 2-bit and 3-bit compression schemes, and it has an awkward property: the codebook entries are discrete, so you can't just run backprop through them.

Existing methods handle this by skipping training entirely. They assign codewords layer by layer to minimize reconstruction error and stop there. This caps quality, because reconstruction error and task loss are not the same objective.

TVQ applies a straight-through estimator. During the forward pass the weights are quantized; during the backward pass the gradient flows as if quantization were the identity. Reformulating the problem around trainable latent weights lets you minimize any objective you like, and the paper picks block-wise knowledge distillation, which keeps the memory footprint manageable while giving you a real task signal.

The payoff is a near-lossless 2-bit LLaMA2-70B with a 1% drop on standard QA benchmarks. That's a 17.5GB checkpoint. It fits on a single 24GB consumer card, and a 48GB card leaves you room for a decent context window.

Where the bytes actually go ​

The bit-width arithmetic is boring until you map it onto hardware you can rent or buy.

At 140GB you're renting multi-GPU nodes. At 35GB you're on a single A100 40GB with a small batch. At 17.5GB you're on hardware that costs less than a used car. That progression, not the perplexity table, is what moves a deployment decision.

SWIFT: information islands in sparse tuning ​

SWIFT doesn't compress anything. It's a PEFT method, and it starts from a diagnosis of why sparse tuning underperforms full fine-tuning even at matched parameter counts.

The claim is about topology. If your trainable delta has limited or uneven connectivity, some feature dimensions end up isolated from the task-specific update. The paper calls these information islands. Two dimensions might both need to move in a coordinated way to learn a task, but if no trainable path connects them, they can't.

SWIFT's fix is a block-diagonal sparse update for local feature mixing, plus a fixed deterministic scattering permutation that routes the mixed outputs across feature groups. The permutation adds zero trainable parameters. It's a reshuffle, applied at init and frozen.

There's a theory section showing that certain random sparse updates and pure block-diagonal updates can exhibit information islands, while a sufficiently scattering permutation guarantees positive block-level expansion when the block-diagonal factor consists of equal-sized, structurally dense square blocks. That's a mouthful, but the practical read is simple: block-diagonal updates are cheap and local, and the permutation buys you global reach for free.

On commonsense reasoning, NLG, and image classification, SWIFT beats the PEFT baselines on average and can match or surpass full fine-tuning. Code is at github.com/xianchaoguan/SWIFT.

What I ran into on real checkpoints ​

I spent a week trying to reproduce the ETAPS numbers on a 7B checkpoint with a single 80GB card, and the first thing that broke was my mental model of what the adaptation budget was for.

I'd assumed the sparse delta existed to recover accuracy after each prune. It does that, but the more important job is producing a usable gradient for the next pruning decision. The real problem was that the mask had no loss signal; ETAPS's staging is the cheapest way to get one without a second full model in memory. Once I stopped treating the delta as a repair step and started treating it as the mask's gradient source, the hyperparameters made sense. The delta learning rate wants to be high enough that the adapted model actually tracks the pruned one, not so high that it destabilizes.

My second surprise was on the TVQ side. I quantized a smaller model to 2 bits with a naive layer-wise reconstruction objective and then fine-tuned it with LoRA, expecting the fine-tune to close the gap. It didn't. The reconstruction-optimal codebook put its error exactly where the task heads were sensitive. Running the block-wise distillation objective from the start is the whole trick, and retrofitting it is not equivalent.

SWIFT was the easy one. The permutation is deterministic and free, so there's nothing to tune. I dropped it into an existing block-diagonal sparse tuning setup and got a consistent bump across three tasks. I don't have a clean theoretical story for why it helped as much as it did on the smaller models, but the direction was never ambiguous.

Common pitfalls ​

Trusting sparsity numbers as speedup numbers. A 90% sparse mask stored in dense bf16 is the same size as the dense model. You get the storage win only if you ship a compressed format (CSR, or blocked variants), and you get the latency win only if your kernel matches your mask pattern. Unstructured masks like ETAPS produces need general sparse kernels, which are much slower than the 2:4 structured path. If your target is latency rather than memory, consider whether a 2:4 mask plus a better quantizer gets you further.

Pruning after quantizing. The order matters. Pruning changes the weight distribution; a codebook fitted before pruning is fitted to a distribution you're about to destroy. Prune, then quantize, then distill.

Judging a quantizer by weight MSE. Reconstruction error is a proxy. TVQ's whole argument is that you should optimize the objective you care about. If you're evaluating a VQ scheme, run the downstream benchmark, not the L2 norm.

Leaving the embedding and LM head at low bit. These layers are a small fraction of parameters and an outsized fraction of quality loss at 2 bits. Most working recipes keep them at 8 bits or higher and eat the memory cost.

Comparing perplexity across different sparsity levels. A 60% sparse model and a 90% sparse model aren't on the same curve. Report against a dense baseline and a matched-budget alternative, or the number means nothing.

One thing to remember ​

Every one of these methods is judged on the model it produces, not on how clever the compression step is. A mask that scores well on a held-out perplexity set but needs a bespoke kernel to run is not compression, it's a research artifact.

What this means for your checkpoint ​

If you're serving a 70B model and memory is the binding constraint, go to 2-bit vector quantization with a distillation pass before you reach for sparsity. TVQ's 1% QA drop at 17.5GB is the cleanest win in this batch, and 2-bit checkpoints run on existing dense kernels, so nothing in your runtime has to change.

If you're constrained to a 24GB card and the model is 7B, ETAPS at 80% sparsity is where I'd start, but only after you've confirmed your inference stack can actually read a sparse mask. If it can't, quantize instead; you'll get a smaller win with zero engineering risk.

If you're fine-tuning rather than serving, and you're already using a block-diagonal sparse adapter, add SWIFT's scattering permutation. It's free, it's deterministic, and the reported gains over PEFT baselines are consistent enough that there's no reason not to try it before spending more on a bigger trainable budget.