Text Generation
Transformers
PyTorch
Safetensors
English
gpt_refact
code
custom_code
Eval Results
svakhreev commited on
Commit
a2b605b
1 Parent(s): fa166e1

Update modeling_gpt_refact.py

Browse files
Files changed (1) hide show
  1. modeling_gpt_refact.py +2 -2
modeling_gpt_refact.py CHANGED
@@ -508,9 +508,9 @@ class GPTRefactForCausalLM(GPTRefactPreTrainedModel):
508
  import transformers
509
  from packaging import version
510
 
511
- def _set_gradient_checkpointing(module, enable=False):
512
  if isinstance(module, GPTRefactModel):
513
- module.gradient_checkpointing = enable
514
 
515
  v = version.parse(transformers.__version__)
516
  if v.major <= 4 and v.minor < 35:
 
508
  import transformers
509
  from packaging import version
510
 
511
+ def _set_gradient_checkpointing(module, value=False):
512
  if isinstance(module, GPTRefactModel):
513
+ module.gradient_checkpointing = value
514
 
515
  v = version.parse(transformers.__version__)
516
  if v.major <= 4 and v.minor < 35: