#141 · Primary category: Deep Learning Frameworks

Torch-Pruning

efficient-deep-learning llm model-compression pruning transformers vision

[CVPR 2023] DepGraph: Towards Any Structural Pruning; LLMs, Vision Foundation Models, etc.

Project last updated:09/07/25

GitHub Stars

3.3K

Forks

386

Contributors

19

License

MIT

Why we included this project

Trimming a trained network is trickier than it looks because layers are coupled: remove the output channels of one layer and the next layer's inputs must shrink to match, so naive masking rarely delivers real speedups. Torch-Pruning automates that bookkeeping with a dependency-graph approach that finds coupled parameters and removes them as complete groups, letting you shrink real architectures instead of just zeroing weights. Teams with a working PyTorch model, whether a large language model, a Vision Transformer, a CNN detector, or even a diffusion model, can use it to cut size and latency while keeping accuracy close to the original. The repo ships runnable examples for models from Hugging Face, Timm, and Torchvision, and the underlying DepGraph method comes from published CVPR 2023 research, which helps when you want to trust or extend the mechanics. If you need to squeeze a model onto memory- or compute-constrained hardware, this is a practical, general-purpose place to start.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category