modelscope / modelscope/ms-swift

Official demo work fine with 3.10.1 but OOM with 3.12.1

Open
#7,926 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug stale
Dominant language
Python
Stars
15.7k
Forks
1.7k
Avg merge
1d 16h
Merged PRs (30d)
136

Description

Checklist / 检查清单
  • I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述

Official demo: https://github.com/modelscope/ms-swift/blob/main/examples/train/grpo/external/moe_full.sh

Training works fine with ms-swift version 3.10.1, but leads to OOM (Out of Memory) when using version 3.12.0.
GPU:

+-------------------------------------------------------------------------------+
| PPU-SMI 1.18 Driver Version: 1.5.3-5239a4 HGGC Version: 11.1 |
+---------------------------------+----------------------+----------------------+
| PPU Name Persistence M. | Bus-Id | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | PPU-Util Compute M. |
| | | MIG M. |
+=================================+======================+======================+
| 0 PPU-ZW810E N/A | 00000001:C9:00.0 | 0 |
| N/A 36C N/A 116W / 400W | 567MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 1 PPU-ZW810E N/A | 00000001:C8:00.0 | 0 |
| N/A 40C N/A 153W / 400W | 97853MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 2 PPU-ZW810E N/A | 00000001:80:00.0 | 0 |
| N/A 38C N/A 150W / 400W | 97893MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 3 PPU-ZW810E N/A | 00000001:81:00.0 | 0 |
| N/A 37C N/A 147W / 400W | 97955MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 4 PPU-ZW810E N/A | 00000000:7E:00.0 | 0 |
| N/A 36C N/A 153W / 400W | 97971MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 5 PPU-ZW810E N/A | 00000000:7F:00.0 | 0 |
| N/A 39C N/A 144W / 400W | 97963MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 6 PPU-ZW810E N/A | 00000000:C7:00.0 | 0 |
| N/A 41C N/A 155W / 400W | 97975MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 7 PPU-ZW810E N/A | 00000000:C6:00.0 | 0 |
| N/A 39C N/A 156W / 400W | 97967MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 8 PPU-ZW810E N/A | 00000001:A5:00.0 | 0 |
| N/A 40C N/A 149W / 400W | 97963MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 9 PPU-ZW810E N/A | 00000001:A4:00.0 | 0 |
| N/A 38C N/A 153W / 400W | 97963MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 10 PPU-ZW810E N/A | 00000001:0A:00.0 | 0 |
| N/A 39C N/A 150W / 400W | 97975MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 11 PPU-ZW810E N/A | 00000001:0B:00.0 | 0 |
| N/A 34C N/A 155W / 400W | 97975MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 12 PPU-ZW810E N/A | 00000000:08:00.0 | 0 |
| N/A 45C N/A 150W / 400W | 97967MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 13 PPU-ZW810E N/A | 00000000:09:00.0 | 0 |
| N/A 36C N/A 155W / 400W | 97959MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 14 PPU-ZW810E N/A | 00000000:A3:00.0 | 0 |
| N/A 34C N/A 81W / 400W | 2MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+
| 15 PPU-ZW810E N/A | 00000000:A2:00.0 | 0 |
| N/A 33C N/A 81W / 400W | 2MiB / 98304MiB | 0% Default |
| | | Disabled |
+---------------------------------+----------------------+----------------------+

How to Reproduce / 如何复现

ms-swift : 3.12.0
Official demo: https://github.com/modelscope/ms-swift/blob/main/examples/train/grpo/external/moe_full.sh

Additional Information / 补充信息

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/train/grpo/external/moe_full.sh and reproduce the run with ms-swift 3.10.1 and 3.12.0, recording the failure and memory usage. Compare the relevant training behavior between those versions to isolate the regression. Done means the official demo no longer runs out of memory on the reported setup, with a regression test or documented verification if the repository supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.