VainF/Torch-Pruning
[CVPR 2023] DepGraph: Towards Any Structural Pruning; LLMs, Vision Foundation Models, etc.
Leverages DepGraph, a dependency-aware algorithm that automatically identifies and groups coupled parameters across layers to enable true structural pruning—removing entire channels/filters rather than masking individual weights. Supports diverse architectures including LLMs (Llama, Qwen, DeepSeek), vision transformers, diffusion models, and detection frameworks, with examples from Huggingface, Timm, and Torchvision. Provides both high-level pruning APIs for common strategies (global, isomorphic, sparse training) and low-level functions for custom pruning workflows on PyTorch 1.x and 2.x.
3,267 stars and 21,337 monthly downloads. Used by 1 other package. No commits in the last 6 months. Available on PyPI.
Stars
3,267
Forks
374
Language
Python
License
MIT
Category
Last pushed
Sep 07, 2025
Monthly downloads
21,337
Commits (30d)
0
Dependencies
2
Reverse dependents
1
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/transformers/VainF/Torch-Pruning"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related models
peremartra/optipfair
Structured pruning and bias visualization for Large Language Models. Tools for LLM optimization...
horseee/LLM-Pruner
[NeurIPS 2023] LLM-Pruner: On the Structural Pruning of Large Language Models. Support...
CASIA-LMC-Lab/FLAP
[AAAI 2024] Fluctuation-based Adaptive Structured Pruning for Large Language Models
princeton-nlp/LLM-Shearing
[ICLR 2024] Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruning
VITA-Group/LiGO
[ICLR 2023] "Learning to Grow Pretrained Models for Efficient Transformer Training" by Peihao...