modelscope / modelscope/ms-swift
gemma-4-26b-a4b-it使用megatrons训练有显存OOM问题
Nobody has claimed this yet.
- 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 描述
训练基于官方提供的脚本https://github.com/modelscope/ms-swift/blob/main/examples/models/gemma4/mcore.sh
训练两次,OOM现象可复现
训练环境版本
[INFO:swift] mcore_bridge.version: 1.4.2
[INFO:swift] megatron.core.version: 0.17.1
[INFO:swift] swift.version: 4.4.0.dev0
torch: 2.11.0+cu130
transformers: 5.8.1
How to Reproduce / 如何复现
https://github.com/modelscope/ms-swift/blob/main/examples/models/gemma4/mcore.sh
Additional Information / 补充信息
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running examples/models/gemma4/mcore.sh with the reported environment versions, then inspect the reproducible OOM shown in the issue. Compare the two training runs and document or fix the memory failure so the official script completes without OOM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100