MindSpore Transformers (MindFormers)

July 17, 2025 ยท View on GitHub

LICENSE Downloads PyPI

1. Introduction

The goal of the MindSpore Transformers suite is to build a full-process development suite for Large model pre-training, fine-tuning, evaluation, inference, and deployment. It provides mainstream Transformer-based Large Language Models (LLMs) and Multimodal Models (MMs). It is expected to help users easily realize the full process of large model development.

Based on MindSpore's built-in parallel technology and component-based design, the MindSpore Transformers suite has the following features:

  • One-click initiation of single or multi card pre-training, fine-tuning, evaluation, inference, and deployment processes for large models;
  • Provides rich multi-dimensional hybrid parallel capabilities for flexible and easy-to-use personalized configuration;
  • System-level deep optimization on large model training and inference, native support for ultra-large-scale cluster efficient training and inference, rapid fault recovery;
  • Support for configurable development of task components. Any module can be enabled by unified configuration, including model network, optimizer, learning rate policy, etc.;
  • Provide real-time visualization of training accuracy/performance monitoring indicators.

For details about MindSpore Transformers tutorials and API documents, see MindSpore Transformers Documentation. The following are quick jump links to some of the key content:

If you have any suggestions on MindSpore Transformers, contact us through an issue, and we will address it promptly.

Models List

The following table lists models supported by MindSpore Transformers.

ModelSpecificationsModel TypeLatest Version
DeepSeek-V3671BSparse LLMIn-development version, 1.5.0
GLM49BDense LLMIn-development version, 1.5.0
Llama3.18B/70BDense LLMIn-development version, 1.5.0
Qwen2.50.5B/1.5B/7B/14B/32B/72BDense LLMIn-development version, 1.5.0
TeleChat27B/35B/115BDense LLMIn-development version, 1.5.0
CodeLlama34BDense LLM1.5.0
CogVLM2-Image19BMM1.5.0
CogVLM2-Video13BMM1.5.0
DeepSeek-V2236BSparse LLM1.5.0
DeepSeek-Coder-V1.57BDense LLM1.5.0
DeepSeek-Coder33BDense LLM1.5.0
GLM3-32K6BDense LLM1.5.0
GLM36BDense LLM1.5.0
InternLM27B/20BDense LLM1.5.0
Llama3.23BDense LLM1.5.0
Llama3.2-Vision11BMM1.5.0
Llama38B/70BDense LLM1.5.0
Llama27B/13B/70BDense LLM1.5.0
Mixtral8x7BSparse LLM1.5.0
Qwen20.5B/1.5B/7B/57B/57B-A14B/72BDense/Sparse LLM1.5.0
Qwen1.57B/14B/72BDense LLM1.5.0
Qwen-VL9.6BMM1.5.0
TeleChat7B/12B/52BDense LLM1.5.0
Whisper1.5BMM1.5.0
Yi6B/34BDense LLM1.5.0
YiZhao12BDense LLM1.5.0
Baichuan27B/13BDense LLM1.3.2
GLM26BDense LLM1.3.2
GPT2124M/13BDense LLM1.3.2
InternLM7B/20BDense LLM1.3.2
Qwen7B/14BDense LLM1.3.2
CodeGeex26BDense LLM1.1.0
WizardCoder15BDense LLM1.1.0
Baichuan7B/13BDense LLM1.0
Blip28.1BMM1.0
Bloom560M/7.1B/65B/176BDense LLM1.0
Clip149M/428MMM1.0
CodeGeex13BDense LLM1.0
GLM6BDense LLM1.0
iFlytekSpark13BDense LLM1.0
Llama7B/13BDense LLM1.0
MAE86MMM1.0
Mengzi313BDense LLM1.0
PanguAlpha2.6B/13BDense LLM1.0
SAM91M/308M/636MMM1.0
Skywork13BDense LLM1.0
Swin88MMM1.0
T514M/60MDense LLM1.0
VisualGLM6BMM1.0
Ziya13BDense LLM1.0
Bert4M/110MDense LLM0.8

The model maintenance strategy follows the Life Cycle And Version Matching Strategy of the corresponding latest supported version.

2. Installation

Version Mapping

Currently, the Atlas 800T A2 training server is supported.

Python 3.11.4 is recommended for the current suite.

MindSpore TransformersMindSporeCANNDriver/Firmware
In-development versionIn-development versionIn-development versionIn-development version

Historical Version Supporting Relationships:

MindSpore TransformersMindSporeCANNDriver/Firmware
1.5.02.6.0-rc18.1.RC125.0.RC1
1.3.22.4.108.0.024.1.0
1.3.02.4.08.0.RC324.1.RC3
1.2.02.3.08.0.RC224.1.RC2

Installation Using the Source Code

Currently, MindSpore Transformers can be compiled and installed using the source code. You can run the following commands to install MindSpore Transformers:

git clone -b dev https://gitee.com/mindspore/mindformers.git
cd mindformers
bash build.sh

3. User Guide

MindSpore Transformers supports distributed pre-training, supervised fine-tuning, and inference tasks for large models with one click. You can click the link of each model in Model List to see the corresponding documentation.

For more information about the functions of MindSpore Transformers, please refer to MindSpore Transformers Documentation.

4. Life Cycle And Version Matching Strategy

MindSpore Transformers version has the following five maintenance phases:

StatusDurationDescription
Plan1-3 monthsPlanning function.
Develop3 monthsBuild function.
Preserve6 monthsIncorporate all solved problems and release new versions.
No Preserve0โ€”3 monthsIncorporate all the solved problems, there is no full-time maintenance team, and there is no plan to release a new version.
End of Life (EOL)N/AThe branch is closed and no longer accepts any modifications.

MindSpore Transformers released version preservation policy:

MindSpore Transformers VersionCorresponding LabelCurrent StatusRelease TimeSubsequent StatusEOL Date
1.5.0v1.5.0Preserve2025/04/29No preserve expected from 2025/10/292026/01/29
1.3.2v1.3.2Preserve2024/12/20No preserve expected from 2025/06/202025/09/20
1.2.0v1.2.0End of Life2024/07/12-2025/04/12
1.1.0v1.1.0End of Life2024/04/15-2025/01/15

5. Disclaimer

  1. scripts/examples directory are provided as reference examples and do not form part of the commercially released products. They are only for users' reference. If it needs to be used, the user should be responsible for transforming it into a product suitable for commercial use and ensuring security protection. MindSpore Transformers does not assume security responsibility for the resulting security problems.
  2. Regarding datasets, MindSpore Transformers only provides suggestions for datasets that can be used for training. MindSpore Transformers does not provide any datasets. Users who use any dataset for training must ensure the legality and security of the training data and assume the following risks:
    1. Data poisoning: Maliciously tampered training data may cause the model to produce bias, security vulnerabilities, or incorrect outputs.
    2. Data compliance: Users must ensure that data collection and processing comply with relevant laws, regulations, and privacy protection requirements.
  3. If you do not want your dataset to be mentioned in MindSpore Transformers, or if you want to update the description of your dataset in MindSpore Transformers, please submit an issue to Gitee, and we will remove or update the description of your dataset according to your issue request. We sincerely appreciate your understanding and contribution to MindSpore Transformers.
  4. Regarding model weights, users must verify the authenticity of downloaded and distributed model weights from trusted sources. MindSpore Transformers cannot guarantee the security of third-party weights. Weight files may be tampered with during transmission or loading, leading to unexpected model outputs or security vulnerabilities. Users should assume the risk of using third-party weights and ensure that weight files are verified for security before use.
  5. Regarding weights, vocabularies, scripts, and other files downloaded from sources like openmind, users must verify the authenticity of downloaded and distributed model weights from trusted sources. MindSpore Transformers cannot guarantee the security of third-party files. Users should assume the risks arising from unexpected functional issues, outputs, or security vulnerabilities when using these files.

6. Contribution

We welcome contributions to the community. For details, see MindSpore Transformers Contribution Guidelines.

7. License

Apache 2.0 License