Skip to content

Fix more stuff - #48979

Merged
zucchini-nlp merged 51 commits into
mainfrom
fix-more-stuff
Sep 21, 2026
Merged

zucchini-nlp merged 51 commits into
mainfrom
fix-more-stuff

Conversation

@zucchini-nlp

@zucchini-nlp zucchini-nlp commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

CPU CI GPU run-slow

What does this PR do?

as per title

airlsyn and others added 30 commits September 9, 2026 09:28
…kwargs instead of recomputing the packed max length inline
…are expected to come from a user data collator
…is one temporal sequence and was trained without them
… drop the input sanity checks the processor already guarantees
…ids no longer crash

The vectorised merge lifted one (h, w) from target_sizes[0] and reshaped the
whole batch against it. MiniCPM-V slicing emits a global thumbnail grid next to
the slice grids, and the two differ whenever the image is not square-ish, e.g.
896x448 at max_slice_nums=9 gives [[24, 44], [32, 32], [32, 32]] and the view()
raises. Merge each image against its own grid instead, matching the pre-#46738
behaviour.
Pins the token count a slicing batch produces when the thumbnail grid disagrees
with the slice grids, and checks that an image merges the same way regardless of
what else is packed next to it.
* Pin the canvas M-RoPE layouts with golden position ids

Snapshot of the exact (3, batch, seq) coordinates for every layout the processor
can emit, taken before refactoring the canvas internals. Verified identical to the
pre-review implementation, so the numbers describe intended behaviour rather than
the current code.

* Return the cached-delta positions while decoding and drop a debug print

* Derive the LLM grid from config.downsample_mode instead of counting tokens

* Build the canvas from `mm_token_type_ids` and fold the video path into the image one

* Let the LLM grid follow the per-call downsample_mode

* Group adjacent frames whatever their modality

* Drop the unused special_token_ids argument and fix the return-shape docstring

* Drop the unreachable grid fallbacks and inline the one-line grid helper
* Keep the per-sample mrope grids out of tensor stacking and run the merger test on the accelerator

* Pad the per-sample mrope grids into one tensor and refresh the video slice-mode token count

* Regenerate the processing file so the new property sits where the converter puts it

* Point the integration tests at MiniCPM-V-4.7 and refresh the expected generations
@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.

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN e4796a27 workflow commit (merge commit)
PR 4be9217a branch commit (from PR)
main d67c7293 base commit (on main)

Model CI Report

❌ 5 new failed tests from this PR 😭

  • minicpmv4_7:
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_logits (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_video_generation (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_vision_generation (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_vision_generation_batch (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_vision_generation_batch_mixed (✅ ⟹ ❌)

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (Nvidia)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN e4796a27 workflow commit (merge commit)
PR 4be9217a branch commit (from PR)
main d67c7293 base commit (on main)

Model CI Report

❌ 13 new failed tests from this PR 😭

  • minicpmv4_7:
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7ModelTest::test_onnx_export_dynamic (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7ModelTest::test_onnx_export_generate_dynamic (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7ModelTest::test_onnx_export_generate_static (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7ModelTest::test_onnx_export_static (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7ModelTest::test_torch_export_dynamic (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7ModelTest::test_torch_export_generate_dynamic (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7ModelTest::test_torch_export_generate_static (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7ModelTest::test_torch_export_static (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_logits (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_video_generation (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_vision_generation (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_vision_generation_batch (✅ ⟹ ❌)
    tests/models/minicpmv4_7/test_modeling_minicpmv4_7.py::MiniCPMV4_7IntegrationTest::test_small_model_vision_generation_batch_mixed (✅ ⟹ ❌)

@github-actions

Copy link
Copy Markdown
Contributor

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

run-slow: auto, minicpmv4_6, minicpmv4_7

@zucchini-nlp
zucchini-nlp added this pull request to the merge queue Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 35584855986:1
Result: success | Jobs: 16 | Tests: 191,001 | Failures: 1 | Duration: 14h 26m

Merged via the queue into main with commit c210bb3 Sep 21, 2026
215 of 217 checks passed
@zucchini-nlp
zucchini-nlp deleted the fix-more-stuff branch September 21, 2026 10:21
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.

4 participants