fix(testing): Fix PaliGemma 2 and PaddleOCR-VL test failures on main#44765
Merged
Rocketknight1 merged 2 commits intohuggingface:mainfrom Mar 20, 2026
Merged
Conversation
Contributor
Author
|
cc: @Rocketknight1 Just a gentle ping :) |
b1d8eca to
78277b0
Compare
Rocketknight1
approved these changes
Mar 18, 2026
Member
Rocketknight1
left a comment
There was a problem hiding this comment.
Yep, looks good to me! The 70% behaviour for device_map is interesting (cc @SunMarc) but the skips are fine for now
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: paddleocr_vl, paligemma2 |
|
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. |
Contributor
Author
|
cc: @Rocketknight1 Apologies for the ping, but it looks like the PR was removed from the merge queue :) |
Member
|
I'll throw it in again! |
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?
The following failing tests were identified and fixed in this PR:
→ PaliGemma 2: The PaliGemma 1 test class contains
additional_model_inputs = ["token_type_ids"](needed since"token_type_ids": torch.zeros_like(input_ids)is present ininputs_dict), which is missing from the PaliGemma 2 test class, even though token_type_ids is assigned there as well; causesValueError→ PaddleOCR-VL: The base offload tests expect the model to split across GPU and CPU. Since the PR "Do not use accelerate hooks if the device_map has only 1 device", hf_device_map is only set inside this path. At the 70% split, the GPU budget (11.6MB) cannot fit
embed_tokens(13.2MB), so get_balanced_memory places everything on the CPU and we end up with a single-device map. I think this also happens to be the same limitation handled in the Qwen2-VL tests (albeit with a vaguely listed reason); but PaddleOCR-VL was added later in 8c84144 without the corresponding skips. I found the limitation by instrumenting the code as follows:cc: @Rocketknight1
CI Failures
Before the fix (feel free to cross-check; these errors are reproducible):
After the fix (feel free to cross-check):
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.