Skip to content

Token#40857

Open
ArkVex wants to merge 5 commits intohuggingface:mainfrom
ArkVex:token
Open

Token#40857
ArkVex wants to merge 5 commits intohuggingface:mainfrom
ArkVex:token

Conversation

@ArkVex
Copy link
Copy Markdown
Contributor

@ArkVex ArkVex commented Sep 12, 2025

What does this PR do?

This PR fixes the calculation of train_tokens_per_second when resuming training from a checkpoint. Previously, the metric was calculated using global state, which could result in unrealistically high values after resuming. Now, the timer and token counters are reset when resuming, so the metric reflects only the current training session.

Fixes #40560

Before submitting

Who can review?

@zach-huggingface @ArthurZucker ,

@ArkVex
Copy link
Copy Markdown
Contributor Author

ArkVex commented Sep 12, 2025

Hey @ArthurZucker i have another pr open what shall i do?
If you merge this both will get merged right?

Copy link
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, sorry I don't understandyour question as I only see this PR linked to this issue

Comment thread docs/source/en/model_doc/megatron_bert.md
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

Successfully merging this pull request may close these issues.

train_tokens_per_second is wrong after continuing from checkpoint

3 participants