Extend max_model_length to prevent context truncation#463
Open
eldarkurtic wants to merge 1 commit intohuggingface:mainfrom
Open
Extend max_model_length to prevent context truncation#463eldarkurtic wants to merge 1 commit intohuggingface:mainfrom
eldarkurtic wants to merge 1 commit intohuggingface:mainfrom
Conversation
lewtun
reviewed
Mar 27, 2025
Member
lewtun
left a comment
There was a problem hiding this comment.
Thanks for the fix @eldarkurtic! Do you see much variation in the evaluation scores once this is included? I believe some of the Qwen models were trained with 32k context, so once we exceed this the model may start producing gibberish.
Author
|
I've never done a full eval to compare the two because I stopped using 32k as soon as I saw the warning that prompt has been truncated to 0 tokens But definitely a good point for Qwen models. I assume this could be up to user to decide based on their chosen model for evals. |
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.
With the existing example command for evaluation, both
max_model_lengthandmax_new_tokensare set to the same value of32768. This produces the following warning:We need to increase the
max_model_lengthto a larger value to prevent truncating the context. I ran some tests and the proposed38768seems to be large enough for all three tasks I've tested so far: AIME, MATH-500, and GPQA-Diamond.