跳转至

DeepSeek-V3 & 3.1

1 引言

DeepSeek-V3.1 是一款混合模型,同时支持思考模式和非思考模式。与上一版本相比,本次升级在多个方面带来了改进:

  • 混合思考模式:通过更改对话模板(chat template),同一个模型即可同时支持思考模式和非思考模式。

  • 更智能的工具调用:通过后训练优化,模型在工具使用和 Agent 任务中的性能得到了显著提升。

  • 更高的思考效率:DeepSeek-V3.1-Think 在回答质量上与 DeepSeek-R1-0528 相当,同时响应速度更快。

本文档将展示该模型的主要验证步骤,包括支持特性、特性配置、环境准备、单节点与多节点部署、精度和性能评估。

本文档基于 vLLM-Ascend v0.9.1rc3 进行验证和编写。当前模型(DeepSeek-V3.1)在该版本中首次获得支持(对于 950DT 产品,该模型自 vllm-ascend:v0.23.0rc1 起获得支持)。

2 支持特性

请参阅支持特性列表获取该模型的支持特性矩阵。

请参阅特性指南获取特性配置方法。

3 前提条件

3.1 模型权重

权重版本 下载链接
DeepSeek-V3.1(BF16 版本) ModelScope
DeepSeek-V3.1-w8a8-mtp-QuaRot(带混合 MTP 的量化版本) ModelScope
DeepSeek-V3.1-Terminus-w4a8-mtp-QuaRot(带混合 MTP 的量化版本) ModelScope
DeepSeek-V3.1-w4a4c8-mxfp4(带混合 MTP 的量化版本) ModelScope
DeepSeek-V3.1-w8a8c8-mxfp8(带混合 MTP 的量化版本) ModelScope
  • Quantization method:msmodelslim。您可以使用该方法对模型进行量化。

路径说明:将模型权重下载到您选择的目录并记录下来。确保后续部署命令中的模型路径与该目录一致。

3.2 验证多节点通信(可选)

如果要在多节点环境中部署,需按照验证多节点通信环境验证多节点通信。

4 安装

4.1 Docker 镜像安装

您可以直接使用官方 Docker 镜像运行 DeepSeek-V3.1。

请根据您的机器类型选择镜像,并在节点上启动 Docker 镜像,参见使用 Docker。

在每个节点上启动 Docker 镜像。

export IMAGE=quay.io/ascend/vllm-ascend:v0.23.0
export NAME=vllm-ascend

docker run --rm \
--name $NAME \
--net=host \
--shm-size=1g \
--device /dev/davinci0 \
--device /dev/davinci1 \
--device /dev/davinci2 \
--device /dev/davinci3 \
--device /dev/davinci4 \
--device /dev/davinci5 \
--device /dev/davinci6 \
--device /dev/davinci7 \
--device /dev/davinci_manager \
--device /dev/hisi_hdc \
--device /dev/ummu \
--device /dev/uburma \
-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v /etc/hixlep/:/etc/hixlep/ \
-v /root/.cache:/root/.cache \
-v /usr/local/sbin:/usr/local/sbin \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/sbin/npu-smi:/usr/local/sbin/npu-smi \
-v /usr/lib64:/usr/lib64 \
-itd $IMAGE bash

在每个节点上启动 Docker 镜像。

export IMAGE=quay.io/ascend/vllm-ascend:v0.23.0-a3
docker run --rm \
    --name vllm-ascend \
    --shm-size=1g \
    --net=host \
    --privileged=true \
    --device /dev/davinci0 \
    --device /dev/davinci1 \
    --device /dev/davinci2 \
    --device /dev/davinci3 \
    --device /dev/davinci4 \
    --device /dev/davinci5 \
    --device /dev/davinci6 \
    --device /dev/davinci7 \
    --device /dev/davinci8 \
    --device /dev/davinci9 \
    --device /dev/davinci10 \
    --device /dev/davinci11 \
    --device /dev/davinci12 \
    --device /dev/davinci13 \
    --device /dev/davinci14 \
    --device /dev/davinci15 \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -v /root/.cache:/root/.cache \
    -it $IMAGE bash

在每个节点上启动 Docker 镜像。

export IMAGE=quay.io/ascend/vllm-ascend:v0.23.0
docker run --rm \
    --name vllm-ascend \
    --shm-size=1g \
    --net=host \
    --privileged=true \
    --device /dev/davinci0 \
    --device /dev/davinci1 \
    --device /dev/davinci2 \
    --device /dev/davinci3 \
    --device /dev/davinci4 \
    --device /dev/davinci5 \
    --device /dev/davinci6 \
    --device /dev/davinci7 \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -v /root/.cache:/root/.cache \
    -it $IMAGE bash

在成功执行 docker run 后,您可以通过执行 docker ps 命令来验证正在运行的容器服务。

4.2 源代码安装

如果您不想使用上述 docker 镜像,也可以从源代码构建所有内容:

  • 从源代码安装 vllm-ascend,请参阅 安装。

如果您要部署多节点环境,需要在每个节点上配置环境。

5 在线服务部署

5.1 单节点在线部署

单节点部署在同一节点内同时完成 Prefill 和 Decode。量化模型 DeepSeek-V3.1-w8a8-mtp-QuaRot 可以部署在 1 台 Atlas 800 A3(64GB × 16)上。

启动命令:

export HCCL_BUFFSIZE=512
export HCCL_CONNECT_TIMEOUT=600
export HCCL_EXEC_TIMEOUT=600

export OMP_PROC_BIND=false
export OMP_NUM_THREADS=10
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export TASK_QUEUE_ENABLE=1

