Set --auto-truncate to true by default#829
Merged
alvarobartt merged 1 commit intomainfrom Feb 17, 2026
Merged
Conversation
kozistr
approved these changes
Feb 16, 2026
| // Raise an error when max_input_length is bigger than max_batch tokens to prevent an infinite loop in the queue | ||
| let max_input_length = if base_input_length > max_batch_tokens { | ||
| if !auto_truncate { | ||
| anyhow::bail!( |
Contributor
There was a problem hiding this comment.
maybe, we could change this to tracing::warn if we want to do it silently!
Suggested change
| anyhow::bail!( | |
| tracing::warn!( |
Member
Author
There was a problem hiding this comment.
Note that given than now --auto-truncate defaults to true, this will only panic when --auto-truncate false is provided and the max-model-len is greater than the --max-batch-tokens, so failing makes sense! The warning message would only apply when --auto-truncate is true or not provided.
Contributor
There was a problem hiding this comment.
oh you're right. I misunderstood for a moment, thought it shouldn't be a panic when auto-truncate is false. Thanks for checking it!
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 sets the default value of
--auto-truncatetotrueinstead offalseand instead ofanyhow::bail!it just prints atracing::warn!message when--auto-truncate falseand the--max-batch-tokensis lower than the maximum input length. This PR helps reduce the failures when the model maximum input length is greater than the default--max-batch-tokens, leading to an increased deployment success rate on models without any arg other than the--model-id.Thanks @vrdn-23, @michaelfeil and @kozistr for the feedback!
Before submitting
instasnapshots?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.