# Gradient\_checkpointing control

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradient-checkpointing-control%2F50203%3E%5C
**Category:** 🤗Transformers\
**Created:** [August 10, 2023, 1:05am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradient-checkpointing-control%2F50203 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKenkentron)%5C
**Post date:** [August 10, 2023, 1:05am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradient-checkpointing-control%2F50203%2F1 "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!
