Repository navigation
fix: Fix Granite4 Vision regression based on n_tokens counting - #24733
Closed
gabe-l-hart wants to merge 1 commit into
Closed
gabe-l-hart wants to merge 1 commit into
gabe-l-hart wants to merge 1 commit into
Conversation
This likely isn't quite right for actual multi-image batches. Branch: FixLlavaNextNTokens AI-usage: none Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Collaborator
Author
|
Closing in favor of #24732 |
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.
Draft Status
We're actively getting our GGUF models published, and I'll add a test against them in the future so we can catch this. I'll take this out of draft once I have the test in place.
Overview
The fix in #24656 was added to correctly account for batch size when users submit multi-image batches, but in the process it broke Granite4 Vision (and any future llava-next style model) which uses the batch dimension to hold the image tiles without textual delimiters.
#24656 (comment)
#24656 (comment)
Additional information
This is the least-invasive fix I could come up with. I considered setting
n_temporal_mergeinstead, but that would need to be dynamic based on the tile grid logic and the input image size/shape. The downside of the current solution is that it likely prevents proper counting for multi-image batches for these models. Currently G4V doesn't support multi-image queries, so that isn't a strong functional requirement, but could be a problem in the future.Requirements