Cutting weights instead of bits: a practical look at pruning

Open models keep getting bigger, and the hardware most people own does not. That gap has produced a steady stream of techniques for shrinking models after training. Quantization, which stores weights with fewer bits, is the best known. Pruning is the other big family: instead of making each weight smaller, it removes some weights, layers or, in mixture-of-experts models, entire experts. Releases of expert-pruned versions of large MoE models, aimed at people with modest setups, have made the idea popular again.
This article is for developers and hobbyists deciding whether a pruned checkpoint is worth downloading, or whether a hosted API is the better route. We explain the main kinds of pruning, why mixture-of-experts models are especially suited to it, how to judge quality loss on your own tasks and how pruned local models compare with calling a hosted service such as Groq or the keyless free-ai endpoint on this site.
Frequently asked questions
What is pruning in a language model?
Pruning removes parameters judged to contribute little to the output. It can target individual weights, attention heads, whole layers or, in mixture-of-experts models, entire experts. The result is a smaller model that needs less memory and sometimes runs faster.
How does pruning differ from quantization?
Quantization keeps every parameter but stores it with lower precision. Pruning deletes parameters outright. They are complementary: a pruned model can also be quantized, and many people running large models at home combine both.
What is a mixture-of-experts model?
An MoE model has many expert sub-networks in each layer and a router that sends each token to only a few of them. Total parameters can be very large while the active parameters per token stay small, which is why MoE models are fast for their size.
What does expert pruning remove?
It removes experts that the router rarely selects or whose contribution is small, often measured on calibration data. Because only a few experts are active per token, dropping rarely used ones can cut total size noticeably while affecting typical outputs less than you might expect.
Does an expert-pruned model lose quality?
Usually some, and unevenly. Common tasks covered by the calibration data tend to hold up, while rare skills, minority languages or niche domains that relied on pruned experts can degrade sharply. Test on the tasks you care about.
Does pruning make the model faster?
For MoE models, pruning mainly reduces memory, because active parameters per token barely change. For dense models, structured pruning of layers or heads can raise speed. Unstructured pruning of single weights rarely speeds up inference without special kernels.
Is a pruned local model better than a hosted API?
It depends on privacy needs, hardware and volume. Local gives control and no per-request cost but limited speed and model size. A hosted API gives larger models and higher throughput without hardware, at the cost of sending data to a provider and accepting its limits.
Why shrinking models matters
A model's memory footprint is roughly its parameter count times the bytes per parameter. A model with over a hundred billion parameters needs far more memory than a single consumer GPU offers, even at aggressive quantization. For people building at home, the question is not which model is best in the abstract but which one fits in the memory they have while still being good enough.
Shrinking also matters for providers. Smaller models need fewer chips, so they are cheaper to serve and can be offered at lower prices or with more generous free tiers. Some of the speed you see from hosted inference comes from careful choices about model size and precision, not only from hardware.
Total versus active parameters
In MoE models, two numbers matter. Total parameters decide how much memory you need to hold the model. Active parameters per token decide how much compute each token costs. Expert pruning lowers the first number while leaving the second almost unchanged.
The main kinds of pruning
Pruning techniques differ in what they remove and whether the result runs faster on ordinary hardware. It helps to know the categories before reading a model card, because a phrase like "50% sparse" can mean very different things.
Unstructured pruning
Individual weights near zero are set to zero. High sparsity is possible with modest quality loss, but standard inference engines still multiply the zeros, so memory and speed gains need sparse formats or special kernels.
Structured pruning
Whole rows, attention heads or layers are removed. The model becomes genuinely smaller and faster on normal hardware, but quality drops more per parameter removed, and a short retraining phase is often needed to recover.
Expert pruning
In MoE models, entire experts are removed and the router is adjusted so tokens go to the remaining ones. It is structured by nature, works with existing inference engines and targets the part of MoE models that dominates memory.

