OpenBMB / BMTrain

Efficient Training (including pre-training and fine-tuning) for Big Models
Apache License 2.0
548 stars 74 forks source link

fix scale loss logic #194

Closed MayDomine closed 5 months ago

MayDomine commented 5 months ago

Fix scale loss logic

Description

Scale formula changes from loss = loss / dp_size to loss / (dp_size * tp_size).

Type of Change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist