Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'BF16_Optimizer' object has no attribute 'cur_scale' #121

Open
xin0623 opened this issue May 7, 2024 · 2 comments
Open

Comments

@xin0623
Copy link

xin0623 commented May 7, 2024

The error occurred when I tried to fine-tune in single_modality

Traceback (most recent call last):
File "run_finetuning.py", line 719, in
main(opts, ds_init)
File "run_finetuning.py", line 636, in main
train_stats = train_one_epoch(
File "/mnt2/xiayingxin/InternVideo/InternVideo2/single_modality/engines/engine_for_finetuning.py", line 92, in train_one_epoch
loss_scale_value = get_loss_scale_for_deepspeed(model)
File "/mnt2/xiayingxin/InternVideo/InternVideo2/single_modality/engines/engine_for_finetuning.py", line 22, in get_loss_scale_for_deepspeed
return optimizer.loss_scale if hasattr(optimizer, "loss_scale") else optimizer.cur_scale
AttributeError: 'BF16_Optimizer' object has no attribute 'cur_scale'

@Andy1621
Copy link
Collaborator

Andy1621 commented May 7, 2024

Can you provide your DeepSpeed version?

@xin0623
Copy link
Author

xin0623 commented May 8, 2024

deepspeed==0.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants