MindSpeed-LLM:基于昇腾生态的大语言模型分布式训练套件

昇腾LLM分布式训练框架

Branch13Tags11
FilesLast commitLast update
10 days ago
3 months ago
13 hours ago
3 months ago
2 months ago
3 months ago
18 hours ago
3 days ago
8 days ago
23 hours ago
20 hours ago
23 hours ago
6 months ago
6 months ago
3 months ago
20 hours ago
6 months ago
2 months ago
20 hours ago
2 months ago
4 months ago
16 days ago
29 days ago
1 year ago
2 months ago
2 months ago
2 months ago
10 days ago
7 months ago
2 months ago
2 months ago
1 year ago
10 days ago
2 months ago
1 month ago
8 months ago
23 hours ago
2 months ago
10 days ago
3 months ago

English | 简体中文

GitHub Documentation

Introduction


MindSpeed LLM is a distributed large language model training toolkit built on the Ascend ecosystem. It aims to provide ecosystem partners in the Huawei Ascend chips ecosystem with an end-to-end large language model training solution, including distributed pretraining, distributed instruction fine-tuning, and the corresponding development toolchain, such as data preprocessing, weight conversion, online inference, and baseline evaluation.

Latest News


More news

Note: [beta] indicates that the feature has not been fully validated. If you encounter any issues while using it, please report them in the issue tracker.

Directory Structure


The MindSpeed LLM project code is organized according to modular design principles. For details, see the Project Guide.

MindSpeed-LLM/
 ├── ci                        # CI watchdog
 ├── configs                   # Configuration files
 ├── docker                    # Docker build configuration
 ├── docs                      # Project documentation
 ├── examples                  # Model example scripts
 ├── mindspeed_llm             # Core code
 ├── pre-commit                # Pre-commit hook configuration
 ├── tests                     # Test cases
 ├── convert_ckpt.py           # Weight conversion tool
 ├── convert_ckpt_v2.py        # Weight conversion tool v2
 ├── evaluation.py             # Model evaluation tool
 ├── inference.py              # Model inference tool
 ├── inference_fsdp2.py        # FSDP2 inference tool
 ├── posttrain_gpt.py          # Post-training workflow
 ├── preprocess_data.py        # Data preprocessing tool
 ├── preprocess_prompt.py      # Prompt preprocessing tool
 ├── pretrain_deepseek4.py     # DeepSeek4 pretraining workflow
 ├── pretrain_gpt.py           # Pretraining workflow
 ├── pretrain_mamba.py         # Pretraining workflow for Mamba models
 ├── rlhf_gpt.py               # RLHF training workflow
 ├── train_fsdp2.py            # FSDP2 training workflow
 ├── requirements.txt          # Python dependency file
 ├── setup.py                  # Installation configuration file
 ├── README.md                 # Project overview document

Documentation Navigation


The Documentation Guide provides the complete documentation usage guide for MindSpeed LLM and covers the following core topics:

  • Environment setup guide: installation and configuration instructions for MindSpeed LLM
  • Quick start: beginner guidance from environment setup to launching training
  • Model list: models supported by the PyTorch framework
  • Feature list: performance optimization and memory optimization features
  • Training solutions: complete solutions for pretraining, fine-tuning, inference, and evaluation
  • Toolchain: usage instructions for weight conversion, dataset processing, performance collection and analysis, deterministic computation, and other tools

Release Notes


See the release notes for the latest and historical versions of MindSpeed LLM, including the software compatibility table, version compatibility information, and release notes for the current version.

Installation


Quick Start


This section helps you quickly launch large language model pretraining and fine-tuning tasks. See the following guides for details:

Supported Models


MindSpeed LLM now includes built-in support for pretraining and fine-tuning more than 100 widely used large language models. See the supported model lists:

Training Solutions and Features


MindSpeed LLM includes training solutions such as distributed pretraining and distributed fine-tuning. For details, see Training Solutions and Features.

Online Inference


Feature MCore Released Contributor
Streaming inference ✅ ✅ [Ascend]
Chat conversation ✅ ✅ [Ascend]
YaRN context extension ✅ ❌ [Ascend]

Note

In the table, "Released" indicates that the commercial version has been released, "✅" indicates support, and "❌" indicates no support.

Open Dataset Evaluation


See the open dataset evaluation baselines for model baselines in the repository.

Scenario Dataset MCore Released Contributor
Evaluation MMLU ✅ ❌ [Ascend]
CEval ✅ ❌ [Ascend]
BoolQ ✅ ❌ [Ascend]
BBH ✅ ❌ [Ascend]
AGIEval ✅ ❌ [Ascend]
HumanEval ✅ ❌ [Ascend]
CMMLU ✅ ❌ [Ascend]
GSM8k ✅ ❌ [Ascend]
HellaSwag ✅ ❌ [Ascend]
NeedleBench ✅ ❌ [Ascend]

Developer Toolchain


Weight Conversion

MindSpeed LLM supports two-way weight conversion between Hugging Face and Megatron-core formats, and it supports merging LoRA weights. For parameters and usage instructions for the weight conversion feature, see Weight Conversion.

Source Format Target Format Sharding Features LoRA Contributor Released
Hugging Face Megatron-core tp, pp, dpp, vpp, cp, ep, loop layer ❌ [Ascend] ❌
Megatron-core Hugging Face ✅
Megatron-core tp, pp, dpp, vpp, cp, ep, loop layer ✅

Data Preprocessing

MindSpeed LLM supports data preprocessing for pretraining, instruction fine-tuning, and other tasks.

Task Scenario Dataset MCore Released Contributor
Pretraining Pretraining data processing ✅ ✅ [Ascend]
Fine-tuning Alpaca style ✅ ✅
ShareGPT style ✅ ✅

Performance Collection

Scenario Feature MCore Released Contributor
Performance collection Collect profiling data on Ascend chips ✅ ❌ [Ascend]

High Availability

Scenario Feature MCore Released Contributor
High availability Enable deterministic computation on Ascend chips ✅ ❌ [Ascend]

Version Maintenance Policy


MindSpeed LLM versions go through the following five maintenance stages:

Status Time Description
Planning 1 to 3 months Planned features.
Development 3 months Features under development.
Maintenance 6 to 12 months Merge all resolved issues and release versions. Different MindSpeed LLM versions follow different maintenance strategies. The maintenance period is six months for regular releases and twelve months for long-term support releases.
No maintenance 0 to 3 months Merge all resolved issues. No dedicated maintenance staff. No version release.
End of life (EOL) N/A The branch no longer accepts any changes.

MindSpeed LLM released version maintenance policy:

MindSpeed LLM Version Corresponding Tag Maintenance Policy Current Status Release Date Next Status EOL Date
26.1.0 v26.1.0 Regular release Development Expected to be released on Jun. 30, 2026 Expected to enter no-maintenance status starting Dec. 30, 2026
26.0.0 v26.0.0 Regular release Maintenance Mar. 30, 2026 Expected to enter no-maintenance status starting Sep. 30, 2026
2.3.0 v2.3.0 Regular release Maintenance Dec. 30, 2025 Expected to enter no-maintenance status starting Jun. 30, 2026
2.2.0 v2.2.0 Regular release EOL Sep. 30, 2025 End of life Mar. 30, 2026
2.1.0 v2.1.0 Regular release EOL Jun. 30, 2025 End of life Dec. 30, 2025
2.0.0 v2.0.0 Regular release EOL Mar. 30, 2025 End of life Sep. 30, 2025
1.0.0 v1.0.0 Regular release EOL Dec. 30, 2024 End of life Jun. 30, 2025
1.0.RC3 v1.0.RC3.0 Regular release EOL Sep. 30, 2024 End of life Mar. 30, 2025
1.0.RC2 v1.0.RC2.0 Regular release EOL Jun. 30, 2024 End of life Dec. 30, 2024
1.0.RC1 v1.0.RC1.0 Regular release EOL Mar. 30, 2024 End of life Sep. 30, 2024
bk_origin_23 \ Demo EOL 2023 End of life Jun. 30, 2024

Roadmap


The latest roadmap updates are published in MindSpeed LLM RoadMap. Visit there for the latest LLM plans and updates.

Community Meetings


See the Ascend Meeting Center for the schedule of MindSpeed LLM TC and SIG meetings.

Join Us


To share development experience, exchange usage tips, and stay up to date on project releases, we created the MindSpeed LLM community group. Whether you already use this project or have new ideas, you are welcome to join.

Ways to join:

  1. Scan the QR code to join the WeChat group directly. The QR code is valid for 7 days and is updated regularly.
  2. Add the Ascend open-source assistant to get the group link and join the MindSpeed LLM community group.
MindSpeed LLM community group
MindSpeed LLM WeChat group
Ascend open-source assistant
Ascend assistant WeChat

Security Statement


MindSpeed LLM Security Statement

Disclaimer


To MindSpeed LLM Users

  1. The models provided by MindSpeed LLM are for non-commercial use only.
  2. Third-party open source software that MindSpeed LLM depends on, such as Megatron, is provided and maintained by third-party communities. Fixes for problems caused by third-party open source software depend on contributions from and feedback to the relevant communities. You should understand that the MindSpeed LLM repository does not guarantee fixes for problems in the third-party open source software itself, and it also does not guarantee that it tests or corrects all vulnerabilities and errors in third-party open source software.
  3. For each model, the MindSpeed LLM platform only suggests datasets that you can use for training. Huawei does not provide any datasets. If you use these datasets for training, you must especially ensure that you comply with the license of the corresponding dataset. If you become involved in an infringement dispute because of your use of a dataset, Huawei bears no responsibility.
  4. If you find any issues while using MindSpeed LLM models, including but not limited to functional issues and compliance issues, please submit an issue on AtomGit. We will review and address it in a timely manner.

To Dataset Owners

If you do not want your dataset to be mentioned in MindSpeed LLM model descriptions, or if you want to update the description of your dataset in MindSpeed LLM, please submit an issue on AtomGit. We will delete or update the dataset description according to your request. We sincerely thank you for your understanding and contribution to MindSpeed LLM.

License Statement


  • The license for the MindSpeed LLM product is described in LICENSE.
  • The documents in the docs directory of the MindSpeed LLM tool are subject to the CC-BY 4.0 license. See LICENSE for details.

Contribution Statement


If you want to report issues or contribute code to MindSpeed LLM, see the Contribution Guide.

FAQ


For common questions about basic MindSpeed LLM usage, see the MindSpeed LLM FAQ. If the FAQ does not cover your question, you can search for similar issues in the repository issues list, or submit a new issue.

Acknowledgments


MindSpeed LLM is jointly contributed by the following Huawei departments and Ascend ecosystem partners:

Ecosystem partners:

  • Mobile Cloud (China Mobile Cloud): Dayun Zhenze Intelligent Computing Platform
  • Big Data and Artificial Intelligence Lab of the Software Development Center of Industrial and Commercial Bank of China

Thank you for every PR from the community. Contributions to MindSpeed LLM are welcome.