liveBook · Manning

Pruning

As explained in LLMs in Production

Structured pruning removes whole structural components of a neural network, such as filters, channels, or layers.

A large language model can contain parameters that contribute little to its performance. Pruning reduces the model by identifying parts judged less useful. The practical question is what to remove: whole components, or individual parameter values. section 3.3.1

Two approaches make different trade-offs:

  • Structured pruning removes components such as filters, channels, or layers. It leaves the model’s basic structure intact while reducing computation, preserving hardware efficiencies and improving latency. section 3.3.1
  • Unstructured pruning sets less important parameters to zero rather than removing them. Weights or activations already near zero are a possible starting point, but setting a value to zero is not the same as removing a component. section 3.3.1

Pruning is one way to make an LLM smaller and easier to deploy alongside quantization and knowledge distillation. For a latency-sensitive deployment, the distinction between removing computations and merely zeroing values matters. section 3.3.1 section 3.5

How LLMs in Production covers it

How deep it goes
Defines structured and unstructured pruning and compares their effects, but gives no implementation procedure.
Examples
Uses filters, channels, and layers as removable components, and near-zero weights or activations as possible zeroing candidates.
What you can do after
Evaluate/understand whether removing structural components or zeroing parameters better matches a deployment goal.
How it connects
Relates pruning to model compression, quantization, knowledge distillation, and hardware efficiency.

Also explained in

Compare how 7 books explain pruning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.