# Ensure the model path matches the directory recorded during download
vllm serve /weight/dsk-v3.1-w4a4_mlp-w8a8c8_attn-0618-full \
--host 0.0.0.0 \
--port 8015 \
--max_model_len 135168 \
--max-num-batched-tokens 16384 \
--served-model-name deepseek_v3 \
--gpu-memory-utilization 0.9 \
--data-parallel-size 1 \
--tensor-parallel-size 8 \
--enable-expert-parallel \
--async-scheduling \
--max-num-seqs 96 \
--no-enable-prefix-caching \
--trust-remote-code \
--compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \
--speculative-config '{"num_speculative_tokens": 3,"method": "deepseek_mtp"}' \
--quantization ascend \
--additional_config '{"enable_cpu_binding": true, "multistream_overlap_shared_expert": true, "enable_balance_scheduling": true,"enable_mlapo":true}' \

启动命令:

#!/bin/sh
# this obtained through ifconfig
# nic_name is the network interface name corresponding to local_ip of the current node
nic_name="xxxx"
local_ip="xxxx"

# [Optional] jemalloc
# jemalloc is for better performance, if `libjemalloc.so` is installed on your machine, you can turn it on.
# export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD

# AIV
export HCCL_OP_EXPANSION_MODE="AIV"

export HCCL_IF_IP=$local_ip
export GLOO_SOCKET_IFNAME=$nic_name
export TP_SOCKET_IFNAME=$nic_name
export HCCL_SOCKET_IFNAME=$nic_name
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True

# Ensure the model path matches the directory recorded during download
vllm serve /weights/DeepSeek-V3.1-w8a8-mtp-QuaRot \
--host 0.0.0.0 \
--port 8015 \
--data-parallel-size 4 \
--tensor-parallel-size 4 \
--quantization ascend \
--seed 1024 \
--served-model-name deepseek_v3 \
--enable-expert-parallel \
--max-num-seqs 16 \
--max-model-len 16384 \
--max-num-batched-tokens 4096 \
--trust-remote-code \
--no-enable-prefix-caching \
--gpu-memory-utilization 0.92 \
--speculative-config '{"num_speculative_tokens": 3, "method": "mtp"}' \
--compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \
--additional-config '{"scheduler_config":{"enable_balance_scheduling":true}}'

关键参数说明:

  • 设置 additional_config.scheduler_config.enable_balance_scheduling=true 可启用均衡调度。这有助于在 v1 调度器中提高输出吞吐量并降低 TPOT。然而,在某些场景下 TTFT 可能会变差。此外,不建议在 PD 分离的场景中启用此功能。
  • 对于单节点部署,建议使用 dp4tp4 而不是 dp2tp8。
  • --max-model-len 指定最大上下文长度,即单个请求的输入和输出 Token 总数。对于输入长度为 3.5k、输出长度为 1.5k 的性能测试,16384 的值已经足够;但对于精度测试,请至少设置为 35000。
  • --no-enable-prefix-caching 表示禁用前缀缓存。若要启用,请移除该选项。
  • 如果使用 w4a8 权重,将为 kvcache 分配更多内存,您可以尝试提高系统吞吐量以获得更大的吞吐量。

常见问题提示:如果您遇到问题,请参阅 公共常见问题 进行故障排查。

服务验证:

curl http://<node_ip>:8015/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "deepseek_v3",
        "messages": [{
            "role": "user",
            "content": [
            {
                "type": "text",
                "text": "The future of AI is"
            }]
        }],
        "max_tokens": 1024,
        "temperature": 1.0,
        "top_p": 0.95
    }'

预期结果:

服务返回 HTTP 200 OK,并返回包含 choices 字段的 JSON 响应。示例输出:

{
    "id": "chatcmpl-xxxxxxxxxxxxx",
    "object": "chat.completion",
    "model": "deepseek_v3",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Of course. The future of AI is not a single..."
            },
            "finish_reason": "length"
        }
    ],
    "usage": {
        "prompt_tokens": 9,
        "total_tokens": 1033,
        "completion_tokens": 1024
    }
}

5.2 多节点数据并行部署

  • DeepSeek-V3.1-w8a8-mtp-QuaRot:至少需要 2 台 Atlas 800 A2(64GB × 8)。

分别在两个节点上运行以下脚本。

启动命令:

#!/bin/sh

# this obtained through ifconfig
# nic_name is the network interface name corresponding to local_ip of the current node
nic_name="xxxx"
local_ip="xxxx"

# The value of node0_ip must be consistent with the value of local_ip set in node0 (master node)
node0_ip="xxxx"

# [Optional] jemalloc
# jemalloc is for better performance, if `libjemalloc.so` is installed on your machine, you can turn it on.
# export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD

export HCCL_IF_IP=$local_ip
export GLOO_SOCKET_IFNAME=$nic_name
export TP_SOCKET_IFNAME=$nic_name
export HCCL_SOCKET_IFNAME=$nic_name
export OMP_PROC_BIND=false
export OMP_NUM_THREADS=1
export HCCL_BUFFSIZE=200
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export HCCL_INTRA_PCIE_ENABLE=1
export HCCL_INTRA_ROCE_ENABLE=0

# Ensure the model path matches the directory recorded during download
vllm serve /weights/DeepSeek-V3.1-w8a8-mtp-QuaRot --additional-config '{"scheduler_config":{"enable_balance_scheduling":true}}' \
--host 0.0.0.0 \
--port 8004 \
--data-parallel-size 4 \
--data-parallel-size-local 2 \
--data-parallel-address $node0_ip \
--data-parallel-rpc-port 13389 \
--tensor-parallel-size 4 \
--quantization ascend \
--seed 1024 \
--served-model-name deepseek_v3 \
--enable-expert-parallel \
--max-num-seqs 16 \
--max-model-len 16384 \
--max-num-batched-tokens 4096 \
--trust-remote-code \
--no-enable-prefix-caching \
--gpu-memory-utilization 0.92 \
--speculative-config '{"num_speculative_tokens": 3, "method": "mtp"}' \
--compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}'

启动命令:

