# Gradient\_checkpointing control

**URL:** <https://discuss.huggingface.co/t/gradient-checkpointing-control/50203>\
**Category:** 🤗Transformers\
**Created:** [August 10, 2023, 1:05am UTC](https://discuss.huggingface.co/t/gradient-checkpointing-control/50203 "2023-08-10T01:05:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenkentron](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@Kenkentron](https://discuss.huggingface.co/u/Kenkentron)\
**Post date:** [August 10, 2023, 1:05am UTC](https://discuss.huggingface.co/t/gradient-checkpointing-control/50203/1 "2023-08-10T01:05:57Z")

</div>

Hi community,

I have a basic intuition about how gradient\_checkpointing works which only saves activations at some layers and recompute those are not saved during backprop in exchange of memory efficiency.

I wonder how gradient\_checkpointing is actually being handled under the hood and if there is any way to control its behavior such as if I want to reduce the extent of checkpointing etc.

Thanks!
