-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Closed
Description
It mentions this fine-tuning notebook like:
full stack:
Traceback (most recent call last):
File "/home/llama/train_infer/finetune_falcon7b_oasst1_with_bnb_peft.py", line 204, in <module>
trainer.train()
File "/home/.conda/envs/3.9/lib/python3.9/site-packages/transformers/trainer.py", line 1638, in train
return inner_training_loop(
File "/home/.conda/envs/3.9/lib/python3.9/site-packages/accelerate/utils/memory.py", line 132, in decorator
return function(batch_size, *args, **kwargs)
File "/home/.conda/envs/3.9/lib/python3.9/site-packages/transformers/trainer.py", line 1972, in _inner_training_loop
self.accelerator.clip_grad_norm_(
File "/home/.conda/envs/3.9/lib/python3.9/site-packages/accelerate/accelerator.py", line 1892, in clip_grad_norm_
self.unscale_gradients()
File "/home/.conda/envs/3.9/lib/python3.9/site-packages/accelerate/accelerator.py", line 1855, in unscale_gradients
self.scaler.unscale_(opt)
File "/home/.conda/envs/3.9/lib/python3.9/site-packages/torch/cuda/amp/grad_scaler.py", line 275, in unscale_
raise RuntimeError("unscale_() has already been called on this optimizer since the last update().")
RuntimeError: unscale_() has already been called on this optimizer since the last update().
refs #23914, I had upgraded the transformers to the latest commit.
transformers
version: 4.30.0.dev0Platform
: Linux-5.15.0-73-generic-x86_64-with-glibc2.31Python version
: 3.9.16Safetensors
version: 0.3.1PyTorch
version (GPU): 2.0.1+cu117 (True)peft
version: 0.4.0.dev0accelerate
version: 0.20.0.dev0bitsandbytes
version: 0.39.0
How to slove it?
MatthiasEg, ryzn0518 and dongdongunique
Metadata
Metadata
Assignees
Labels
No labels