modelscope / modelscope/ms-swift
Enhance support for gemma-4
Open
Nobody has claimed this yet.
enhancement
- 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 feature request. / 我已经搜索过现有的 issues,确认这是一个新的 Feature Request。
Feature Request Description / Feature Request 描述
I tried to SFT gemma-4 with internal datasets today. There are several problems:
- gemma-4 do not support FA2, so I fallback to sdpa which is too slow;
- Do not support padding_free, as a result I cannot use sequence_parallel to decrease GPU memory consumption;
- No agent template support currently.
I use pip installed ms-swift 4.3.0 with cu128 & torch2.8
Pull Request / Pull Request 信息
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
No files or tests are named. Start by locating the Gemma-4 integration and the SFT paths handling FA2/SDPA, padding_free, sequence_parallel, and agent templates; done means the three listed capabilities work for Gemma-4 and their behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100