# How to prune albert model?

**URL:** <https://discuss.huggingface.co/t/how-to-prune-albert-model/14968>\
**Category:** Beginners\
**Created:** [February 21, 2022, 11:27am UTC](https://discuss.huggingface.co/t/how-to-prune-albert-model/14968 "2022-02-21T11:27:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ck23](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@ck23](https://discuss.huggingface.co/u/ck23)\
**Post date:** [February 21, 2022, 11:27am UTC](https://discuss.huggingface.co/t/how-to-prune-albert-model/14968/1 "2022-02-21T11:27:10Z")

</div>

I am creating a model using albert transformer to retrain on a own corpus dataset. To increase the inference I need to prune the model. Is there a function to prune the weights or heads ?