#!/bin/sh

# this obtained through ifconfig
# nic_name is the network interface name corresponding to local_ip of the current node
nic_name="xxx"
local_ip="xxx"

# The value of node0_ip must be consistent with the value of local_ip set in node0 (master node)
node0_ip="xxxx"

# [Optional] jemalloc
# jemalloc is for better performance, if `libjemalloc.so` is installed on your machine, you can turn it on.
# export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD

export HCCL_IF_IP=$local_ip
export GLOO_SOCKET_IFNAME=$nic_name
export TP_SOCKET_IFNAME=$nic_name
export HCCL_SOCKET_IFNAME=$nic_name
export OMP_PROC_BIND=false
export OMP_NUM_THREADS=1
export HCCL_BUFFSIZE=200
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export HCCL_INTRA_PCIE_ENABLE=1
export HCCL_INTRA_ROCE_ENABLE=0

# Ensure the model path matches the directory recorded during download
vllm serve /weights/DeepSeek-V3.1-w8a8-mtp-QuaRot --additional-config '{"scheduler_config":{"enable_balance_scheduling":true}}' \
--host 0.0.0.0 \
--port 8004 \
--headless \
--data-parallel-size 4 \
--data-parallel-size-local 2 \
--data-parallel-start-rank 2 \
--data-parallel-address $node0_ip \
--data-parallel-rpc-port 13389 \
--tensor-parallel-size 4 \
--quantization ascend \
--seed 1024 \
--served-model-name deepseek_v3 \
--enable-expert-parallel \
--max-num-seqs 16 \
--max-model-len 16384 \
--max-num-batched-tokens 4096 \
--trust-remote-code \
--no-enable-prefix-caching \
--gpu-memory-utilization 0.92 \
--speculative-config '{"num_speculative_tokens": 3, "method": "mtp"}' \
--compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}'

关键参数说明:

  • --data-parallel-size:所有节点上数据并行 rank 的总数。在此示例中,4 表示模型总共拆分到 4 个 DP rank(每个节点 2 个)。
  • --data-parallel-size-local:在当前节点上运行的数据并行 rank 数量。在此示例中,每个节点运行 2 个 DP rank。
  • --data-parallel-start-rank:本节点上数据并行 rank 的起始偏移量。节点 0 从 rank 0(默认)开始,节点 1 从 rank 2 开始。这确保每个节点的 DP rank 在整体 rank 空间中占据不同的位置。
  • --data-parallel-address:数据并行主节点(节点 0)的 IP 地址。此值必须与节点 0 上设置的 local_ip 一致。
  • --data-parallel-rpc-port:数据并行主通信的 RPC 端口。所有节点必须相同。
  • --headless:表示此 vLLM 实例不是主服务节点。仅在非主节点(节点 1)上设置。主节点(节点 0)不应设置此标志。
  • 对于单节点部署,我们建议使用 dp4 tp4 而不是 dp2 tp8。

常见问题提示:如果遇到问题,请参阅公共常见问题进行故障排查。

服务验证:

curl http://<node_ip>:8015/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "deepseek_v3",
        "messages": [{
            "role": "user",
            "content": [
            {
                "type": "text",
                "text": "The future of AI is"
            }]
        }],
        "max_tokens": 1024,
        "temperature": 1.0,
        "top_p": 0.95
    }'

预期结果:

服务返回 HTTP 200 OK。JSON 响应包含 choices 字段,其中包含生成的文本。

5.3 多节点 PD 分离部署

我们建议使用 Mooncake 进行部署:Mooncake。

在标准单节点部署模式下,Prefill(提示词处理)和 Decode(令牌生成)任务运行在同一组 NPU 上。PD(Prefill-Decode)分离通过将 Prefill 和 Decode 运行在专用节点组上来解决此问题,每个节点组独立配置:

  • Prefill 节点专注于高吞吐量的提示词处理,针对计算和通信进行优化。
  • Decode 节点专注于低延迟的令牌生成,针对内存带宽进行优化。

对于具有并发多用户工作负载的生产部署,推荐采用此架构,因为此类场景同时需要稳定的延迟和高吞吐量。

以 Atlas 800 A3(64GB × 16)为例,我们建议部署 2P1D(4 个节点)而不是 1P1D(2 个节点),因为在 1P1D 情况下 NPU 内存不足以支撑高并发。

  • DeepSeek-V3.1-w8a8-mtp-QuaRot 2P1D Layerwise 需要 4 台 Atlas 800 A3(64GB × 16)。
  • DeepSeek-V3.1-w8a8c8-mtp 2P1D 需要 8 台 950DT 产品(96GB × 8)。

要运行 vllm-ascend 的 Prefill-Decode Disaggregation 服务,需要在每个节点上部署 launch_online_dp.py 脚本和 run_dp_template.sh 脚本,并在 Prefill 主节点上部署 proxy.sh 脚本以转发请求。

launch_online_dp.py

参数说明:

