Bring the mental model from Efficiency: Quantization, Distillation, LoRA & Sparse MoE; this page will reuse it instead of restarting from zero.
Pruning: Removing Unnecessary Weights
Reduce parameter count by zeroing or removing weights. Unstructured sparsity needs sparse kernels for speed; structured pruning removes whole channels/heads to shrink dense tensor shapes.
01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
Deep nets are often heavily overparameterized. Pruning asks: can we remove weights (or whole structures like neurons/heads) while keeping most of the performance?
Two big distinctions matter:
- Unstructured pruning: set individual weights to zero. This can give huge sparsity numbers, but you only get speedups if your hardware/software stack has sparse kernels.
- Structured pruning: remove whole channels/heads/blocks. This often gives smaller compression, but because it changes dense tensor shapes, it is more likely to translate into wall-clock speedups on standard kernels.
The surprising part is that naive rules (like "prune small weights") often work decently, even though they are not theoretically optimal.
Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Magnitude pruning (a common baseline)
Let W be a weight matrix and let θ be a threshold. Define a mask:
Structured pruning (remove units)
If S is the set of columns/heads you keep, structured pruning changes the layer shape:
This changes the model shape, which is why it can translate into ordinary dense-kernel speedups more directly.
Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
import numpy as np
rng = np.random.default_rng(0)
W = rng.normal(size=(256, 256)).astype(np.float32)
sparsity = 0.7 # prune 70% of weights by magnitude
th = np.quantile(np.abs(W), sparsity)
M = (np.abs(W) > th).astype(np.float32)
W_pruned = W * M
print("target sparsity:", sparsity)
print("actual sparsity:", round(float((M == 0).mean()), 3))
print("L2 norm ratio ||W_pruned||/||W||:", round(float(np.linalg.norm(W_pruned) / np.linalg.norm(W)), 3))
Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
Live Concept Demo
Explore Pruning: Removing Unnecessary Weights
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Choose what to inspect in Pruning: Removing Unnecessary Weights. This shared fallback is an observation guide, not evidence of learning.
The demo below asks you to predict which pruning pattern actually turns into a speedup before revealing the mask and deployment metrics. The key invariant is that unstructured zeros reduce storage and sometimes sparse-kernel work, but structured pruning changes the dense matrix shape and therefore can map to ordinary GPU speedups more directly.
Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.
Concept: Pruning: Removing Unnecessary Weights
What is the smallest example that makes Pruning: Removing Unnecessary Weights click without losing the math?
Object contextEfficiency
concept:efficiency/pruningPruning: Removing Unnecessary Weights
What is the smallest example that makes Pruning: Removing Unnecessary Weights click without losing the math?
Start with the prediction checkpoint, then compare the reveal to the mental model.
Take this moveStudy modes
Keep the object fixed; change the lens.Route back through the notebook
Carry the same object through intuition, math, code, and demo.
Reduce parameter count by zeroing or removing weights. Unstructured sparsity needs sparse kernels for speed; structured pruning removes whole channels/heads to shrink dense tensor shapes.
The next edge should feel earned: use the demo prediction here before following Quantization: Compressing Models to Integers.
After The First Pass
Turn the concept into an inspected object.
The lower panels are one second act: keep the object fixed, inspect it visually, check source boundaries, practice transfer, then attach the research question.Mechanism Storyboard
See the idea move before the page explains it
Reduce parameter count by zeroing or removing weights. Unstructured sparsity needs sparse kernels for speed; structured pruning removes whole channels/heads to shrink dense tensor shapes.

Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Pruning: Removing Unnecessary Weights should make visible.
Visual Inquiry
Make the image answer a mathematical question
Reduce parameter count by zeroing or removing weights. Unstructured sparsity needs sparse kernels for speed; structured pruning removes whole channels/heads to shrink dense tensor shapes.
Which visible object should carry the first intuition?
Pick the cue that should make Pruning: Removing Unnecessary Weights easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
What is the smallest example that makes Pruning: Removing Unnecessary Weights click without losing the math?
concept:efficiency/pruningsources: han-2015-deep-compression, li-2016-pruning-filters
Open the closest source note before trusting the local explanation.
2 selected-object sources shown first; 2 references total.
Audit the claim boundary, then ask from the same selected object.
Grounds magnitude-threshold connection pruning, retraining, sparse storage, and sparse-kernel batch-1 speed/energy benchmarks in the Deep Compression pipeline.
Han et al. prune small-weight connections below a threshold, retrain remaining sparse connections, store them as CSR/CSC, and benchmark sparse matrix-vector kernels. Li et al. show filter...
This checks the pruning-mask and deployment-distinction lesson, not exact compression ratios, full retraining schedules, measured speedups, modern pruning methods, sparse-kernel performan...
Grounds structured/filter pruning as removing whole filters and feature maps, avoiding irregular sparse connectivity, and mapping to standard dense BLAS operations.
Han et al. prune small-weight connections below a threshold, retrain remaining sparse connections, store them as CSR/CSC, and benchmark sparse matrix-vector kernels. Li et al. show filter...
This checks the pruning-mask and deployment-distinction lesson, not exact compression ratios, full retraining schedules, measured speedups, modern pruning methods, sparse-kernel performan...
Claim Review
Reduce parameter count by zeroing or removing weights. Unstructured sparsity needs sparse kernels for speed; structured pruning removes whole channels/heads to shrink dense tensor shapes.
What is the smallest example that makes Pruning: Removing Unnecessary Weights click without losing the math?
concept:efficiency/pruningsources: han-2015-deep-compression, li-2016-pruning-filters
Treat every claim as provisional until source support and a local witness agree.
1 structured claim check on this concept.
Run the prediction or practice transfer before asking for a grounded review.
Publisher-side editorial review is not independent replication. Claims without it still need exact source-support review. 2 references and 3 local witnesses are available for inspection.
Han et al. prune small-weight connections below a threshold, retrain remaining sparse connections, store them as CSR/CSC, and benchmark sparse matrix-vector kernels. Li et al. show filter pruning removes who...
This checks the pruning-mask and deployment-distinction lesson, not exact compression ratios, full retraining schedules, measured speedups, modern pruning methods, sparse-kernel performance on current hardwa...
Oracle PASS: Han supports thresholded unstructured connection pruning, masks, CSR/CSC sparse storage, and sparse-kernel benchmarking; Li supports filter/feature-map removal that avoids irregular sparsity and maps to smaller dense BLAS operations. Scope excludes exact ratios, schedules, modern hardware, universal speedups, and accuracy guarantees.
Reviewer: codex+oracle; reviewed 2026-05-07Practice notebook
Use the idea, then test it somewhere new
Reduce parameter count by zeroing or removing weights. Unstructured sparsity needs sparse kernels for speed; structured pruning removes whole channels/heads to shrink dense tensor shapes.
What is the smallest example that makes Pruning: Removing Unnecessary Weights click without losing the math?
concept:efficiency/pruningsources: han-2015-deep-compression, li-2016-pruning-filters
Use one state from Pruning: Removing Unnecessary Weights to explain what changes, why it changes, and which assumption the explanation needs.
No learner move yet; no learning state is inferred.
Write first, use only the help you need, then try a new case without it.
Use one state from Pruning: Removing Unnecessary Weights to explain what changes, why it changes, and which assumption the explanation needs.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Write an attempt before asking the companion.
0 of 3 progressive hints opened.
This draft and any AI response do not establish mastery; a later unassisted case can.
- ObjectConceptPruning: Removing Unnecessary Weights
- PredictBefore revealPruning: Removing Unnecessary Weights prediction
- WitnessCompare codePruning: Removing Unnecessary Weights code witness 1
- RoomAsk groundedChecking local snapshot
Research Room
Attach the question to an exact object
Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.Open the draft below to save one note and next action in this browser.
Pruning: Removing Unnecessary Weights
What is the smallest example that makes Pruning: Removing Unnecessary Weights click without losing the math?
These are fixed, deterministic perspectives derived from the selected object. They do not represent people, community contributions, or independent review.
Source ids han-2015-deep-compression, li-2016-pruning-filters must support the exact object, not just the surrounding topic.
Treat this as a mechanism object: connect the definition to one equation, code witness, or demo before broadening the discussion.
Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo.
The learner can state the mechanism in their own words
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays locally in this browser for concept:efficiency/pruning.
- Source ids to inspect: han-2015-deep-compression, li-2016-pruning-filters
- Definition, prerequisite, and contrast concept links
- The equation or code witness that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Pruning: Removing Unnecessary Weights Object key: concept:efficiency/pruning Context: Efficiency Anchor id: concept/concept-notebook/efficiency/pruning Open question: What is the smallest example that makes Pruning: Removing Unnecessary Weights click without losing the math? Evidence to inspect: - Source ids to inspect: han-2015-deep-compression, li-2016-pruning-filters - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan Deterministic role lenses for this object: - Boundary: fixed perspectives, not people, community contributions, or independent review - Source-checking summary: Treat this as a mechanism object: connect the definition to one equation, code witness, or demo before broadening the discussion. - Proposed experiment: Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo. - Teach/transfer move: Turn the mechanism into one sentence that predicts a neighboring concept. - Assumptions: - Source ids han-2015-deep-compression, li-2016-pruning-filters must support the exact object, not just the surrounding topic. - The stable content-object key lets local drafts, prompts, and route memory attach without changing the source page. - The concept explanation is local atlas prose until checked against its math, code, and source support. - Prerequisite gaps should become a repair route, not a reason to leave the object vague. - Role-lens requests: - Learner: ask for "Ask what would make "Pruning: Removing Unnecessary Weights" feel predictable rather than familiar." | assumption: Source ids han-2015-deep-compression, li-2016-pruning-filters must support the exact object, not just the surrounding topic. | next action: The learner can state the mechanism in their own words - Researcher: ask for "Source ids to inspect: han-2015-deep-compression, li-2016-pruning-filters" | assumption: The stable content-object key lets local drafts, prompts, and route memory attach without changing the source page. | next action: The learner can name the prerequisite that would repair confusion - Experimenter: ask for "Choose one variable or condition to perturb before asking for an explanation." | assumption: The concept explanation is local atlas prose until checked against its math, code, and source support. | next action: The learner can predict how the mechanism changes under one perturbation - Professor: ask for "Find the smallest transferable rule a learner could reuse without the AI." | assumption: Prerequisite gaps should become a repair route, not a reason to leave the object vague. | next action: Teach or transfer: Turn the mechanism into one sentence that predicts a neighboring concept. What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action. Current deterministic role lens for this object: - Role lens: Learner - Evidence request: Ask what would make "Pruning: Removing Unnecessary Weights" feel predictable rather than familiar. - Assumption to keep visible: Source ids han-2015-deep-compression, li-2016-pruning-filters must support the exact object, not just the surrounding topic. - Proposed experiment: Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo. - Next action: The learner can state the mechanism in their own words
concept/concept-notebook/efficiency/pruning
concept:efficiency/pruning