Skip to content

Conversation

@SonuDixit
Copy link

What does this PR do?

current_gradient_accumulation_step is initialised in transformers trainer.train(), and the same is used in trl grpotrainer to scale loss and gradients.
Since the variable is initialised inside train function, and not in init, the variable is missing if we don't train and start evaluation.

Fixes # (#4669)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a GitHub issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@SonuDixit SonuDixit changed the title loss scaling in eval_on_start loss calculation for evaluation without training Dec 11, 2025
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.

1 participant