参数 类型 必填 默认值 说明
--dp-size int 是 - 数据并行大小(所有节点上 DP rank 的总数)。
--tp-size int 否 1 每个 DP rank 内的张量并行大小。
--dp-size-local int 否 (与 --dp-size 相同) 当前节点上的 DP rank 数量。如果未设置,默认为 --dp-size。
--dp-rank-start int 否 0 本节点上数据并行 rank 的起始偏移量。
--dp-address str 是 - 数据并行主节点(节点 0)的 IP 地址。
--dp-rpc-port str 否 12345 数据并行主通信的 RPC 端口。
--vllm-start-port int 否 9000 本节点上每个 vLLM 引擎实例的起始端口。每个 DP rank 的引擎端口 = vllm_start_port + 本地 rank 索引。
  1. run_dp_template.sh 脚本(A3)

    # this obtained through ifconfig
    # nic_name is the network interface name corresponding to local_ip of the current node
    nic_name="xxx"
    local_ip="192.xx.xx.1"
    
    # The value of node0_ip must be consistent with the value of local_ip set in node0 (master node)
    node0_ip="xxxx"
    
    # [Optional] jemalloc
    # jemalloc is for better performance, if `libjemalloc.so` is installed on your machine, you can turn it on.
    # export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD
    
    export HCCL_IF_IP=$local_ip
    export GLOO_SOCKET_IFNAME=$nic_name
    export TP_SOCKET_IFNAME=$nic_name
    export HCCL_SOCKET_IFNAME=$nic_name
    
    export VLLM_RPC_TIMEOUT=3600000
    export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000
    export HCCL_EXEC_TIMEOUT=204
    export HCCL_CONNECT_TIMEOUT=120
    
    export OMP_PROC_BIND=false
    export OMP_NUM_THREADS=10
    export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
    export HCCL_BUFFSIZE=256
    export TASK_QUEUE_ENABLE=1
    export HCCL_OP_EXPANSION_MODE="AIV"
    export VLLM_USE_V1=1
    export ASCEND_RT_VISIBLE_DEVICES=$1
    export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/mooncake:$LD_LIBRARY_PATH
    
    # Ensure the model path matches the directory recorded during download
    vllm serve /weights/DeepSeek-V3.1-w8a8-mtp-QuaRot \
        --host 0.0.0.0 \
        --port $2 \
        --data-parallel-size $3 \
        --data-parallel-rank $4 \
        --data-parallel-address $5 \
        --data-parallel-rpc-port $6 \
        --tensor-parallel-size $7 \
        --enable-expert-parallel \
        --seed 1024 \
        --served-model-name deepseek_v3 \
        --max-model-len 65536 \
        --max-num-batched-tokens 16384 \
        --max-num-seqs 8 \
        --enforce-eager \
        --trust-remote-code \
        --gpu-memory-utilization 0.9 \
        --quantization ascend \
        --no-enable-prefix-caching \
        --speculative-config '{"num_speculative_tokens": 1, "method": "mtp"}' \
        --additional-config '{"recompute_scheduler_enable":true}' \
        --kv-transfer-config \
        '{"kv_connector": "MooncakeConnectorV1",
        "kv_role": "kv_producer",
        "kv_port": "30000",
        "kv_connector_extra_config": {
                "prefill": {
                        "dp_size": 2,
                        "tp_size": 8
                },
                "decode": {
                        "dp_size": 32,
                        "tp_size": 1
                }
            }
        }'
    

