Skip to content

Commit

Permalink
Merge branch 'feat/fstp' of github.com:yingtongxiong/InternLM into fe…
Browse files Browse the repository at this point in the history
…at/fstp
  • Loading branch information
chenxun.p committed Oct 17, 2023
2 parents 6682f5d + 4e99a7f commit b51cf4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internlm/train/training_internlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,4 +576,8 @@ def record_current_batch_training_metrics(
tgs_list.append(tgs_origin)
if batch_count == gpc.config.data.total_steps - 1:
print(tgs_list, flush=True)
avg_tgs = sum(tgs_list) / len(tgs_list)
for tgs in tgs_list.copy():
if abs(tgs - avg_tgs) > 1000:
tgs_list.remove(tgs)
print(f"avg_tgs: {sum(tgs_list)/len(tgs_list)}", flush=True)

0 comments on commit b51cf4e

Please sign in to comment.