Repository navigation
Skip the InternVL tile count for models that split their images by image_grid_thw - #8484
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This was referenced Nov 20, 2026
albertvillanova
approved these changes
Nov 20, 2026
AmineDiro
approved these changes
Nov 20, 2026
Member
Author
|
Thanks! Fixed the body. I'll merge this one first and drop the three |
qgallouedec
added a commit
that referenced
this pull request
Nov 20, 2026
#8484 fixed the image tiles. transformers < 5.24 loads the dequantized checkpoint in mixed dtypes, and dequantizing the MXFP8 experts drops their scales, which breaks DPO, KTO and GRPO on main too.
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.
Part of #8497.
GRPO, RLOO and Distillation guess InternVL from the shape of
pixel_values(4-D, more rows than images), then call the image processor withcrop_to_patches=Trueto count its tiles. Inkling 2 (transformers 5.23) also returns 4-Dpixel_values, one row per patch, so GRPO and RLOO crash at the first step on image data:TypeError: ImagesKwargs.__init__() got an unexpected keyword argument 'crop_to_patches'.Models with
image_grid_thware already split by their grid (split_pixel_values_by_gridchecks it first), so the InternVL branch now skips them.One GRPO and one RLOO step on a tiny Inkling 2 crash on main and pass here. #8498 adds that model to the tests.