=== "节点 1(Prefill)" {#node-1prefill}

    ```shell
    # this obtained through ifconfig
    # nic_name is the network interface name corresponding to local_ip of the current node
    nic_name="xxx"
    local_ip="192.xx.xx.2"

    # The value of node0_ip must be consistent with the value of local_ip set in node0 (master node)
    node0_ip="xxxx"

    # [Optional] jemalloc
    # jemalloc is for better performance, if `libjemalloc.so` is installed on your machine, you can turn it on.
    # export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD

    export HCCL_IF_IP=$local_ip
    export GLOO_SOCKET_IFNAME=$nic_name
    export TP_SOCKET_IFNAME=$nic_name
    export HCCL_SOCKET_IFNAME=$nic_name

    export VLLM_RPC_TIMEOUT=3600000
    export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000
    export HCCL_EXEC_TIMEOUT=204
    export HCCL_CONNECT_TIMEOUT=120

    export OMP_PROC_BIND=false
    export OMP_NUM_THREADS=10
    export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
    export HCCL_BUFFSIZE=256
    export TASK_QUEUE_ENABLE=1
    export HCCL_OP_EXPANSION_MODE="AIV"
    export VLLM_USE_V1=1
    export ASCEND_RT_VISIBLE_DEVICES=$1
    export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/mooncake:$LD_LIBRARY_PATH

    # Ensure the model path matches the directory recorded during download
    vllm serve /weights/DeepSeek-V3.1-w8a8-mtp-QuaRot \
        --host 0.0.0.0 \
        --port $2 \
        --data-parallel-size $3 \
        --data-parallel-rank $4 \
        --data-parallel-address $5 \
        --data-parallel-rpc-port $6 \
        --tensor-parallel-size $7 \
        --enable-expert-parallel \
        --seed 1024 \
        --served-model-name deepseek_v3 \
        --max-model-len 65536 \
        --max-num-batched-tokens 16384 \
        --max-num-seqs 8 \
        --enforce-eager \
        --trust-remote-code \
        --gpu-memory-utilization 0.9 \
        --quantization ascend \
        --no-enable-prefix-caching \
        --speculative-config '{"num_speculative_tokens": 1, "method": "mtp"}' \
        --additional-config '{"recompute_scheduler_enable":true}' \
        --kv-transfer-config \
        '{"kv_connector": "MooncakeConnectorV1",
        "kv_role": "kv_producer",
        "kv_port": "30100",
        "kv_connector_extra_config": {
                "prefill": {
                        "dp_size": 2,
                        "tp_size": 8
                },
                "decode": {
                        "dp_size": 32,
                        "tp_size": 1
                }
            }
        }'
    ```

=== "节点 0(Decode)" {#node-0decode}

    ```shell
    # this obtained through ifconfig
    # nic_name is the network interface name corresponding to local_ip of the current node
    nic_name="xxx"
    local_ip="192.xx.xx.3"

    # The value of node0_ip must be consistent with the value of local_ip set in node0 (master node)
    node0_ip="xxxx"

    # [Optional] jemalloc
    # jemalloc is for better performance, if `libjemalloc.so` is installed on your machine, you can turn it on.
    # export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD

    export HCCL_IF_IP=$local_ip
    export GLOO_SOCKET_IFNAME=$nic_name
    export TP_SOCKET_IFNAME=$nic_name
    export HCCL_SOCKET_IFNAME=$nic_name

    export VLLM_RPC_TIMEOUT=3600000
    export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000
    export HCCL_EXEC_TIMEOUT=204
    export HCCL_CONNECT_TIMEOUT=120

    export OMP_PROC_BIND=false
    export OMP_NUM_THREADS=10
    export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
    export HCCL_BUFFSIZE=1100
    export TASK_QUEUE_ENABLE=1
    export HCCL_OP_EXPANSION_MODE="AIV"
    export VLLM_USE_V1=1
    export ASCEND_RT_VISIBLE_DEVICES=$1
    export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/mooncake:$LD_LIBRARY_PATH

    # Ensure the model path matches the directory recorded during download
    vllm serve /weights/DeepSeek-V3.1-w8a8-mtp-QuaRot \
        --host 0.0.0.0 \
        --port $2 \
        --data-parallel-size $3 \
        --data-parallel-rank $4 \
        --data-parallel-address $5 \
        --data-parallel-rpc-port $6 \
        --tensor-parallel-size $7 \
        --enable-expert-parallel \
        --seed 1024 \
        --served-model-name deepseek_v3 \
        --max-model-len 65536 \
        --max-num-batched-tokens 256 \
        --max-num-seqs 28 \
        --trust-remote-code \
        --gpu-memory-utilization 0.92 \
        --quantization ascend \
        --no-enable-prefix-caching \
        --speculative-config '{"num_speculative_tokens": 1, "method": "mtp"}' \
        --compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \
        --additional-config '{"recompute_scheduler_enable":true, "multistream_overlap_shared_expert": true, "finegrained_tp_config": {"lmhead_tensor_parallel_size":16}}' \
        --kv-transfer-config \
        '{"kv_connector": "MooncakeConnectorV1",
        "kv_role": "kv_consumer",
        "kv_port": "30200",
        "kv_connector_extra_config": {
                "prefill": {
                        "dp_size": 2,
                        "tp_size": 8
                },
                "decode": {
                        "dp_size": 32,
                        "tp_size": 1
                }
            }
        }'
    ```

=== "节点 1(Decode)" {#node-1decode}

    ```shell
    # this obtained through ifconfig
    # nic_name is the network interface name corresponding to local_ip of the current node
    nic_name="xxx"
    local_ip="192.xx.xx.4"

    # The value of node0_ip must be consistent with the value of local_ip set in node0 (master node)
    node0_ip="xxxx"

    # [Optional] jemalloc
    # jemalloc is for better performance, if `libjemalloc.so` is installed on your machine, you can turn it on.
    # export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD

    export HCCL_IF_IP=$local_ip
    export GLOO_SOCKET_IFNAME=$nic_name
    export TP_SOCKET_IFNAME=$nic_name
    export HCCL_SOCKET_IFNAME=$nic_name

    export VLLM_RPC_TIMEOUT=3600000
    export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000
    export HCCL_EXEC_TIMEOUT=204
    export HCCL_CONNECT_TIMEOUT=120

    export OMP_PROC_BIND=false
    export OMP_NUM_THREADS=10
    export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
    export HCCL_BUFFSIZE=1100
    export TASK_QUEUE_ENABLE=1
    export HCCL_OP_EXPANSION_MODE="AIV"
    export VLLM_USE_V1=1
    export ASCEND_RT_VISIBLE_DEVICES=$1
    export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/mooncake:$LD_LIBRARY_PATH

    # Ensure the model path matches the directory recorded during download
    vllm serve /weights/DeepSeek-V3.1-w8a8-mtp-QuaRot \
        --host 0.0.0.0 \
        --port $2 \
        --data-parallel-size $3 \
        --data-parallel-rank $4 \
        --data-parallel-address $5 \
        --data-parallel-rpc-port $6 \
        --tensor-parallel-size $7 \
        --enable-expert-parallel \
        --seed 1024 \
        --served-model-name deepseek_v3 \
        --max-model-len 65536 \
        --max-num-batched-tokens 256 \
        --max-num-seqs 28 \
        --trust-remote-code \
        --gpu-memory-utilization 0.92 \
        --quantization ascend \
        --no-enable-prefix-caching \
        --speculative-config '{"num_speculative_tokens": 1, "method": "mtp"}' \
        --compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \
        --additional-config '{"recompute_scheduler_enable":true,"multistream_overlap_shared_expert": true,   "finegrained_tp_config": {"lmhead_tensor_parallel_size":16}}' \
        --kv-transfer-config \
        '{"kv_connector": "MooncakeConnectorV1",
        "kv_role": "kv_consumer",
        "kv_port": "30200",
        "kv_connector_extra_config": {
                "prefill": {
                        "dp_size": 2,
                        "tp_size": 8
                },
                "decode": {
                        "dp_size": 32,
                        "tp_size": 1
                }
            }
        }'
    ```
  1. run_dp_template.sh 脚本(950DT 产品)

    nic_name="xxx"
    local_ip="192.xx.xx.1"
    
    export HCCL_IF_IP=$local_ip
    export GLOO_SOCKET_IFNAME=$nic_name
    export TP_SOCKET_IFNAME=$nic_name
    export HCCL_SOCKET_IFNAME=$nic_name
    
    export VLLM_RPC_TIMEOUT=3600000
    export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000
    export HCCL_EXEC_TIMEOUT=204
    export HCCL_CONNECT_TIMEOUT=120
    export HCCL_BUFFSIZE=1024
    
    export OMP_PROC_BIND=false
    export OMP_NUM_THREADS=10
    export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
    export TASK_QUEUE_ENABLE=1
    
    export DYNAMIC_EPLB="true"
    
    export ASCEND_RT_VISIBLE_DEVICES=$1
    # Ensure the model path matches the directory recorded during download
    vllm serve /weight/dsk_v3.1-T-w8a8c8_attn-0506-full/  \
    --host 0.0.0.0 \
    --port $2 \
    --data-parallel-size $3 \
    --data-parallel-rank $4 \
    --data-parallel-address $5 \
    --data-parallel-rpc-port $6 \
    --tensor-parallel-size $7 \
    --max_model_len 135168 \
    --max-num-batched-tokens 16384 \
    --served-model-name dsv3 \
    --gpu-memory-utilization 0.9 \
    --enable-expert-parallel \
    --async-scheduling \
    --max-num-seqs 128 \
    --no-enable-prefix-caching \
    --trust-remote-code \
    --enforce-eager \
    --speculative-config '{"num_speculative_tokens": 1,"method": "deepseek_mtp"}' \
    --quantization ascend \
    --kv-transfer-config \
        '{"kv_connector": "MooncakeConnectorV1",
        "kv_role": "kv_producer",
        "kv_port": "30100",
        "engine_id": "1",
        "kv_connector_extra_config": {
                    "prefill": {
                            "dp_size": 4,
                            "tp_size": 4
                    },
                    "decode": {
                            "dp_size": 32,
                            "tp_size": 1
                    },
                    "ascend_local_comm_res_path": "/etc/hixlep"
            }
        }' \
    --additional-config '{"enable_cpu_binding":"True","multistream_overlap_shared_expert":false,"enable_shared_expert_dp":true,"enable_mlapo":true,"eplb_config":{"dynamic_eplb": true, "expert_heat_collection_interval": 50, "algorithm_execution_interval": 5, "eplb_policy_type": 2, "num_redundant_experts":16}}'
    
    nic_name="xxx"
    local_ip="192.xx.xx.2"
    
    export HCCL_IF_IP=$local_ip
    export GLOO_SOCKET_IFNAME=$nic_name
    export TP_SOCKET_IFNAME=$nic_name
    export HCCL_SOCKET_IFNAME=$nic_name
    
    export VLLM_RPC_TIMEOUT=3600000
    export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000
    export HCCL_EXEC_TIMEOUT=204
    export HCCL_CONNECT_TIMEOUT=120
    export HCCL_BUFFSIZE=1024
    
    export OMP_PROC_BIND=false
    export OMP_NUM_THREADS=10
    export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
    export TASK_QUEUE_ENABLE=1
    export ASCEND_RT_VISIBLE_DEVICES=$1
    
    # Ensure the model path matches the directory recorded during download
    vllm serve /weight/dsk_v3.1-T-w8a8c8_attn-0506-full/ \
    --host 0.0.0.0 \
    --port $2 \
    --data-parallel-size $3 \
    --data-parallel-rank $4 \
    --data-parallel-address $5 \
    --data-parallel-rpc-port $6 \
    --tensor-parallel-size $7 \
    --max_model_len 135168 \
    --max-num-batched-tokens 256 \
    --served-model-name dsv3 \
    --gpu-memory-utilization 0.9 \
    --enable-expert-parallel \
    --async-scheduling \
    --max-num-seqs 96 \
    --no-enable-prefix-caching \
    --trust-remote-code \
    --safetensors-load-strategy 'prefetch' \
    --compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \
    --speculative-config '{"num_speculative_tokens": 1, "method": "deepseek_mtp"}' \
    --quantization ascend \
    --kv-transfer-config \
        '{"kv_connector": "MooncakeConnectorV1",
        "kv_role": "kv_consumer",
        "kv_port": "30300",
        "engine_id": "3",
        "kv_connector_extra_config": {
                    "prefill": {
                            "dp_size": 4,
                            "tp_size": 4
                    },
                    "decode": {
                            "dp_size": 32,
                            "tp_size": 1
                    },
                    "ascend_local_comm_res_path": "/etc/hixlep"
            }
        }' \
    --additional_config '{"enable_cpu_binding": "True", "recompute_scheduler_enable": true, "multistream_overlap_shared_expert": true, "enable_mlapo": true, "finegrained_tp_config": {"lmhead_tensor_parallel_size":8}}'
    

    关键参数说明:

    - `additional_config.enable_mlapo=true`:启用融合算子,可显著提升性能,但会消耗更多 NPU 内存。在预填充-解码(PD)分离场景中,仅在解码节点上启用 MLAPO。
    - `recompute_scheduler_enable: true`:启用重计算调度器。当解码节点的键值缓存(KV Cache)不足时,请求将被发送到预填充节点以重新计算 KV Cache。在 PD 分离场景中,建议在预填充节点和解码节点上同时启用该配置。
    - `multistream_overlap_shared_expert: true`:当张量并行(TP)大小为 1 或 `enable_shared_expert_dp: true` 时,会启用一个额外流,以重叠共享专家的计算过程,从而提升效率。
    - `lmhead_tensor_parallel_size: 16`:当解码节点的张量并行(TP)大小为 1 时,该参数允许 LMHead 嵌入层的 TP 大小大于 1,用于降低每张卡在 LMHead 嵌入层上的计算负载。
    
  2. 为每个节点运行服务器

    # p0
    python launch_online_dp.py --dp-size 2 --tp-size 8 --dp-size-local 2 --dp-rank-start 0 --dp-address 192.xx.xx.1 --dp-rpc-port 12321 --vllm-start-port 7100
    # p1
    python launch_online_dp.py --dp-size 2 --tp-size 8 --dp-size-local 2 --dp-rank-start 0 --dp-address 192.xx.xx.2 --dp-rpc-port 12321 --vllm-start-port 7100
    # d0
    python launch_online_dp.py --dp-size 32 --tp-size 1 --dp-size-local 16 --dp-rank-start 0 --dp-address 192.xx.xx.3 --dp-rpc-port 12321 --vllm-start-port 7100
    # d1
    python launch_online_dp.py --dp-size 32 --tp-size 1 --dp-size-local 16 --dp-rank-start 16 --dp-address 192.xx.xx.3 --dp-rpc-port 12321 --vllm-start-port 7100
    
    # p0_0
    python launch_online_dp.py --dp-size 4 --tp-size 4 --dp-size-local 2 --dp-rank-start 0 --dp-address 192.xx.xx.1 --dp-rpc-port 12321 --vllm-start-port 7100
    # p0_1
    python launch_online_dp.py --dp-size 4 --tp-size 4 --dp-size-local 2 --dp-rank-start 2 --dp-address 192.xx.xx.1 --dp-rpc-port 12321 --vllm-start-port 7100
    # p1_0
    python launch_online_dp.py --dp-size 4 --tp-size 4 --dp-size-local 2 --dp-rank-start 0 --dp-address 192.xx.xx.2 --dp-rpc-port 12321 --vllm-start-port 7100
    # p1_1
    python launch_online_dp.py --dp-size 4 --tp-size 4 --dp-size-local 2 --dp-rank-start 2 --dp-address 192.xx.xx.2 --dp-rpc-port 12321 --vllm-start-port 7100
    # d0_0
    python launch_online_dp.py --dp-size 32 --tp-size 1 --dp-size-local 8 --dp-rank-start 0 --dp-address 192.xx.xx.3 --dp-rpc-port 12321 --vllm-start-port 7100
    # d0_1
    python launch_online_dp.py --dp-size 32 --tp-size 1 --dp-size-local 8 --dp-rank-start 8 --dp-address 192.xx.xx.3 --dp-rpc-port 12321 --vllm-start-port 7100
    # d0_2
    python launch_online_dp.py --dp-size 32 --tp-size 1 --dp-size-local 8 --dp-rank-start 16 --dp-address 192.xx.xx.3 --dp-rpc-port 12321 --vllm-start-port 7100
    # d0_3
    python launch_online_dp.py --dp-size 32 --tp-size 1 --dp-size-local 8 --dp-rank-start 24 --dp-address 192.xx.xx.3 --dp-rpc-port 12321 --vllm-start-port 7100
    
  3. 在 Prefill 主节点上运行 proxy.sh 脚本(950DT Products 的 proxy.sh 与 A3 一致)

    在与 prefiller 服务实例相同的节点上运行代理服务器。您可以在仓库的 examples 目录中获取代理程序:load_balance_proxy_server_example.py

    python load_balance_proxy_server_example.py \
      --port 1999 \
      --host 192.xx.xx.1 \
      --prefiller-hosts \
        192.xx.xx.1 \
        192.xx.xx.1 \
        192.xx.xx.2 \
        192.xx.xx.2 \
      --prefiller-ports \
        7100 7101 7100 7101 \
      --decoder-hosts \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.3 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
        192.xx.xx.4 \
      --decoder-ports \
        7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 \
        7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115
    
    cd vllm-ascend/examples/disaggregated_prefill_v1/
    bash proxy.sh
    

部署验证:

PD 分离服务完全启动后,通过 Prefill 主节点上的代理端口发送请求,以验证 Prefill 和 Decode 节点能够正确协同工作:

curl http://192.xx.xx.1:1999/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "deepseek_v3",
        "messages": [{
            "role": "user",
            "content": [
            {
                "type": "text",
                "text": "The future of AI is"
            }]
        }],
        "max_tokens": 1024,
        "temperature": 1.0,
        "top_p": 0.95
    }'

