Introduction
DeepSeek-V4.1-Flash is a multimodal Mixture-of-Experts (MoE) model developed by DeepSeek, with 552B backbone parameters and support for context lengths of up to one million tokens. It uses a Causal Encoder-Decoder architecture and activates 8B parameters per token during prefill and 16B during decode. This guide uses language-model-only mode, so image inputs are not enabled. For more model details, see the DeepSeek-V4.1-Flash technical report. This guide covers DeepSeek-V4.1-Flash deployment on A3 Series and 950PR/DT Series (A5) NPUs with SGLang. Prefill and decode run in one service; Prefill-Decode (PD) disaggregation is not configured.Configuration summary
The following table summarizes the A3 and A5 script settings. For parameter details, see the Ascend Parameter Reference and Feature Compatibility.Prerequisites
Environment
Prepare an A3 Series host with 16 NPUs per node or a 950PR/DT Series (A5) host with 8 NPUs per node. Install a compatible Ascend driver, CANN, TorchNPU, ATB, and custom operators, then run the setup and launch commands inside the prepared Ascend environment. Use an SGLang checkout that supports DeepSeek-V4.1-Flash and the dsv4 NPU attention backend. Keep the same SGLang revision and model checkpoint available at the same paths on every node.Model weights
Select the checkpoint for your hardware: DeepSeek-V4.1-Flash-1017-W8A8 for A3, or the DeepSeek-V4.1-Flash-1017 checkpoint for A5 (950PR/DT Series). SetMODEL_PATH to the directory containing the selected checkpoint. Replace the placeholder
path in the script with the checkpoint directory available in your environment. For multi-node deployments, make the
checkpoint accessible at the same path on every node.
Installation
The dependencies required for the NPU runtime environment are integrated into platform-specific Docker images. Pull the image for your hardware and create a container using the corresponding command below. For host setup and further container options, see the SGLang Installation with NPU Support guide.- A3 Series
- 950PR/DT Series
Online service deployment
| Parameter | Single-node deployment | Multi-node deployment |
|---|---|---|
MODEL_PATH | Download the checkpoint for your hardware from Model weights, then set MODEL_PATH to its directory as accessible from inside the container. For multi-node deployments, make this path accessible inside every node’s container. | Same as the single-node deployment. |
NODE_IPS | List the node’s communication IP, for example NODE_IPS=(“192.168.25.209”). | List all node communication IPs in the same order on every node, for example NODE_IPS=(“192.168.25.209” “192.168.25.212”). Do not include port numbers. |
NODE_RANK | Set NODE_RANK=0. | Set the rank separately on each node according to its position in NODE_IPS. For the example above, use NODE_RANK=0 on 192.168.25.209 and NODE_RANK=1 on 192.168.25.212. |
HCCL_IF | The single-node example uses HCCL_IF=“lo”. To inspect available interfaces, run ip -br addr. To check the route to a peer, run ip route get <peer-node-ip>; use the interface shown after dev as HCCL_IF. | Set HCCL_IF separately on each node to its local interface for HCCL communication. For example, configure the interface on 192.168.25.209 on that node, and the interface on 192.168.25.212 on the other node. Interface names may be the same or different, depending on the cluster configuration. |
GLOO_SOCKET_IFNAME | The script defaults to lo. For multi-node deployments, set this to an available interface for GLOO communication, for example export GLOO_SOCKET_IFNAME=“<interface>”. | Set this separately on each node to that node’s local interface for GLOO communication. Run ip route get <peer-node-ip> and use the interface shown after dev; set it with export GLOO_SOCKET_IFNAME=“<interface>”. The interface can differ between nodes. |
- A3 Series
- 950PR/DT Series
This script supports both single-node and multi-node deployments. Configure
NODE_IPS, NODE_RANK, HCCL_IF, and GLOO_SOCKET_IFNAME as described above. Replace the SGLang source and model checkpoint paths with paths available in your environment.command
Functional verification
Once the server printsThe server is fired up and ready to roll! in the terminal, it is ready to accept requests. For
more testing examples (health checks, Generate, Chat Completions, and port usage), see
Testing the Service.
Send a chat completion request to the service endpoint on port 30000:
MASTER_ADDR). The service output is displayed in the terminal on each node.
Accuracy evaluation
A quick GSM8K accuracy check withsgl-eval:
sgl-eval: command not found, install it with pip install sgl-eval==0.1.3 and run the command again. If you do not want to change the server’s Python environment, install it in an isolated venv instead;
Replace /path/to/model-checkpoint with the checkpoint path used by the server. For multi-node deployment, use the service address reachable from the client.
Accuracy Tests
DeepSeek-V4.1 accuracy scores on Ascend A3 Series and 950PR/DT Series (A5):| Benchmark | Ascend A3 Series | Ascend A5 (950PR/DT Series) |
|---|---|---|
| GPQA-Diamond | 91.9 | 91.4 |
| AIME26 | 96.7 | 100 |
Performance
A quick serving benchmark with random input and output lengths:sglang backend benchmarks the /generate endpoint. To benchmark the OpenAI-compatible chat endpoint, use
--backend sglang-oai-chat. For multi-node deployment, use the service address reachable from the benchmark client.
This tutorial does not provide DeepSeek-V4.1-Flash A3 or A5 performance results.
For performance data and benchmark commands, see Performance Testing on Ascend NPU.
