# vainf/torch-pruning

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/vainf-torch-pruning).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

3,319 stars · 383 forks · Python · MIT

## Links

- GitHub: https://github.com/VainF/Torch-Pruning
- Homepage: https://arxiv.org/abs/2301.12900
- awesome-repositories: https://awesome-repositories.com/repository/vainf-torch-pruning.md

## Topics

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

## Description

Torch-Pruning is a deep learning model pruning tool and neural network optimization toolkit designed for PyTorch. The library analyzes neural network graphs to remove redundant parameters and channels, reducing model size and computational costs.

The framework traces computational graphs dynamically using sample inputs to map relational dependencies and identify coupled layers that require simultaneous pruning. It evaluates and ranks layer parameters across the entire network using global importance ranking and applies structural constraints to optimize overall outcomes. 

Additional capabilities include accumulating sparse training regularization gradients inside standard training loops to encourage network-wide sparsity. The toolkit also supports stepwise soft masking to control parameter zeroing iteratively instead of permanently removing network weights during pruning.

## Tags

### Artificial Intelligence & ML

- [Structured Neural Network Pruning](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization/compression-techniques/model-pruning/convolutional-channel-pruning/structured-neural-network-pruning.md) — Reducing the size of deep learning models by removing unnecessary parameters and channels to lower memory and compute costs.
- [Convolutional Channel Pruning](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization/compression-techniques/model-pruning/convolutional-channel-pruning.md) — Removes interconnected channels simultaneously based on specified ratios to reduce overall model size and computational costs.
- [Deep Learning Pruning Toolkits](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization/compression-techniques/model-pruning/deep-learning-pruning-toolkits.md) — A utility that analyzes neural network graphs to remove redundant parameters and accelerate model execution.
- [PyTorch Pruning Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization/compression-techniques/model-pruning/pytorch-pruning-frameworks.md) — A framework for tracing dependencies and structurally pruning channels in deep learning models to reduce size and computation.
- [Parameter Dependency Tracers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-parameters/parameter-sampling/conditional-parameter-dependencies/parameter-dependency-tracers.md) — Analyze neural network structures using automated tracing to detect coupled parameters that require simultaneous pruning. ([source](https://github.com/vainf/torch-pruning#readme))
- [Neural Network Toolkits](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-network-research/neural-network-toolkits.md) — A library for evaluating layer importance and applying structural constraints to improve deep learning efficiency.
- [PyTorch Model Optimizations](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-model-optimizations.md) — Optimizing neural network efficiency through structured sparsity techniques and regularization during training loops.
- [Global Importance Rankings](https://awesome-repositories.com/f/artificial-intelligence-ml/feature-importance-ranking/global-importance-rankings.md) — Evaluates and ranks layer parameters across the entire network to apply structural constraints and optimize pruning outcomes.
- [Interactive Pruning Controls](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/machine-learning-training/pipelines-and-orchestration/training-orchestration-systems/training-loop-managers/step-by-step-execution-controls/interactive-pruning-controls.md) — Control and monitor soft masking by applying step-by-step parameter zeroing instead of permanently removing network weights. ([source](https://github.com/vainf/torch-pruning#readme))
- [Sparsity Regularization](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/hardware-and-acceleration/tensor-computing-libraries/tensor-operations/sparse-tensor-representations/sparsity-regularization.md) — Accumulates regularization gradients inside standard training loops to encourage network-wide sparsity and improve model efficiency.
- [Global Layer Pruning Optimizers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization/compression-techniques/model-pruning/pruning-ratio-optimization/global-layer-pruning-optimizers.md) — Perform global importance ranking across network layers and apply structural constraints to optimize overall pruning results. ([source](https://github.com/vainf/torch-pruning#readme))

### Development Tools & Productivity

- [Neural Network Dependency Analyzers](https://awesome-repositories.com/f/development-tools-productivity/build-graph-processors/dependency-graph-analysis/neural-network-dependency-analyzers.md) — Tracing computational graphs in deep networks to automatically identify relational layer dependencies and coupled parameters.
- [Model](https://awesome-repositories.com/f/development-tools-productivity/workflow-automations/task-decompositions/dependency-graph-generators/model.md) — Trace computational graphs using sample inputs to automatically identify relational layer dependencies within neural networks. ([source](https://github.com/VainF/Torch-Pruning/wiki/3.-DepGraph-&-Group))

### DevOps & Infrastructure

- [Computational Graph Tracers](https://awesome-repositories.com/f/devops-infrastructure/dependency-graph-engines/module-dependency-graphs/computational-graph-tracers.md) — Traces computational graphs dynamically using sample inputs to map relational dependencies and coupled layers across neural networks.

### Data & Databases

- [Stepwise Soft Masking Mechanisms](https://awesome-repositories.com/f/data-databases/soft-deletion-systems/stepwise-soft-masking-mechanisms.md) — Controls parameter zeroing iteratively through soft masks rather than permanently removing network weights during pruning.
