[serge] Fix 12 integration tests for model `minimax_m3_vl` failing with `load_error` (other (12))
Author: sergereview[bot]
Pull request: yes

<!-- ci-dashboard-badge:start -->
[![CI](https://transformers-ci.lor-e.huggingface.cool/badge/pr?pr=47123)](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47123)
<!-- ci-dashboard-badge:end -->

## Original CI failure

- Failure group: `1/1: 12 integration tests for model `minimax_m3_vl` failing with `load_error` (other (12))`
- `tests/models/minimax_m3_vl/test_modeling_minimax_m3_vl.py::MiniMaxM3VLIntegrationTest::test_batched_image_generation` [multi-gpu] (load_error, seen 6/7)

<!-- serge-task:integration-failure-triage:sha256:c256626f088023d2a0c6af7cf44ba98b74497dc932a50a665dd99d5441e8d815 -->

Relates to #47120

The 12 `MiniMaxM3VLIntegrationTest` slow tests fail during `from_pretrained` because `device_map="auto"` offloads part of the MXFP8/MoE checkpoint to disk. Accelerate then needs to re-save those offloaded weights (the model uses an internal weight format different from the saved one), which requires an explicit `offload_folder`. Without it, `offload_weight` raises the observed `ValueError`.

Root cause: `_load_model` calls `MiniMaxM3SparseForConditionalGeneration.from_pretrained(..., device_map="auto")` without passing `offload_folder`.

Fix: pass a temporary directory as `offload_folder` in the integration test's `_load_model` helper, and import `tempfile` at the top of the test file. This is the smallest test-side change that lets the disk-offload path complete successfully.

---
_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` · 73 LLM turns · 75 tool calls · 202.7s · 2067985 in / 5767 out tokens_

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

run-slow: minimax_m3_vl

<!-- ci-dashboard-recap:start -->

---

### CI recap

**Dashboard:** [View test results in Grafana](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47123)
**Latest run:** [28846339902](https://github.com/huggingface/transformers/actions/runs/28846339902)
**Result:** `success` | Grafana metrics are not available yet.

<!-- ci-dashboard-recap:end -->

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_47123). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

run-slow: minimax_m3_vl

[Workflow Run ⚙️](https://github.com/huggingface/transformers/actions/runs/29017764182)

This comment contains `run-slow`, running the specified jobs: 

models: ["models/minimax_m3_vl"]
quantizations: []

## CI Results
[Workflow Run ⚙️](https://github.com/huggingface/transformers/actions/runs/29017764182)

### Commit Info
| Context | Commit | Description |
|---------|--------|-------------|
| RUN | [ef99e533](https://github.com/huggingface/transformers/commit/ef99e533db1b5b5b79bbea252d674d92ea6643ef) | workflow commit (merge commit) |
| PR | [ada87538](https://github.com/huggingface/transformers/commit/ada87538d84ac36afc2666e2f3ef979cd643e6b7) | branch commit (from PR) |
| main | [4d828999](https://github.com/huggingface/transformers/commit/4d828999d2eb3920d1e43dc258e6af7e72a9a081) | base commit (on `main`) |

✅ No failing test specific to this PR 🎉 👏 !