src/transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py/GPTNeoXJapanesePreTrainedModel/_set_gradient_checkpointing
class GPTNeoXJapanesePreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, GPTNeoXJapaneseModel):
            module.gradient_checkpointing = value