modelscope / modelscope/ms-swift
👋Welcome ms-swift v4
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
ms-swift v4将会对整体框架进行重构,这会引入不少break change。以下为会导致break change的重构内容:
- ✅目录结构重构与依赖关系优化:swift.llm目录将拆分为swift.template, swift.dataset, swift.model, swift.pipelines。
- ✅model_type与template接耦,与transformers model_type对齐,将去除qwen3_thinking, qwen3_no_thinking, qwen3_moe_thinking等额外的model_type。
- ✅megatron训练 training loop重写。【❌待4.1】支持RAY。✅使用megatron-core而丢弃使用megatron-lm依赖。
- ✅transformers v5.0新特性引入。
如果有更多重构/新特性支持的建议,可以在下方留言,该文档会持续更新,谢谢!
ms-swift v4 will undergo a comprehensive framework refactoring, which will introduce several breaking changes. The following are refactoring items that will cause breaking changes:
- ✅Directory structure refactoring and dependency optimization: The swift.llm directory will be split into swift.template, swift.dataset, swift.model, and swift.pipelines.
- ✅Decoupling model_type from template, aligning with transformers model_type. Additional model_types such as qwen3_thinking, qwen3_no_thinking, qwen3_moe_thinking, etc. will be removed.
- Megatron training loop rewrite to support RAY. ✅Will use megatron-core and drop the megatron-lm dependency.
- ✅Introduction of transformers v5.0 new features.
If you have more suggestions for refactoring/new feature support, please leave a comment below. This document will be continuously updated. Thank you!
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 reviewing the listed ms-swift v4 refactoring items, especially the swift.llm split, model_type/template decoupling, and Megatron training-loop rewrite. Check the current project structure and dependencies against those items; the issue does not define a specific entry point, test, or completion condition, so confirm scope with maintainers before starting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100