预期结果:

代理返回 HTTP 200 OK。JSON 响应包含带有生成文本的 choices 字段,确认 Prefill 节点已成功处理 prompt,且 Decode 节点已生成响应:

{
    "id": "chatcmpl-xxxxxxxxxxxxx",
    "object": "chat.completion",
    "model": "deepseek_v3",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "The future of AI is not a destination we are passively approaching...",
                "finish_reason": "length"
            }
        }
    ],
    "usage": {
        "prompt_tokens": 13,
        "total_tokens": 1037,
        "completion_tokens": 1024
    }
}

常见问题提示:如果遇到 PD 分离部署问题,请参阅公共常见问题进行排查。

6 功能验证

服务器启动后,您可以使用输入 prompt 查询模型:

curl http://<node0_ip>:<port>/v1/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "deepseek_v3",
        "prompt": "The future of AI is",
        "max_completion_tokens": 50,
        "temperature": 0
    }'

7 精度评估

以下是一种精度评估方法。

7.1 使用 AISBench

  1. 有关详细信息,请参阅 使用 AISBench。

  2. 执行后,您可以获取结果。以下是 DeepSeek-V3.1-w8a8-mtp-QuaRot 在 vllm-ascend:0.18.0 中的结果,仅供参考。

数据集 版本 指标 模式 vllm-api-general-chat 备注
ceval - 准确率 生成 90.94 1 台 Atlas 800 A3(64GB × 16)
gsm8k - 准确率 生成 96.28 1 台 Atlas 800 A3(64GB × 16)

