Skip to main content

Introduction

MindSpore is a high-performance AI framework optimized for Ascend NPUs. This doc guides users to run MindSpore models in SGLang.

Requirements

MindSpore currently only supports Ascend NPU devices. Users need to first install Ascend CANN 8.5. The CANN software packages can be downloaded from the Ascend Official Website.

Supported Models

Currently, the following models are supported:
  • Qwen3: Dense and MoE models
  • DeepSeek V3/R1
  • More models coming soon…

Installation

Note: Currently, MindSpore models are provided by an independent package sgl-mindspore. Support for MindSpore is built upon current SGLang support for Ascend NPU platform. Please first install SGLang for Ascend NPU and then install sgl-mindspore:
Install

Run Model

Current SGLang-MindSpore supports Qwen3 and DeepSeek V3/R1 models. This doc uses Qwen3-8B as an example.

Offline inference

Use the following script for offline inference:
Offline Infer

Start server

Launch a server with MindSpore backend:
Command
For distributed server with multiple nodes:
Command

Troubleshooting

Debug Mode

Enable sglang debug logging by log-level argument.
Debug Mode
Enable mindspore info and debug logging by setting environments.
Command

Explicitly select devices

Use the following environment variable to explicitly select the devices to use.
Command

Some communication environment issues

In case of some environment with special communication environment, users need set some environment variables.
Disable LCCL

Some dependencies of protobuf

In case of some environment with special protobuf version, users need set some environment variables to avoid binary version mismatch.
Command

Support

For MindSpore-specific issues: