Qwen3.5-397B-A17B#
简介#
Qwen3.5 代表了一次重大飞跃,它整合了多模态学习、架构效率、强化学习规模和全球可访问性方面的突破,为开发者和企业提供了前所未有的能力和效率。
本文档将展示该模型的主要验证步骤,包括支持的功能、功能配置、环境准备、单节点和多节点部署、精度和性能评估。
Qwen3.5-397B-A17B 模型首次在 vllm-ascend:v0.17.0rc1 版本中得到支持。
支持的功能#
请参考支持的功能以获取模型支持的功能矩阵。
请参考特性指南以获取功能的配置信息。
环境准备#
模型权重#
Qwen3.5-397B-A17B(BF16 版本):需要 2 个 Atlas 800 A3 (64G × 16) 节点或 4 个 Atlas 800 A2 (64G × 8) 节点。下载模型权重Qwen3.5-397B-A17B-w8a8(量化版本):需要 1 个 Atlas 800 A3 (64G × 16) 节点或 2 个 Atlas 800 A2 (64G × 8) 节点。下载模型权重
建议将模型权重下载到多个节点的共享目录中,例如 /root/.cache/。
验证多节点通信(可选)#
如果您想部署多节点环境,需要根据验证多节点通信环境来验证多节点通信。
安装#
例如,使用镜像 quay.io/ascend/vllm-ascend:v0.17.0rc1(适用于 Atlas 800 A2)和 quay.io/ascend/vllm-ascend:v0.17.0rc1-a3(适用于 Atlas 800 A3)。
根据您的机器类型选择镜像并在节点上启动 Docker 镜像,请参考使用 Docker。
# Update --device according to your device (Atlas A2: /dev/davinci[0-7] Atlas A3:/dev/davinci[0-15]).
# Update the vllm-ascend image according to your environment.
# Note you should download the weight to /root/.cache in advance.
# Update the vllm-ascend image
export IMAGE=m.daocloud.io/quay.io/ascend/vllm-ascend:v0.18.0
export NAME=vllm-ascend
# Run the container using the defined variables
# Note: If you are running bridge network with docker, please expose available ports for multiple nodes communication in advance.
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/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 \
-it $IMAGE bash
您可以从源码构建所有组件。
安装
vllm-ascend,请参考使用 Python 设置。
如果您想部署多节点环境,需要在每个节点上设置环境。
部署#
单节点部署#
Qwen3.5-397B-A17B-w8a8 可以部署在 1 个 Atlas 800 A3(64G16) 或 2 个 Atlas 800 A2(64G8) 上,需要使用参数 --quantization ascend 启动。
在 1 个 Atlas 800 A3(64G*16) 上运行以下脚本以执行在线 128k 推理。
#!/bin/sh
# Load model from ModelScope to speed up download
export VLLM_USE_MODELSCOPE=True
# To reduce memory fragmentation and avoid out of memory
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export HCCL_OP_EXPANSION_MODE="AIV"
export HCCL_BUFFSIZE=1024
export OMP_NUM_THREADS=1
export TASK_QUEUE_ENABLE=1
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
sysctl -w vm.swappiness=0
sysctl -w kernel.numa_balancing=0
sysctl kernel.sched_migration_cost_ns=50000
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD
export VLLM_ASCEND_ENABLE_FLASHCOMM1=1
vllm serve Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp \
--host 0.0.0.0 \
--port 8000 \
--data-parallel-size 1 \
--tensor-parallel-size 16 \
--enable-expert-parallel \
--seed 1024 \
--quantization ascend \
--served-model-name qwen3.5 \
--max-num-seqs 128 \
--max-model-len 133000 \
--max-num-batched-tokens 16384 \
--trust-remote-code \
--gpu-memory-utilization 0.90 \
--enable-prefix-caching \
--speculative_config '{"method": "qwen3_5_mtp", "num_speculative_tokens": 3, "enforce_eager": true}' \
--compilation-config '{"cudagraph_mode":"FULL_DECODE_ONLY"}' \
--additional-config '{"enable_cpu_binding":true}' \
--async-scheduling
注意:
参数解释如下:
--data-parallel-size1 和--tensor-parallel-size16 是数据并行 (DP) 和张量并行 (TP) 大小的常见设置。--max-model-len表示上下文长度,即单个请求的输入加输出的最大值。--max-num-seqs表示每个 DP 组允许处理的最大请求数。如果发送到服务的请求数超过此限制,多余的请求将保持在等待状态,不会被调度。请注意,在等待状态所花费的时间也会计入 TTFT 和 TPOT 等指标。因此,在测试性能时,通常建议--max-num-seqs*--data-parallel-size>= 实际总并发数。--max-num-batched-tokens表示模型单步可以处理的最大 token 数。目前,vLLM v1 调度默认启用 ChunkPrefill/SplitFuse,这意味着:(1) 如果请求的输入长度大于
--max-num-batched-tokens,它将根据--max-num-batched-tokens被分成多轮计算;(2) 解码请求优先调度,只有在有可用容量时才调度预填充请求。
通常,如果
--max-num-batched-tokens设置得较大,整体延迟会更低,但 GPU 内存(激活值使用)的压力会更大。
--gpu-memory-utilization表示 vLLM 将用于实际推理的 HBM 比例。其核心功能是计算可用的 kv_cache 大小。在预热阶段(vLLM 中称为 profile run),vLLM 会记录输入大小为--max-num-batched-tokens的推理过程中的峰值 GPU 内存使用量。然后,可用的 kv_cache 大小计算为:--gpu-memory-utilization* HBM 大小 - 峰值 GPU 内存使用量。因此,--gpu-memory-utilization的值越大,可用的 kv_cache 就越多。然而,由于预热阶段的 GPU 内存使用量可能与实际推理时不同(例如,由于 EP 负载不均),将--gpu-memory-utilization设置得过高可能导致实际推理时出现 OOM(内存不足)问题。默认值为0.9。--enable-expert-parallel表示启用了 EP。请注意,vLLM 不支持 ETP 和 EP 的混合方法;也就是说,MoE 要么使用纯 EP,要么使用纯 TP。--no-enable-prefix-caching表示前缀缓存被禁用。要启用它,对于类似 Mamba 的模型 Qwen3.5,请设置--enable-prefix-caching和--mamba-cache-mode align。请注意,当前混合 kv cache 的实现可能在调度时导致非常大的 block_size。例如,block_size 可能被调整为 2048,这意味着任何短于 2048 的前缀将永远不会被缓存。--quantization"ascend" 表示使用了量化。要禁用量化,请移除此选项。--compilation-config包含与 aclgraph 图模式相关的配置。最重要的配置是 "cudagraph_mode" 和 "cudagraph_capture_sizes",其含义如下:"cudagraph_mode":表示特定的图模式。目前支持 "PIECEWISE" 和 "FULL_DECODE_ONLY"。图模式主要用于降低算子调度的开销。目前推荐使用 "FULL_DECODE_ONLY"。"cudagraph_capture_sizes":表示不同级别的图模式。默认值为 [1, 2, 4, 8, 16, 24, 32, 40,...,
--max-num-seqs]。在图模式下,不同级别图的输入是固定的,级别之间的输入会自动填充到下一个级别。目前推荐使用默认设置。只有在某些场景下,才需要单独设置此参数以达到最佳性能。
使用 MP 的多节点部署(推荐)#
假设您有 2 个 Atlas 800 A2 节点,并希望跨多个节点部署 Qwen3.5-397B-A17B-w8a8-mtp 模型。
节点 0
#!/bin/sh
# Load model from ModelScope to speed up download
export VLLM_USE_MODELSCOPE=True
# To reduce memory fragmentation and avoid out of memory
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
# 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"
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=1024
export TASK_QUEUE_ENABLE=1
vllm serve Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp \
--host 0.0.0.0 \
--port 8000 \
--data-parallel-size 2 \
--api-server-count 2 \
--data-parallel-size-local 1 \
--data-parallel-address $local_ip \
--data-parallel-rpc-port 13389 \
--seed 1024 \
--served-model-name qwen3.5 \
--tensor-parallel-size 8 \
--enable-expert-parallel \
--max-num-seqs 16 \
--max-model-len 32768 \
--max-num-batched-tokens 4096 \
--trust-remote-code \
--async-scheduling \
--gpu-memory-utilization 0.9 \
--no-enable-prefix-caching \
--speculative_config '{"method": "qwen3_5_mtp", "num_speculative_tokens": 3, "enforce_eager": true}' \
--compilation-config '{"cudagraph_mode":"FULL_DECODE_ONLY"}' \
--additional-config '{"enable_cpu_binding":true, "multistream_overlap_shared_expert": true}'
节点 1
#!/bin/sh
# Load model from ModelScope to speed up download
export VLLM_USE_MODELSCOPE=True
# To reduce memory fragmentation and avoid out of memory
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
# 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"
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=1024
export TASK_QUEUE_ENABLE=1
vllm serve Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp \
--host 0.0.0.0 \
--port 8000 \
--headless \
--data-parallel-size 2 \
--data-parallel-size-local 1 \
--data-parallel-start-rank 1 \
--data-parallel-address $node0_ip \
--data-parallel-rpc-port 13389 \
--seed 1024 \
--tensor-parallel-size 8 \
--served-model-name qwen3.5 \
--max-num-seqs 16 \
--max-model-len 32768 \
--max-num-batched-tokens 4096 \
--enable-expert-parallel \
--trust-remote-code \
--async-scheduling \
--gpu-memory-utilization 0.9 \
--no-enable-prefix-caching \
--speculative_config '{"method": "qwen3_5_mtp", "num_speculative_tokens": 3, "enforce_eager": true}' \
--compilation-config '{"cudagraph_mode":"FULL_DECODE_ONLY"}' \
--additional-config '{"enable_cpu_binding":true, "multistream_overlap_shared_expert": true}'
如果服务启动成功,节点 0 上将显示以下信息:
INFO: Started server process [44610]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Started server process [44611]
INFO: Waiting for application startup.
INFO: Application startup complete.
使用 Ray 的多节点部署#
预填充-解码解耦#
我们推荐使用 Mooncake 进行部署:Mooncake。
以 Atlas 800 A3 (64G × 16) 为例,我们建议部署 1P1D(3 个节点)来运行 Qwen3.5-397B-A17B。
Qwen3.5-397B-A17B-w8a8-mtp 1P1D需要 3 个 Atlas 800 A3 (64G × 16)。
要运行 vllm-ascend Prefill-Decode Disaggregation 服务,您需要在每个节点上部署 run_p.sh、run_d0.sh 和 run_d1.sh 脚本,并在预填充主节点上部署一个 proxy.sh 脚本来转发请求。
预填充节点 0
run_p.sh脚本```shell unset ftp_proxy unset https_proxy unset http_proxy # 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" # [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 VLLM_ENGINE_READY_TIMEOUT_S=30000 # Timeout (in seconds) for automatically releasing the prefiller’s KV cache for a particular request. export VLLM_MOONCAKE_ABORT_REQUEST_TIMEOUT=480 export IP_ADDRESS=$local_ip export NETWORK_CARD_NAME=$nic_name export HCCL_IF_IP=$IP_ADDRESS export GLOO_SOCKET_IFNAME=$NETWORK_CARD_NAME export TP_SOCKET_IFNAME=$NETWORK_CARD_NAME export HCCL_SOCKET_IFNAME=$NETWORK_CARD_NAME export VLLM_USE_V1=1 export HCCL_BUFFSIZE=1536 export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages:$LD_LIBRARY_PATH export PYTORCH_NPU_ALLOC_CONF="expandable_segments:True" export VLLM_TORCH_PROFILER_WITH_STACK=0 export TASK_QUEUE_ENABLE=1 export HCCL_OP_EXPANSION_MODE="AIV" export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 vllm serve Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp \ --host ${IP_ADDRESS} \ --port 30060 \ --no-enable-prefix-caching \ --enable-expert-parallel \ --data-parallel-size 8 \ --data-parallel-size-local 8 \ --api-server-count 1 \ --data-parallel-address ${IP_ADDRESS} \ --max-num_seqs 64 \ --data-parallel-rpc-port 6884 \ --tensor-parallel-size 2 \ --seed 1024 \ --distributed-executor-backend mp \ --served-model-name qwen3.5 \ --max-model-len 16384 \ --max-num-batched-tokens 4096 \ --trust-remote-code \ --quantization ascend \ --no-disable-hybrid-kv-cache-manager \ --speculative_config '{"method": "qwen3_5_mtp", "num_speculative_tokens": 3, "enforce_eager": true}' \ --additional-config '{"recompute_scheduler_enable": true, "enable_cpu_binding": true}' \ --gpu-memory-utilization 0.9 \ --enforce-eager \ --kv-transfer-config \ '{"kv_connector": "MooncakeLayerwiseConnector", "kv_role": "kv_producer", "kv_port": "23010", "engine_id": "0", "kv_connector_extra_config": { "prefill": { "dp_size": 8, "tp_size": 2 }, "decode": { "dp_size": 16, "tp_size": 2 } } }' ```解码节点 0
run_d0.sh脚本```shell unset ftp_proxy unset https_proxy unset http_proxy #!/bin/bash # 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" export VLLM_ENGINE_READY_TIMEOUT_S=30000 # Timeout (in seconds) for automatically releasing the prefiller’s KV cache for a particular request. export VLLM_MOONCAKE_ABORT_REQUEST_TIMEOUT=480 export MASTER_IP_ADDRESS=$node0_ip export IP_ADDRESS=$local_ip export NETWORK_CARD_NAME=$nic_name export HCCL_IF_IP=$IP_ADDRESS export GLOO_SOCKET_IFNAME=$NETWORK_CARD_NAME export TP_SOCKET_IFNAME=$NETWORK_CARD_NAME export HCCL_SOCKET_IFNAME=$NETWORK_CARD_NAME export VLLM_USE_V1=1 export HCCL_BUFFSIZE=1536 export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages:$LD_LIBRARY_PATH export PYTORCH_NPU_ALLOC_CONF="expandable_segments:True" export VLLM_TORCH_PROFILER_WITH_STACK=0 export TASK_QUEUE_ENABLE=1 export VLLM_ASCEND_ENABLE_FUSED_MC2=1 export HCCL_OP_EXPANSION_MODE="AIV" export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 vllm serve Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp \ --host ${IP_ADDRESS} \ --port 30050 \ --no-enable-prefix-caching \ --enable-expert-parallel \ --data-parallel-size 16 \ --data-parallel-size-local 8 \ --data-parallel-start-rank 0 \ --api-server-count 1 \ --data-parallel-address ${MASTER_IP_ADDRESS} \ --max-num_seqs 32 \ --data-parallel-rpc-port 6884 \ --tensor-parallel-size 2 \ --seed 1024 \ --distributed-executor-backend mp \ --served-model-name qwen3.5 \ --max-model-len 16384 \ --max-num-batched-tokens 128 \ --trust-remote-code \ --quantization ascend \ --no-disable-hybrid-kv-cache-manager \ --speculative_config '{"method": "qwen3_5_mtp", "num_speculative_tokens": 3, "enforce_eager": true}' \ --additional-config '{"recompute_scheduler_enable": true, "enable_cpu_binding": true}' \ --compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \ --gpu-memory-utilization 0.96 \ --kv-transfer-config \ '{"kv_connector": "MooncakeLayerwiseConnector", "kv_buffer_device": "npu", "kv_role": "kv_consumer", "kv_port": "36010", "engine_id": "1", "kv_connector_extra_config": { "prefill": { "dp_size": 8, "tp_size": 2 }, "decode": { "dp_size": 16, "tp_size": 2 } } }' ```解码节点 1
run_d1.sh脚本```shell unset ftp_proxy unset https_proxy unset http_proxy #!/bin/bash # 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" export VLLM_ENGINE_READY_TIMEOUT_S=30000 # Timeout (in seconds) for automatically releasing the prefiller’s KV cache for a particular request. export VLLM_MOONCAKE_ABORT_REQUEST_TIMEOUT=480 export MASTER_IP_ADDRESS=$node0_ip export IP_ADDRESS=$local_ip export NETWORK_CARD_NAME=$nic_name export HCCL_IF_IP=$IP_ADDRESS export GLOO_SOCKET_IFNAME=$NETWORK_CARD_NAME export TP_SOCKET_IFNAME=$NETWORK_CARD_NAME export HCCL_SOCKET_IFNAME=$NETWORK_CARD_NAME export VLLM_USE_V1=1 export HCCL_BUFFSIZE=1536 export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages:$LD_LIBRARY_PATH export PYTORCH_NPU_ALLOC_CONF="expandable_segments:True" export VLLM_TORCH_PROFILER_WITH_STACK=0 export TASK_QUEUE_ENABLE=1 export VLLM_ASCEND_ENABLE_FUSED_MC2=1 export HCCL_OP_EXPANSION_MODE="AIV" vllm serve Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp \ --host ${IP_ADDRESS} \ --port 30050 \ --headless \ --no-enable-prefix-caching \ --enable-expert-parallel \ --data-parallel-size 16 \ --data-parallel-size-local 8 \ --data-parallel-start-rank 8 \ --data-parallel-address ${MASTER_IP_ADDRESS} \ --max-num_seqs 32 \ --data-parallel-rpc-port 6884 \ --tensor-parallel-size 2 \ --seed 1024 \ --distributed-executor-backend mp \ --served-model-name qwen3.5 \ --max-model-len 16384 \ --max-num-batched-tokens 128 \ --trust-remote-code \ --quantization ascend \ --no-disable-hybrid-kv-cache-manager \ --speculative_config '{"method": "qwen3_5_mtp", "num_speculative_tokens": 3, "enforce_eager": true}' \ --additional-config '{"recompute_scheduler_enable": true, "enable_cpu_binding": true}' \ --compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \ --gpu-memory-utilization 0.96 \ --kv-transfer-config \ '{"kv_connector": "MooncakeLayerwiseConnector", "kv_buffer_device": "npu", "kv_role": "kv_consumer", "kv_port": "36010", "engine_id": "2", "kv_connector_extra_config": { "prefill": { "dp_size": 8, "tp_size": 2 }, "decode": { "dp_size": 16, "tp_size": 2 } } }' ``` **Notice:** The parameters are explained as follows: - `--async-scheduling`: enables the asynchronous scheduling function. When Multi-Token Prediction (MTP) is enabled, asynchronous scheduling of operator delivery can be implemented to overlap the operator delivery latency. - `cudagraph_capture_sizes`: The recommended value is `n x (mtp + 1)`. And the min is `n = 1` and the max is `n = max-num-seqs`. For other values, it is recommended to set them to the number of frequently occurring requests on the Decode (D) node. - `recompute_scheduler_enable: true`: enables the recomputation scheduler. When the Key-Value Cache (KV Cache) of the decode node is insufficient, requests will be sent to the prefill node to recompute the KV Cache. In the PD separation scenario, it is recommended to enable this configuration on both prefill and decode nodes simultaneously. - `--no-enable-prefix-caching`: The prefix-cache feature is enabled by default. You can use the `--no-enable-prefix-caching` parameter to disable this feature. Notice: for Prefill-Decode disaggregation feature, known issue on D node: [#7944](https://github.com/vllm-project/vllm-ascend/issues/7944)在预填充主节点上运行
proxy.sh脚本
在与预填充服务实例相同的节点上运行一个代理服务器。您可以在仓库的示例中找到代理程序:load_balance_proxy_server_example.py
unset ftp_proxy
unset https_proxy
unset http_proxy
#/bin/bash
if [[ "$offset" == "" ]]; then
offset=0
fi
python3 load_balance_proxy_layerwise_server_example.py \
--prefiller-hosts 141.xx.xx.1 \
--prefiller-ports 30060 \
--decoder-hosts 141.xx.xx.2 \
--decoder-ports 30050 \
--host 141.xx.xx.1 \
--port 8010
cd vllm-ascend/examples/disaggregated_prefill_v1/
bash proxy.sh
功能验证#
服务器启动后,您可以使用输入提示词查询模型:
curl http://<node0_ip>:<port>/v1/completions \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5",
"prompt": "The future of AI is",
"max_completion_tokens": 50,
"temperature": 0
}'
精度评估#
以下是两种精度评估方法。
使用 AISBench#
详情请参阅使用 AISBench。
执行后,您可以获得结果,以下是
vllm-ascend:v0.17.0rc1中Qwen3.5-397B-A17B-w8a8的结果,仅供参考。
数据集 |
版本 |
指标 |
模式 |
vllm-api-general-chat |
|---|---|---|---|---|
gsm8k |
- |
准确率 |
生成 |
96.74 |
性能#
使用 AISBench#
详情请参阅使用 AISBench 进行性能评估。
使用 vLLM Benchmark#
以运行 Qwen3.5-397B-A17B-w8a8 的性能评估为例。
更多详情请参阅 vllm benchmark。
vllm bench 有三个子命令:
latency:对单批请求的延迟进行基准测试。serve:对在线服务吞吐量进行基准测试。throughput:对离线推理吞吐量进行基准测试。
以 serve 为例。运行代码如下。
export VLLM_USE_MODELSCOPE=True
vllm bench serve --model Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp --dataset-name random --random-input 200 --num-prompts 200 --request-rate 1 --save-result --result-dir ./
大约几分钟后,您将获得性能评估结果。
Qwen3.5-397B-A17B 已知问题#
问题1:在单节点部署场景下,当启用 fused_mc2 时,使用多 DP 模型部署可能会导致模型触发重计算后输出乱码或为空。在通过调整模型并行度来调优性能时,请确保当 DP > 1 时禁用此融合算子。对于 PD 部署场景,D 节点可以通过启用重计算调度器来避免此问题。