How expert pruning decides what to cut
The basic idea is to run the model on a calibration dataset and record how often each expert is selected and how much it contributes when selected. Experts that are rarely chosen, or whose outputs are small or redundant with others, become candidates for removal. Some methods weight the router's selection scores by the magnitude of the expert's output, which tends to keep experts that are used rarely but matter a lot when they are.
The choice of calibration data has a large effect. If it is mostly English code and chat, experts that specialised in other languages or domains look unimportant and get cut. The pruned model then performs well on benchmarks similar to the calibration set and worse on everything else. Model cards that describe their calibration data honestly are a good sign.
Why the router needs attention
After experts are removed, the router may still assign high scores to slots that no longer exist. Methods handle this by renormalising the remaining scores or briefly fine-tuning the router, and releases that skip this step tend to behave less predictably.
- Calibration data close to your use case is the best predictor of good results
- Higher pruning ratios save more memory and lose more rare skills
- Merging experts is an alternative to deleting them, with different trade-offs
- Some releases offer several pruning ratios so you can choose a size
Measuring quality loss on your own tasks
Public benchmark scores for pruned models are useful as a rough guide but say little about your specific prompts. A quick private evaluation is more informative. Collect thirty to fifty prompts from your real workload, run them through the original model via an API and through the pruned model locally, and compare the outputs side by side. Our guide on benchmarking providers with your own prompts describes a simple, repeatable setup.
Look specifically at the edges of your use: the least common language you support, the most specialised domain questions and long-context tasks. Those are where pruning damage hides. For structured tasks such as JSON extraction, measure parse success rate as well as content accuracy.
Blind comparison helps
Shuffle outputs so you do not know which model wrote which answer before rating them. It is easy to see degradation you expect, or miss it because the pruned model is the one you hoped would work.
Watch for repetition
Heavily pruned models sometimes loop or repeat phrases in long outputs. Include a few prompts that need several hundred tokens of output and check the endings, not just the first paragraph.

Pruning plus quantization on home hardware
In practice, people who run pruned MoE models at home usually quantize them as well. Pruning a quarter or more of the experts and then quantizing to four or five bits can bring a very large model into the range of a high-memory workstation or a machine with unified memory. Each step loses a little quality, and the losses add up, so the combined model should be tested as a whole.
Speed on home hardware is mostly limited by memory bandwidth during decode. Because MoE models only touch a fraction of their weights per token, they can be surprisingly quick once loaded, which is part of their appeal for local use. Prompt processing on long inputs can still be slow on consumer machines.
Check your inference engine first
Not every engine supports every MoE architecture or pruned variant on release. Before downloading a large file, confirm that the runtime you use lists the architecture as supported and that someone has run it successfully.
Pruned local model or a hosted API?
A pruned model makes sense when you need data to stay on your machine, when you run many requests and have hardware already, or when you enjoy tuning local setups. A hosted API makes sense when you need the full unpruned quality of a large model, high throughput or no hardware investment.
Groq hosts a range of open models on its own inference hardware, which you reach with a key from its console; consult Groq's model list and limits pages for what is available now. The free-ai endpoint here is a separate, independent service, not affiliated with Groq, that serves one open-weight model of roughly 35B parameters with no key. It is a quick way to compare a mid-sized hosted model against a pruned local one on the same prompts without signing up anywhere. For the broader self-hosting decision, read self-hosting a mid-sized model versus a hosted API.
Privacy is a real difference
Every request to a hosted service, including the keyless one, leaves a technical log with time, IP, User-Agent and token counts. A local model leaves nothing outside your machine. If your data must not leave your network, that alone may decide the question.

A quick comparison script
If you run a local server that exposes an OpenAI-compatible endpoint, as most popular local runtimes can, comparing it with a hosted model takes one short script. The example sends the same prompt to the keyless endpoint and to a local server on port 8080 and prints both answers. Adjust the local URL and model name to match your setup.
Respect the hosted limits
When you loop over many prompts, pause a little over a second between hosted calls. The keyless endpoint allows one request per second per IP and answers 429 with a Retry-After header when you go faster.
from openai import OpenAI
hosted = OpenAI(base_url="https://api.apifreegroqkey.com/v1", api_key="free")
local = OpenAI(base_url="http://localhost:8080/v1", api_key="local")
prompt = "Translate to Portuguese and keep the tone casual: 'See you at the market tomorrow.'"
for name, client, model in [("hosted", hosted, "free-ai"), ("local", local, "pruned-model")]:
r = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": prompt}],
max_tokens=200,
)
print(f"--- {name}\n{r.choices[0].message.content}\n")Questions to ask before downloading
Pruned releases vary widely in care and documentation. A few questions help separate solid work from quick experiments. If a release cannot answer them, treat its quality claims with caution and run your own tests before building on it.
Licenses carry over
A pruned model is a derivative of the original, so the original license usually still applies. Check it before using a pruned model commercially, exactly as you would for the base model.
- Which original model was pruned, and what ratio of experts was removed?
- What calibration data was used, and does it resemble your workload?
- Which benchmarks were reported, and do they include your languages or domains?
- Is the license the same as the original model's license?
- Does your inference engine support the resulting architecture?

Send a request to the keyless free-ai endpoint from the home page and see how it fits your project, no sign-up needed.
Read also
- What Is Continuous Batching, and Why Does It Raise LLM Throughput?
- Self-Hosting a 30B Model for a Small Team vs Using a Hosted API
- Flat AI Subscription or Pay-per-Token API: Which Costs You Less?
- What Is Time to First Token, and Why Can It Matter More Than Speed?
- Is Buying a Turnkey AI App Template Worth the Money?