Skip to content

[serge] Fix 8 integration tests for model mamba2 failing with OOM (other (8))#47058

Open
sergereview[bot] wants to merge 1 commit into
mainfrom
serge/fix/itf-50ea11303615-cb431752
Open

[serge] Fix 8 integration tests for model mamba2 failing with OOM (other (8))#47058
sergereview[bot] wants to merge 1 commit into
mainfrom
serge/fix/itf-50ea11303615-cb431752

Conversation

@sergereview

@sergereview sergereview Bot commented Jul 4, 2026

Copy link
Copy Markdown

CI

Original CI failure

  • Failure group: 1/1: 8 integration tests for model mamba2failing withOOM (other (8))
  • tests/models/mamba2/test_modeling_mamba2.py::Mamba2IntegrationTest::test_batched_equivalence_with_cache [multi-gpu] (OOM, seen 7/7)

Relates to #47053

The mamba2 integration tests were OOMing on 22 GB CI GPUs. Root cause: the tests loaded the 7B Mamba-Codestral-7B-v0.1 checkpoint with dtype=torch.bfloat16, which is not the from_pretrained argument for weight dtype; the kwarg is ignored, so weights load in float32 and roughly double memory usage. The patch switches those calls to torch_dtype=torch.bfloat16, adds a torch.cuda.empty_cache() in setUp to reduce fragmentation between tests, and lowers the mixer equivalence test sequence length from 512 to 128 to further reduce activation memory.


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 · 48 LLM turns · 49 tool calls · 205.6s · 2131666 in / 15914 out tokens

@sergereview sergereview Bot marked this pull request as ready for review July 4, 2026 07:43
@github-actions github-actions Bot requested a review from ydshieh July 4, 2026 07:44
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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

run-slow: mamba2

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 28699495193:1
Result: success | Jobs: 5 | Tests: 335 | Failures: 0 | Duration: 4m 38s

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

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.

1 participant