VainF/Torch-Pruning
[CVPR 2023] DepGraph: Towards Any Structural Pruning; LLMs, Vision Foundation Models, etc. observed · 2026-08-28
Health v2 · maintenance only
50/100
- Activity 40
- Release rhythm 34
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 52.5
- age_days: 2453
- days_rel: 360
- days_push: 360
- n_releases_24m: 7
Adoption not part of the score
3348 stars · 385 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Torch-Pruning is a PyTorch framework for structural neural network pruning based on the DepGraph algorithm from CVPR 2023. It automatically groups coupled parameters across arbitrary architectures (CNNs, Transformers, LLMs, etc.) and physically removes them to compress and accelerate models.
Use cases
- prune a pytorch model to make it faster and smaller
- compress large language models with structural pruning
- prune huggingface transformers or timm models
- remove channels from a resnet or vision transformer
- speed up inference by slimming yolov8 or sam models
- compare pruning criteria like magnitude or taylor on my network
When to choose
- you need architecture-agnostic structural pruning that physically removes parameters rather than masking them
- you want to prune modern architectures like ViTs, LLMs, diffusion models, or detection models
- you need a research-grade toolkit with many ready-made pruning examples
When to avoid
- you only need unstructured sparsity or weight masking, which torch.nn.utils.prune already covers
- you need post-training quantization or distillation rather than pruning
- you work outside PyTorch, e.g. TensorFlow or JAX
Facets
library · maturity active
machine-learning deep-learning developer-tools deep-learning machine-learning computer-vision large-language-models python cross-platform pruning model-compression pytorch depgraph structural-pruning model-acceleration transformers llm gpu
7 sources
- readme: https://github.com/VainF/Torch-Pruning · fetched 2026-08-28 · 39ac051e1713
- homepage: https://arxiv.org/abs/2301.12900 · fetched 2026-08-29 · 7abb31cdc08a
- site_page: https://info.arxiv.org/about/donate.html · fetched 2026-08-29 · cca9c3a11c56
- site_page: https://info.arxiv.org/about/ourmembers.html · fetched 2026-08-29 · 47cbc55ff1de
- site_page: https://info.arxiv.org/about · fetched 2026-08-29 · a1f16f915a9a
- registry_pypi: https://pypi.org/pypi/torch-pruning/json · fetched 2026-08-29 · fd5940584618
- site_page: https://info.arxiv.org/labs/index.html · fetched 2026-08-29 · b14a8d05a0ec
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| VainF/Torch-Pruning | main | 50 |
For agents
markdown · JSON · MCP: product_card(name="VainF/Torch-Pruning")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem