Skip to content

[serge] Fix 4 integration tests for model minicpm3 failing with other (other (4)) - #49041

Closed
sergereview[bot] wants to merge 1 commit into
mainfrom
serge/fix/itf-c2e317fbf5e9-70d71d4e
Closed

sergereview[bot] wants to merge 1 commit into
mainfrom
serge/fix/itf-c2e317fbf5e9-70d71d4e

Conversation

@sergereview

@sergereview sergereview Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

CPU CI GPU run-slow

Original CI failure

  • Failure group: 4 integration tests for model minicpm3failing withother (other (4))
  • tests/models/minicpm3/test_modeling_minicpm3.py::MiniCPM3IntegrationTest::test_minicpm3_4b_generation [multi-gpu] (other, seen 7/7)
CI traceback — tests/models/minicpm3/test_modeling_minicpm3.py::MiniCPM3IntegrationTest::test_minicpm3_4b_generation
(line 199)  KeyError: 'factor'

Where to watch it:

The MiniCPM3 integration tests crash during from_pretrained because MiniCPM3Attention inherits a yarn_apply_mscale helper that unconditionally reads rope_parameters["factor"].
The MiniCPM3-4B checkpoint uses rope_type="longrope" and does not set factor, so the access raises KeyError.
The helper only needs factor when mscale_all_dim is set, so move the read inside that branch.
This override in the modular file fixes the crash without touching other models that share the copied helper.

Relates to #49034


✅ Verified on GPU

serge ran the targeted @slow test(s) on a GPU runner and opened this PR only after they passed with this patch. Each targeted test was run 5× on both the pre-patch and patched trees to rule out flakiness — the result held on every run.

Possibly related

Existing issues/PRs mentioning test_minicpm3_4b_generation (keyword match — not verified to share a root cause):

  • #41116 — Add MiniCPM3 (PR, closed, updated 2026-06-24)

This change was produced automatically by serge from a CI failure report. The patch was generated by an LLM and applied by serge; review before merging.

serge v0.1.0 · model: moonshotai/Kimi-K2.7-Code · 20 LLM turns · 19 tool calls · 66.0s · 563470 in / 11294 out tokens

@sergereview
sergereview Bot marked this pull request as ready for review September 23, 2026 07:51
@github-actions

Copy link
Copy Markdown
Contributor

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

run-slow: minicpm3

@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 recap

Dashboard: View test results in Grafana
Latest run: 35833912756
Result: success | Grafana metrics are not available yet.

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

makes sense.

BTW SERGE can you open a PR to their repo to remove the remote code?

@ArthurZucker

Copy link
Copy Markdown
Collaborator

Thanks for the fix! The KeyError: 'factor' is already fixed on main by #49555: yarn_apply_mscale now reads factor only inside the mscale_all_dim branch (modeling_minicpm3.py:188-189), so the minicpm3 integration tests should no longer hit it. Closing as already fixed; feel free to reopen if the failure persists on main.

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.

2 participants