modelscope / modelscope/ms-swift

👋Welcome ms-swift v4

Open
#7,250 62 comments 2 reactions 0 assignees View on GitHub

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的重构内容:

  1. ✅目录结构重构与依赖关系优化:swift.llm目录将拆分为swift.template, swift.dataset, swift.model, swift.pipelines。
  2. ✅model_type与template接耦,与transformers model_type对齐,将去除qwen3_thinking, qwen3_no_thinking, qwen3_moe_thinking等额外的model_type。
  3. ✅megatron训练 training loop重写。【❌待4.1】支持RAY。✅使用megatron-core而丢弃使用megatron-lm依赖。
  4. ✅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:

  1. ✅Directory structure refactoring and dependency optimization: The swift.llm directory will be split into swift.template, swift.dataset, swift.model, and swift.pipelines.
  2. ✅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.
  3. Megatron training loop rewrite to support RAY. ✅Will use megatron-core and drop the megatron-lm dependency.
  4. ✅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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.