[Fix] Allow default TIS function usage when get_mismatch_metrics is set#1483
Open
eecspan wants to merge 1 commit intoTHUDM:mainfrom
Open
[Fix] Allow default TIS function usage when get_mismatch_metrics is set#1483eecspan wants to merge 1 commit intoTHUDM:mainfrom
eecspan wants to merge 1 commit intoTHUDM:mainfrom
Conversation
561138c to
95ce13a
Compare
95ce13a to
8ab1e82
Compare
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.
Description
This PR addresses a logical conflict between
slime/utils/arguments.pyandslime/backends/megatron_utils/loss.py.Motivation
Previously,
slime_validate_argsenforced a strict assertion thatcustom_tis_function_pathmust be provided whenget_mismatch_metricsis enabled. However, the backend logic inloss.pyexplicitly supports a fallback tovanilla_tis_functionwhen no custom path is provided.Since
vanilla_tis_functioncorrectly computes and returns metrics (e.g.,tis,tis_clipfrac), the previous assertion unnecessarily prevented users from observing mismatch metrics using the default implementation.Modification
slime/utils/arguments.pywith a warning.get_mismatch_metricsis set without a custom path, the system warns the user (for visibility) and correctly falls back to the default TIS function instead of raising an error.