fix: add loss_agg_mode to critics#1340
Merged
vermouth1992 merged 6 commits intoverl-project:mainfrom May 23, 2025
Merged
Conversation
3 tasks
ETOgaosion
previously approved these changes
May 1, 2025
vermouth1992
reviewed
May 1, 2025
verl/trainer/ppo/core_algos.py
Outdated
|
|
||
|
|
||
| def compute_entropy_loss(logits, response_mask): | ||
| def compute_entropy_loss(entropy: torch.Tensor, response_mask: torch.Tensor, loss_agg_mode: str): |
Collaborator
There was a problem hiding this comment.
This function changes the semantics of compute_entropy_loss, which may break others code if they use it in their own codebase,
Collaborator
Author
There was a problem hiding this comment.
Thanks for your suggestion! I will fix it!
Collaborator
Author
There was a problem hiding this comment.
Taking backward compatibility for consideration, I decide to keep the default values and remove the functions for token-wise losses like entropy_loss and kl_loss. For now, this PR only adds loss_agg_mode to critics.
loss_agg_model to critics
loss_agg_model to criticsloss_agg_mode to critics
vermouth1992
approved these changes
May 23, 2025
ETOgaosion
pushed a commit
to Jianbing-D/verl
that referenced
this pull request
Jun 8, 2025
# What does this PR do? This PR adds `loss_agg_mode` to critics. # Before submitting - [x] Did you read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide) and finish the [code format check](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting)? - [x] Did you make sure to update the documentations with your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs) especially for breaking config etc? - [x] Did you write any test cases if neccessary? Please add CI tests to your new feature. # Additional Info - **Issue Number**: none - **Training**: both - **Inference**: none
wwwjn
pushed a commit
to wwwjn/verl
that referenced
this pull request
Jun 10, 2025
# What does this PR do? This PR adds `loss_agg_mode` to critics. # Before submitting - [x] Did you read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide) and finish the [code format check](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting)? - [x] Did you make sure to update the documentations with your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs) especially for breaking config etc? - [x] Did you write any test cases if neccessary? Please add CI tests to your new feature. # Additional Info - **Issue Number**: none - **Training**: both - **Inference**: none
chenjiaoAngel
added a commit
to chenjiaoAngel/verl
that referenced
this pull request
Nov 14, 2025
# What does this PR do? This PR adds `loss_agg_mode` to critics. # Before submitting - [x] Did you read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide) and finish the [code format check](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting)? - [x] Did you make sure to update the documentations with your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs) especially for breaking config etc? - [x] Did you write any test cases if neccessary? Please add CI tests to your new feature. # Additional Info - **Issue Number**: none - **Training**: both - **Inference**: none
TimurTaepov
pushed a commit
to giorgossideris/verl
that referenced
this pull request
Dec 20, 2025
# What does this PR do? This PR adds `loss_agg_mode` to critics. # Before submitting - [x] Did you read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide) and finish the [code format check](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting)? - [x] Did you make sure to update the documentations with your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs) especially for breaking config etc? - [x] Did you write any test cases if neccessary? Please add CI tests to your new feature. # Additional Info - **Issue Number**: none - **Training**: both - **Inference**: none
vyomakesh0728
added a commit
to vyomakesh0728/verl
that referenced
this pull request
Jan 22, 2026
# What does this PR do? This PR adds `loss_agg_mode` to critics. # Before submitting - [x] Did you read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide) and finish the [code format check](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting)? - [x] Did you make sure to update the documentations with your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs) especially for breaking config etc? - [x] Did you write any test cases if neccessary? Please add CI tests to your new feature. # Additional Info - **Issue Number**: none - **Training**: both - **Inference**: none
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds
loss_agg_modeto critics.Before submitting
Additional Info