7.2 使用语言模型评估框架

尚未测试。

8 性能评估

8.1 使用 AISBench

有关详细信息,请参阅 使用 AISBench 进行性能评估。

性能结果如下:

硬件:A3-752T,4 节点

部署:2P1D,Prefill 节点:DP2+TP8,Decode 节点:DP32+TP1

输入/输出:3.5k/1.5k

性能:TTFT = 6.16s,TPOT = 48.82ms,每张卡的平均性能为 478 TPS(每秒 Token 数)。

8.2 使用 vLLM 基准测试

以运行 DeepSeek-V3.1-w8a8-mtp-QuaRot 的性能评估为例。

有关更多详细信息,请参阅 vllm 基准测试。

vllm bench 有三个子命令:

  • latency:基准测试单个请求批次的延迟。
  • serve:基准测试在线服务吞吐量。
  • throughput:基准测试离线推理吞吐量。

以 serve 为例,按如下方式运行代码。

vllm bench serve --model /weights/DeepSeek-V3.1-w8a8-mtp-QuaRot  --dataset-name random --random-input 1024 --num-prompts 200 --request-rate 1 --save-result --result-dir ./

数分钟后,您可以获取性能评估结果。

9 性能调优

说明:以下配置已在特定测试环境中验证,仅供参考。最佳配置取决于最大输入/输出长度、前缀缓存命中率、精度要求以及部署机器比例等因素。建议根据实际条件参考第 9.2 节进行调优。

表 1:场景概览(A3)

*Total NPUs 表示所有节点使用的 NPU 总数。1 个节点 = 1 台 Atlas 800 A3 服务器(64GB × 16 个 NPU)。

场景 部署模式 *Total NPUs 权重版本 关键考量
高吞吐
(3.5k/16k 输入)
单节点混合 16 (A3) DeepSeek-V3.1-w4a8-perchannel 使用 dp4 tp4 以平衡内存容量和计算效率
低延迟
(3.5k/16k 输入)
单节点混合 16 (A3) DeepSeek-V3.1-w4a8-perchannel 使用 dp2 tp8 以平衡内存容量和计算效率
高吞吐 / 低延迟
(64k 输入)
单节点混合 16 (A3) DeepSeek-V3.1-w4a8-perchannel 使用 dp2 tp8 以平衡内存容量和计算效率
高吞吐 / 低延迟
(3.5k 输入)
2P1D 部署 64 (A3) DeepSeek-V3.1-w4a8-perchannel 使用 dp2 tp8 以平衡内存容量和计算效率
高吞吐 / 低延迟
(16k 输入)
2P1D 部署 64 (A3) DeepSeek-V3.1-w4a8-perchannel 使用 dp2 tp8 以平衡内存容量和计算效率
长上下文
(64k 输入,无前缀缓存)
2P1D 部署 64 (A3) DeepSeek-V3.1-w4a8-perchannel 使用 dp1 tp8 以平衡内存容量和计算效率

表 2:详细节点配置(A3)

场景 配置 NPUs TP DP 最大模型长度 MTP 推测数量
高吞吐(3.5k) 服务器 / 单机 16 4 4 39k 3
高吞吐(16k) 服务器 / 单机 16 4 4 36k 3
低延迟(3.5k) 服务器 / 单机 16 8 2 36k 3
低延迟(16k) 服务器 / 单机 16 8 2 36k 3
高吞吐 / 低延迟(64k) 服务器 / 单机 16 8 2 132k 3
高吞吐(16k) Server-P 节点 16 8 2 36k 1
高吞吐(16k) Server-D 节点 16 4 8 36k 1
低延迟(16k) Server-P 节点 16 8 2 36k 3
低延迟(16k) Server-D 节点 16 4 8 36k 3
长上下文(64k) Server-P 节点 16 16 1 132k 3
长上下文(64k) Server-D 节点 16 4 8 132k 3

表 3:场景概览(950DT Products)

*Total NPUs 表示所有节点使用的 NPU 总数。1 个节点 = 1 台 950DT Products 服务器(96GB × 8 个 NPU)。

场景 部署模式 *Total NPUs 权重版本 关键考量
高吞吐
(3.5k/16k 输入)
单节点混合 8 (950DT Products) DeepseekV3.1-w8a8c8_attn 使用 dp1 tp8 以平衡内存容量和计算效率
低延迟
(3.5k/16k 输入)
单节点混合 8 (950DT Products) DeepseekV3.1-w8a8c8_attn 使用 dp1 tp8 以平衡内存容量和计算效率
高吞吐 / 低延迟
(64k 输入)
单节点混合 8 (950DT Products) DeepseekV3.1-w8a8c8_attn 使用 dp1 tp8 以平衡内存容量和计算效率
高吞吐 / 低延迟
(3.5k 输入)
2P1D 部署 64 (950DT Products) DeepseekV3.1-w8a8c8_attn 使用 dp4 tp4 以平衡内存容量和计算效率
高吞吐 / 低延迟
(16k 输入)
2P1D 部署 64 (950DT Products) DeepseekV3.1-w8a8c8_attn 使用 dp4 tp4 以平衡内存容量和计算效率
长上下文
(64k 输入,无前缀缓存)
2P1D 部署 64 (950DT Products) DeepseekV3.1-w8a8c8_attn 使用 dp4 tp4 以平衡内存容量和计算效率

表 4:详细节点配置(Ascend 950DT)

场景 配置 NPUs TP DP 最大模型长度 MTP 推测数量
高吞吐(3.5k) 服务器 / 单机 8 8 1 39k 3
高吞吐(16k) 服务器 / 单机 8 8 1 36k 3
低延迟(3.5k) 服务器 / 单机 8 8 1 36k 3
低延迟(16k) 服务器 / 单机 8 8 1 36k 3
场景 配置 NPUs TP DP 最大模型长度 MTP 推测数
高吞吐 / 低延迟(64k) 服务器 / 单机 8 8 1 132k 3
高吞吐(16k) Server-P 节点 16 4 4 36k 1
高吞吐(16k) Server-D 节点 32 1 32 36k 1
低延迟(16k) Server-P 节点 16 4 4 36k 3
低延迟(16k) Server-D 节点 32 1 32 36k 3
长上下文(64k) Server-P 节点 16 4 4 132k 3
长上下文(64k) Server-D 节点 32 1 32 132k 3

完整的启动命令和参数说明,请参阅 第 5 章 中的部署示例。

注意: max-model-len 和 max-num-seqs 需要根据实际使用场景进行设置。其他配置请参阅 部署 章节。

9.2 调优指南

请参阅 公开性能调优文档 了解调优方法。

请参阅 功能矩阵 了解详细功能说明。

10 常见问题

对于常见环境、安装和通用参数问题,请参阅 公开常见问题。

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 vl/vllm-ascend