VainF / Torch-Pruning

[CVPR 2023] DepGraph: Towards Any Structural Pruning
https://arxiv.org/abs/2301.12900
MIT License
2.75k stars 337 forks source link

Can Torch-Pruning be applied to Transformer models ? #40

Open SefaZeng opened 3 years ago

SefaZeng commented 3 years ago

I try to follow the example to prune the transformer model, but the layer-norm always gets a size mismatch error.

VainF commented 3 years ago

Hi @SefaZeng , layer-norm is unfortunately not supported yet. We are working on that to support more architectures like Transformer.

watts4speed commented 3 years ago

I'd like to second the request for support for transformers. This is a really important blocker for my projects. Great tool thanks for doing it.

VainF commented 3 years ago

Hi, FFN pruning for transformers has been supported in the latest version.