Skip to content

fix(testing): Fix PaliGemma 2 and PaddleOCR-VL test failures on main#44765

Merged
Rocketknight1 merged 2 commits intohuggingface:mainfrom
harshaljanjani:fix/paligemma2-paddleocr-vl-test-failures
Mar 20, 2026
Merged

fix(testing): Fix PaliGemma 2 and PaddleOCR-VL test failures on main#44765
Rocketknight1 merged 2 commits intohuggingface:mainfrom
harshaljanjani:fix/paligemma2-paddleocr-vl-test-failures

Conversation

@harshaljanjani
Copy link
Copy Markdown
Contributor

@harshaljanjani harshaljanjani commented Mar 16, 2026

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 in inputs_dict), which is missing from the PaliGemma 2 test class, even though token_type_ids is assigned there as well; causes ValueError
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:

1

cc: @Rocketknight1

CI Failures

Before the fix (feel free to cross-check; these errors are reproducible):

3

After the fix (feel free to cross-check):

2

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you fix any necessary existing tests?

@harshaljanjani harshaljanjani marked this pull request as ready for review March 16, 2026 17:28
@github-actions github-actions Bot requested a review from ydshieh March 16, 2026 17:28
@harshaljanjani
Copy link
Copy Markdown
Contributor Author

cc: @Rocketknight1 Just a gentle ping :)

@Rocketknight1 Rocketknight1 force-pushed the fix/paligemma2-paddleocr-vl-test-failures branch from b1d8eca to 78277b0 Compare March 18, 2026 16:34
Copy link
Copy Markdown
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks good to me! The 70% behaviour for device_map is interesting (cc @SunMarc) but the skips are fine for now

@Rocketknight1 Rocketknight1 enabled auto-merge March 18, 2026 16:38
@github-actions
Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: paddleocr_vl, paligemma2

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

@Rocketknight1 Rocketknight1 added this pull request to the merge queue Mar 18, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 18, 2026
@harshaljanjani
Copy link
Copy Markdown
Contributor Author

harshaljanjani commented Mar 19, 2026

cc: @Rocketknight1 Apologies for the ping, but it looks like the PR was removed from the merge queue :)

@Rocketknight1 Rocketknight1 added this pull request to the merge queue Mar 19, 2026
@Rocketknight1
Copy link
Copy Markdown
Member

I'll throw it in again!

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 19, 2026
@Rocketknight1 Rocketknight1 added this pull request to the merge queue Mar 20, 2026
Merged via the queue into huggingface:main with commit 8112850 Mar 20, 2026
22 checks passed
@harshaljanjani harshaljanjani deleted the fix/paligemma2-paddleocr-vl-test-failures branch March 20, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants