Skip to content

[serge] Fix 5 integration tests for model qwen3_vl_moe failing with other, raising RuntimeError (other (5)) - #50145

Merged
ydshieh merged 5 commits into
mainfrom
serge/fix/itf-3c381913de46-8d0890b9
Nov 16, 2026
Merged

ydshieh merged 5 commits into
mainfrom
serge/fix/itf-3c381913de46-8d0890b9

Conversation

@sergereview

@sergereview sergereview Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🤗 Transformers CI

Original CI failure

  • Failure group: 5 integration tests for model qwen3_vl_moefailing withother, raising RuntimeError (other (5))
  • tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeIntegrationTest::test_small_model_integration_test [multi-gpu] (other, seen 21/21)
CI traceback — tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeIntegrationTest::test_small_model_integration_test
(line 311)  RuntimeError: We encountered some issues during automatic conversion of the weights. For details look at the `CONVERSION` entries of the above report!

Where to watch it:

The 5 Qwen3VLMoeIntegrationTest tests OOM inside from_pretrained while converting experts.gate_up_proj (768 MiB transpose temporary).

Qwen/Qwen3-VL-30B-A3B-Instruct is 30B params ≈ 60 GiB in bf16 against 2×22.3 GiB cards, so device_map="auto" fills each GPU to ~100% (21.94 GiB in use, 368 MiB free) and leaves no headroom for the conversion buffer. Each test also reloaded the whole checkpoint.

Test-side fix, following the glm4v_moe/qwen3_omni_moe pattern (#48776): a lazy get_model() classmethod on the MemoryCleanupMixin class loads the checkpoint once with a 70% per-GPU max_memory cap plus a "cpu" entry and an offload_folder, and the tests call it instead of loading their own copy. No library code touched; expected strings unchanged.

Relates to #50143


✅ 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_small_model_integration_test (keyword match — not verified to share a root cause):

  • #50037 — Remove expired deprecation cycles (PR, closed, updated 2026-10-29)
  • #49846 — Fix failing integration tests on Intel XPU (Arc Pro B60) (PR, open, updated 2026-10-27)
  • #41095 — Add LLaVA-OneVision-1.5 model and related configurations (PR, open, updated 2026-10-25)
  • #49806 — fix failed test cases for unlimited_ocr model (PR, closed, updated 2026-10-22)
  • #49424 — Deprecate old input names (PR, closed, updated 2026-10-21)

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: deepseek-ai/DeepSeek-V4.1-Flash-1017:together · 43 LLM turns · 48 tool calls · 180.7s · 1692094 in / 77312 out tokens

… `other`, raising `RuntimeError` (other (5))
@sergereview
sergereview Bot marked this pull request as ready for review October 29, 2026 23:22
@github-actions
github-actions Bot requested a review from ydshieh October 29, 2026 23:23
@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

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

run-slow: qwen3_vl_moe

…them first

- `test_small_model_integration_test_with_video` loaded its own uncapped copy (fp16) and still OOMed while
  converting `experts.gate_up_proj` on 2xA10G. It now uses the shared `get_model()` (bf16). The fp16 choice
  had no stated reason (added in #41277); the bf16 output matches the existing expected text.
- The two FA2 tests keep their own load (different `attn_implementation`), now with the same 70% per-GPU
  `max_memory` cap and an `offload_folder`, and are marked `@run_first` so the shared model is not yet loaded.
- The cap computation is moved to `get_max_memory()` so both load paths use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ydshieh

ydshieh commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

run-slow: qwen3_vl_moe

Same pattern as `CwmIntegrationTest` (#50824): `cls.max_memory` is computed once in `setUpClass` and used by
`get_model()` and the two FA2 tests. Values are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ydshieh

ydshieh commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

run-slow: qwen3_vl_moe

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

CI (Nvidia + AMD)

Nvidia · ✅ No new failures 🎉👏 · ⚙️ Workflow · 📊 Dashboard

AMD · ✅ No new failures 🎉👏 · ⚙️ Workflow · 📊 Dashboard

Failures (12 pre-existing)

    Pre-existing failures (still failing) — 12 total:

        Same error (12):

show all 12

 
    - qwen3_vl_moe:
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeIntegrationTest::test_small_model_integration_test_batch_flashatt2
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeIntegrationTest::test_small_model_integration_test_batch_wo_image_flashatt2
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeModelTest::test_onnx_export_dynamic
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeModelTest::test_onnx_export_generate_dynamic
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeModelTest::test_onnx_export_generate_dynamic_static_cache
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeModelTest::test_onnx_export_generate_static
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeModelTest::test_onnx_export_generate_static_static_cache
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeModelTest::test_onnx_export_static
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeIntegrationTest::test_small_model_integration_test
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeIntegrationTest::test_small_model_integration_test_batch
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeIntegrationTest::test_small_model_integration_test_batch_different_resolutions
        tests/models/qwen3_vl_moe/test_modeling_qwen3_vl_moe.py::Qwen3VLMoeIntegrationTest::test_small_model_integration_test_expand_with_video

@ydshieh
ydshieh merged commit fc75327 into main Nov 16, 2026
35 checks passed
@ydshieh
ydshieh deleted the serge/fix/itf-3c381913de46-8d0890b9 branch November 16, 2026 17:43
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