meta: title: "DeepSeek-V4-Flash" slug: "deepseek-v4-flash" provider: "DeepSeek" description: "DeepSeek V4 MoE model with hybrid CSA+HCA attention, manifold-constrained hyper-connections, and three-tier reasoning (Non-think / Think High / Think Max)." date_added: 2026-08-03 date_updated: 2026-11-07 difficulty: advanced tasks: - text related_recipes: - "deepseek-ai/DeepSeek-V3.2" performance_headline: "Compact 284B/13B V4 sibling — single-node 1M-context serving with W8A8 weights and MTP" hardware: atlas_800_a3: verified atlas_800_a2: verified ascend_950dt: verified model: model_id: "deepseek-ai/DeepSeek-V4-Flash" min_vllm_version: "v0.23.0rc1" architecture: moe parameter_count: "284B" active_parameters: "13B" context_length: 1048576 modality: text base_args: - "--trust-remote-code" - "--tokenizer-mode" - "deepseek_v4" - "--tool-call-parser" - "deepseek_v4" - "--enable-auto-tool-choice" - "--reasoning-parser" - "deepseek_v4" - "--enable-expert-parallel" - "--safetensors-load-strategy" - "prefetch" base_env: HCCL_OP_EXPANSION_MODE: "AIV" HCCL_BUFFSIZE: "1024" PYTORCH_NPU_ALLOC_CONF: "expandable_segments:True" OMP_PROC_BIND: "false" OMP_NUM_THREADS: "10" TASK_QUEUE_ENABLE: "1" LD_PRELOAD: "/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD" docker_image: atlas_800_a2: "quay.io/ascend/vllm-ascend:v0.23.0rc1" atlas_800_a3: "quay.io/ascend/vllm-ascend:v0.30.0rc2-a3" ascend_950dt: "swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/vllm-ascend:v0.23.0-a5" nightly_required: false install: # Ascend recommends Docker; pip requires source build (no official wheel), so the pip tab is hidden. pip: false docker: command: "docker run --rm --net=host --shm-size=512g -v /root/.cache/modelscope:/root/.cache/modelscope --device /dev/davinci0 --device /dev/davinci1 --device /dev/davinci2 --device /dev/davinci3 --device /dev/davinci4 --device /dev/davinci5 --device /dev/davinci6 --device /dev/davinci7 -it quay.io/ascend/vllm-ascend:v0.23.0rc1 bash" note: "Official Ascend image; the weights directory (/root/.cache/modelscope) is mounted into the container; device/driver mounts are covered in env_setup.container." # Upstream alignment: features / variants / strategies / hardware_overrides / guide # (shape mirrors vllm-project/recipes; scenarios/config_params below remain our # CI-execution extension and are ignored by the upstream builder) features: expert_parallel: description: "MoE expert parallelism across the DP ranks" args: ["--enable-expert-parallel"] tool_calling: description: "DeepSeek-V4 native tool calling" args: ["--enable-auto-tool-choice", "--tool-call-parser", "deepseek_v4"] reasoning: description: "Three-tier reasoning (Non-think / Think High / Think Max)" args: ["--reasoning-parser", "deepseek_v4"] spec_decoding: label: "MTP Spec Decoding" description: "MTP (Multi-Token Prediction) speculative decoding with 1 token for accelerated inference" args: ["--speculative-config", '{"num_speculative_tokens": 1, "method": "mtp", "enforce_eager": true}'] flashcomm1: label: "FlashComm1" description: "FlashComm communication optimization for inter-chip bandwidth" env: VLLM_ASCEND_ENABLE_FLASHCOMM1: "1" prefix_caching: label: "Prefix Caching" description: "KV-cache prefix caching (--enable-prefix-caching / --no-enable-prefix-caching)" args: ["--enable-prefix-caching"] flag_when_false: "--no-enable-prefix-caching" async_scheduling: label: "Async Scheduling" description: "Asynchronous scheduling to overlap CPU scheduling with NPU computation" args: ["--async-scheduling"] compilation_config: label: "Compilation Config" description: "Full ACL graph execution in decode (--compilation-config cudagraph_mode=FULL_DECODE_ONLY) to reduce scheduling latency" args: ["--compilation-config", '{"cudagraph_mode":"FULL_DECODE_ONLY"}'] cpu_binding: label: "CPU Binding" description: "CPU core binding for reduced NUMA latencies" args: ["--additional-config", '{"enable_cpu_binding": true}'] multistream_overlap: label: "Multi-stream Overlap" description: "Multi-stream overlap for MoE shared expert computation" args: ["--additional-config", '{"multistream_overlap_shared_expert": true}'] npugraph_ex: label: "NPUGraph EX" description: "NPUGraph EX for accelerated graph execution" args: ["--additional-config", '{"ascend_compilation_config": {"enable_npugraph_ex": true, "enable_static_kernel": false}}'] opt_in_features: - prefix_caching - cpu_binding - multistream_overlap - npugraph_ex variants: default: precision: W8A8 vram_minimum_gb: 341 description: "W8A8 weights on Atlas 800 A2/A3 — single-node or multi-node PD" supported_hardware: [atlas_800_a2, atlas_800_a3] w8a8_mtp: model_id: "Eco-Tech/DeepSeek-V4-Flash-w8a8-mtp" precision: W8A8 vram_minimum_gb: 341 description: "W8A8 + MTP weights used by the tutorial baselines" supported_hardware: [atlas_800_a2, atlas_800_a3] a5_original: model_id: "deepseek-ai/DeepSeek-V4-Flash" precision: MXFP4/MXFP8 vram_minimum_gb: 341 description: "Original MXFP4/MXFP8 weights for one Ascend 950DT node" supported_hardware: [ascend_950dt] compatible_strategies: - single_node_A2 - single_node_A3 - single_node_A5 - pd_cluster hardware_overrides: ascend_a3: extra_args: - "--compilation-config" - '{"cudagraph_mode": "FULL_DECODE_ONLY"}' extra_env: # HCCL_BUFFSIZE overrides base_env (1024) for A3; FlashComm1 env is # declared once in `features.flashcomm1`, not duplicated here. HCCL_BUFFSIZE: "2560" ascend_a2: extra_args: - "--compilation-config" - '{"cudagraph_mode": "FULL_DECODE_ONLY"}' extra_env: HCCL_BUFFSIZE: "1024" ascend_a5: extra_args: - "--block-size" - "32" - "--compilation-config" - '{"cudagraph_mode": "FULL_DECODE_ONLY"}' extra_env: HCCL_BUFFSIZE: "1024" strategy_overrides: # A3 PD is 1P1D; the A2 8-machine PD uses 4 decode nodes. pd_cluster: prefill: nodes: { default: 1 } decode: nodes: { default: 1, atlas_800_a2: 4 } dependencies: - note: "ModelScope is used to download the W8A8 weights" command: "pip install modelscope" guide: "" performance_model_names: - "DeepSeek-V4-Flash" # Tutorial content lives in overview / prerequisites / env_setup / scenarios # (upstream ignores those); guide kept as an upstream-compatible placeholder. # — Configurable VALUE params (page/CI extension; defaults = tutorial baseline). # Boolean toggles live in `features` (upstream field) with label/args/env # and our `default`/`flag_when_false` extensions; the page renders both. — config_params: max_model_len: default: 1048576 type: number description: "Maximum context length (input + output tokens for one request); adjust per your actual scenario" max_num_seqs: default: 32 type: number description: "Maximum number of concurrent sequences per DP group" gpu_memory_utilization: default: 0.9 type: number description: "Fraction of NPU memory available for the KV cache" overview: |- DeepSeek-V4-Flash is a 284B-total / 13B-active MoE model in the V4 preview family. It pairs a **hybrid attention stack** — Compressed Sparse Attention (CSA) + Heavily Compressed Attention (HCA) — with **Manifold-Constrained Hyper-Connections (mHC)** to reach 27% of V3.2's per-token inference FLOPs and 10% of V3.2's KV cache at 1M context. Pre-trained on 32T+ tokens; post-training is a two-stage pipeline (domain- specific expert cultivation + unified consolidation via on-policy distillation). weight_download: - weight_version: W8A8-MTP (Pre-quantized) sources: - source: ModelScope url: https://www.modelscope.cn/models/Eco-Tech/DeepSeek-V4-Flash-w8a8-mtp command: |- ```bash pip install modelscope modelscope download --model Eco-Tech/DeepSeek-V4-Flash-w8a8-mtp ``` - weight_version: Original MXFP4/MXFP8 (A5) sources: - source: Hugging Face url: https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash command: |- Place the original `DeepSeek-V4-Flash` weights on the runner host at `/mnt/share/modelscope/hub/models/models--deepseek-ai--DeepSeek-V4-Flash`. The A5 container mounts this location at `/root/.cache/modelscope/hub/models/models--deepseek-ai--DeepSeek-V4-Flash`. prerequisites: - title: Model Weight content: |- - `DeepSeek-V4-Flash-w8a8-mtp` (Quantized version): requires 1 Atlas 800 A3 (128G × 8) node or 1 Atlas 800 A2 (64G × 8) node. [Download model weight](https://www.modelscope.cn/models/Eco-Tech/DeepSeek-V4-Flash-w8a8-mtp) - Original `DeepSeek-V4-Flash` weights for A5: require 1 Ascend 950DT (96G × 8) node. [Download model weight](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash) Download the A5 original weights to the runner shared directory `/mnt/share/modelscope/hub/models/models--deepseek-ai--DeepSeek-V4-Flash`; it is mounted as `/root/.cache` inside the A5 container. - title: Verify Multi-node Communication content: |- If you want to deploy a multi-node environment, you need to verify multi-node communication according to [verify multi-node communication environment](https://docs.vllm.ai/projects/ascend/en/latest/installation.html#verify-multi-node-communication). env_setup: container: A3: content: |- Select an image based on your machine type and start the docker image on your node, refer to [using docker](https://docs.vllm.ai/projects/ascend/en/latest/installation.html#set-up-using-docker). Start the docker image on each node. ```bash export IMAGE=quay.io/ascend/vllm-ascend:v0.30.0rc2-a3 docker run --rm \ --name vllm-ascend \ --shm-size=512g \ --net=host \ --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 /etc/hccn.conf:/etc/hccn.conf \ -it $IMAGE bash ``` A2: content: |- Select an image based on your machine type and start the docker image on your node, refer to [using docker](https://docs.vllm.ai/projects/ascend/en/latest/installation.html#set-up-using-docker). Start the docker image on each node. ```bash export IMAGE=quay.io/ascend/vllm-ascend:v0.23.0rc1 docker run --rm \ --name vllm-ascend \ --shm-size=512g \ --net=host \ --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 /etc/hccn.conf:/etc/hccn.conf \ -it $IMAGE bash ``` After a successful docker run, you can verify the running container service by executing the `docker ps` command. A5: content: |- Use the A5 image on the `linux-aarch64-a5-8` runner. ```bash export IMAGE=swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/vllm-ascend:v0.23.0-a5 docker run --rm \ --name vllm-ascend \ --shm-size=512g \ --net=host \ --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/hccl_rootinfo.json:/etc/hccl_rootinfo.json \ -v /etc/hixlep/:/etc/hixlep/ \ -v /mnt/share:/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 \ -it $IMAGE bash ``` pip: content: |- If you don't want to use the docker image as above, you can also build all from source: - Install `vllm-ascend` from source, refer to [installation](https://docs.vllm.ai/projects/ascend/en/latest/installation.html). If you want to deploy a multi-node environment, you need to set up the environment on each node. extra_config: - key: dsa-cp label: DSA CP scenarios: - npu: Atlas 800I A2 precision: W8A8 deployment: Single-Node case: High Throughput tags: [a2-single] strategy: single_node_A2 steps: - title: Start the server content: |- Single-node deployment completes both Prefill and Decode within the same node. The quantized model `DeepSeek-V4-Flash-w8a8-mtp` can be deployed on 1 Atlas 800 A3 (128G × 8) or 1 Atlas 800 A2 (64G × 8). Run the following script to execute online inference. ```shell export OMP_PROC_BIND=false export OMP_NUM_THREADS=10 export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD export HCCL_BUFFSIZE=1024 {{flashcomm1}} export TASK_QUEUE_ENABLE=1 export HCCL_OP_EXPANSION_MODE="AIV" vllm serve your_model_path \ --max-model-len {{max_model_len}} \ --max-num-batched-tokens 8192 \ --served-model-name dsv4 \ --gpu-memory-utilization {{gpu_memory_utilization}} \ --max-num-seqs {{max_num_seqs}} \ --data-parallel-size 1 \ --tensor-parallel-size 8 \ --enable-expert-parallel \ --tokenizer-mode deepseek_v4 \ --tool-call-parser deepseek_v4 \ --enable-auto-tool-choice \ --reasoning-parser deepseek_v4 \ --safetensors-load-strategy 'prefetch' \ {{prefix_caching}} \ --model-loader-extra-config='{"enable_multithread_load": "true", "num_threads": 128}' \ --quantization ascend \ --port 8900 \ --block-size 128 \ {{spec_decoding}} \ {{compilation_config}} \ {{async_scheduling}} \ --additional-config '{"ascend_compilation_config":{%%CONFIG:npugraph_ex%%"enable_npugraph_ex":true,%%/CONFIG:npugraph_ex%%"enable_static_kernel":false}%%CONFIG:cpu_binding%%,"enable_cpu_binding": true%%/CONFIG:cpu_binding%%%%CONFIG:dsa-cp%%,"enable_dsa_cp": true%%/CONFIG:dsa-cp%%%%CONFIG:multistream_overlap%%,"multistream_overlap_shared_expert":true%%/CONFIG:multistream_overlap%%}' ``` Key Parameter Descriptions: - `--max-model-len` specifies the maximum context length - that is, the sum of input and output tokens for a single request. Adjust it according to your actual scenario. - `--speculative-config` configures the MTP (Multi-Token Prediction) speculative decoding to accelerate inference. - `--compilation-config '{"cudagraph_mode":"FULL_DECODE_ONLY"}'` enables full ACL graph execution in the decode phase to reduce scheduling latency. - `--async-scheduling` enables asynchronous scheduling to overlap CPU scheduling with NPU computation. - `VLLM_ASCEND_ENABLE_FLASHCOMM1=1` enables the FlashComm communication optimization. Common Issues Tip: If you encounter issues, please refer to the [Public FAQ](https://docs.vllm.ai/projects/ascend/en/latest/faqs.html) for troubleshooting. - title: Service Verification content: |- ```shell curl http://:8900/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "dsv4", "messages": [ { "role": "user", "content": "Who are you?" } ], "max_tokens": 256, "temperature": 0 }' ``` Expected Result: The service returns HTTP 200 OK with a JSON response containing the `choices` field. - npu: Atlas 800I A3 precision: W8A8 deployment: Single-Node case: Low Latency tags: [a3-single] strategy: single_node_A3 steps: - title: Start the server content: |- Single-node deployment completes both Prefill and Decode within the same node. The quantized model `DeepSeek-V4-Flash-w8a8-mtp` can be deployed on 1 Atlas 800 A3 (128G × 8) or 1 Atlas 800 A2 (64G × 8). Run the following script to execute online inference. ```shell export OMP_PROC_BIND=false export OMP_NUM_THREADS=10 export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD export HCCL_BUFFSIZE=1024 {{flashcomm1}} export TASK_QUEUE_ENABLE=1 export HCCL_OP_EXPANSION_MODE="AIV" export VLLM_PREFIX_CACHE_RETENTION_INTERVAL=4096 vllm serve your_model_path \ --max-model-len {{max_model_len}} \ --max-num-batched-tokens 10240 \ --served-model-name dsv4 \ --gpu-memory-utilization {{gpu_memory_utilization}} \ --api-server-count 1 \ --max-num-seqs {{max_num_seqs}} \ --data-parallel-size 4 \ --tensor-parallel-size 4 \ --enable-expert-parallel \ --tokenizer-mode deepseek_v4 \ --tool-call-parser deepseek_v4 \ --enable-auto-tool-choice \ --reasoning-parser deepseek_v4 \ --model-loader-extra-config='{"enable_multithread_load": true, "num_threads": 128}' \ --quantization ascend \ --port 8900 \ --block-size 32 \ --attention_config.indexer_kv_dtype int8 \ {{spec_decoding}} \ {{compilation_config}} \ {{async_scheduling}} \ --additional-config ' {"ascend_compilation_config":{ "enable_npugraph_ex":true, "enable_static_kernel":false }, "enable_cpu_binding": true, "multistream_overlap_shared_expert":true}' ``` Key Parameter Descriptions: - `--max-model-len` specifies the maximum context length - that is, the sum of input and output tokens for a single request. Adjust it according to your actual scenario. - `--no-enable-prefix-caching` indicates that prefix caching is disabled. To enable it, remove this option. - `--speculative-config` configures the MTP (Multi-Token Prediction) speculative decoding to accelerate inference. - `--compilation-config '{"cudagraph_mode":"FULL_DECODE_ONLY"}'` enables full ACL graph execution in the decode phase to reduce scheduling latency. - `--async-scheduling` enables asynchronous scheduling to overlap CPU scheduling with NPU computation. - `VLLM_ASCEND_ENABLE_FLASHCOMM1=1` enables the FlashComm communication optimization. Common Issues Tip: If you encounter issues, please refer to the [Public FAQ](https://docs.vllm.ai/projects/ascend/en/latest/faqs.html) for troubleshooting. - title: Service Verification content: |- ```shell curl http://:8900/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "dsv4", "messages": [ { "role": "user", "content": "Who are you?" } ], "max_tokens": 2048, "temperature": 0 }' ``` Expected Result: The service returns HTTP 200 OK with a JSON response containing the `choices` field. - npu: Ascend 950DT precision: MXFP4/MXFP8 deployment: Single-Node case: High Throughput tags: [a5-single] strategy: single_node_A5 steps: - title: Start the server content: |- A5 single-node deployment runs the original DeepSeek-V4-Flash weights on one Ascend 950DT server. The A5 verification uses runner `linux-aarch64-a5-8` and four NPUs with data parallelism. ```shell export OMP_PROC_BIND=false export OMP_NUM_THREADS=10 export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True export HCCL_BUFFSIZE=1024 export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3 vllm serve your_model_path \ --max-model-len {{max_model_len}} \ --safetensors-load-strategy prefetch \ --max-num-batched-tokens 4096 \ --served-model-name dsv4 \ --gpu-memory-utilization {{gpu_memory_utilization}} \ --enable-expert-parallel \ --async-scheduling \ --max-num-seqs 64 \ --port 8900 \ --block-size 32 \ --tokenizer-mode deepseek_v4 \ --tool-call-parser deepseek_v4 \ --enable-auto-tool-choice \ --reasoning-parser deepseek_v4 \ --data-parallel-size 4 \ --api-server-count 1 \ --compilation-config '{"cudagraph_mode":"FULL_DECODE_ONLY"}' \ {{spec_decoding}} \ --additional-config '{"enable_cpu_binding": true, "multistream_overlap_shared_expert": true, "enable_shared_expert_dp": true}' ``` The A5 path intentionally does not pass `--quantization ascend`; it loads the original mixed MXFP4/MXFP8 checkpoint. - title: Service Verification content: |- ```shell curl http://:8900/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"dsv4","messages":[{"role":"user","content":"Who are you?"}],"max_tokens":256,"temperature":0}' ``` Expected Result: The service returns HTTP 200 OK with a JSON response containing the `choices` field. - npu: Atlas 800I A3 precision: W8A8 deployment: Multi-Node PD Separation case: PD Separation tags: [pd-multinode] strategy: pd_cluster steps: - title: Overview content: |- We recommend using Mooncake for deployment: [Mooncake](https://docs.vllm.ai/projects/ascend/en/latest/tutorials/features/pd_disaggregation_mooncake_multi_node.html). In the standard single-node deployment mode, Prefill (prompt processing) and Decode (token generation) tasks run on the same set of NPUs. This can lead to two issues: 1. **Prefill preemption interrupts Decode**: Prefill is a compute-intensive task that processes the entire input context at once, while Decode generates tokens one by one. When a new user request arrives, its Prefill phase can preempt and interrupt ongoing Decode tasks, causing jitter and higher time-per-output-token (TPOT) latency. 2. **Inflexible resource allocation**: Prefill and Decode have fundamentally different computational characteristics — Prefill is compute-bound and memory-bandwidth-intensive, while Decode is memory-bandwidth-bound. Running them on the same hardware forces a compromise that satisfies neither optimally. PD (Prefill-Decode) separation addresses these issues by running Prefill and Decode on dedicated node groups, each configured independently. This architecture is recommended for production deployments with concurrent multi-user workloads, where stable latency and high throughput are both required. This section shows the deployment guide of DeepSeek-V4-Flash on Atlas 800 A3 (128G × 8) multi-node environment with 1P1D for better performance. - title: Prepare launch_online_dp.py content: |- Prepare the script `launch_online_dp.py` on each node. ```python import argparse import multiprocessing import os import subprocess import sys def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "--dp-size", type=int, required=True, help="Data parallel size." ) parser.add_argument( "--tp-size", type=int, default=1, help="Tensor parallel size." ) parser.add_argument( "--dp-size-local", type=int, default=-1, help="Local data parallel size." ) parser.add_argument( "--dp-rank-start", type=int, default=0, help="Starting rank for data parallel." ) parser.add_argument( "--dp-address", type=str, required=True, help="IP address for data parallel master node." ) parser.add_argument( "--dp-rpc-port", type=str, default=12345, help="Port for data parallel master node." ) parser.add_argument( "--vllm-start-port", type=int, default=9000, help="Starting port for the engine." ) return parser.parse_args() args = parse_args() dp_size = args.dp_size tp_size = args.tp_size dp_size_local = args.dp_size_local if dp_size_local == -1: dp_size_local = dp_size dp_rank_start = args.dp_rank_start dp_address = args.dp_address dp_rpc_port = args.dp_rpc_port vllm_start_port = args.vllm_start_port def run_command(visible_devices, dp_rank, vllm_engine_port): command = [ "bash", "./run_dp_template.sh", visible_devices, str(vllm_engine_port), str(dp_size), str(dp_rank), dp_address, dp_rpc_port, str(tp_size), ] subprocess.run(command, check=True) if __name__ == "__main__": template_path = "./run_dp_template.sh" if not os.path.exists(template_path): print(f"Template file {template_path} does not exist.") sys.exit(1) processes = [] num_cards = dp_size_local * tp_size for i in range(dp_size_local): dp_rank = dp_rank_start + i vllm_engine_port = vllm_start_port + i visible_devices = ",".join(str(x) for x in range(i * tp_size, (i + 1) * tp_size)) process = multiprocessing.Process(target=run_command, args=(visible_devices, dp_rank, vllm_engine_port)) processes.append(process) process.start() for process in processes: process.join() ``` Parameter descriptions: |Parameter|Type|Required|Default|Description| |---------|----|--------|-------|-----------| |`--dp-size`|int|Yes|-|Data parallel size (total number of DP ranks across all nodes).| |`--tp-size`|int|No|1|Tensor parallel size within each DP rank.| |`--dp-size-local`|int|No|(same as `--dp-size`)|Number of DP ranks on the current node. If not set, defaults to `--dp-size`.| |`--dp-rank-start`|int|No|0|Starting rank offset for data parallel ranks on this node.| |`--dp-address`|str|Yes|-|IP address of the data parallel master node.| |`--dp-rpc-port`|str|No|12345|RPC port for data parallel master communication.| |`--vllm-start-port`|int|No|9000|Starting port for each vLLM engine instance on this node.| - title: Prepare run_dp_template.sh – Prefill node content: |- Prefill node: ```shell nic_name="xxxx" # change to your own nic name local_ip=xx.xx.xx.1 # change to your own ip 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=2560 export TASK_QUEUE_ENABLE=1 {{flashcomm1}} export HCCL_OP_EXPANSION_MODE="AIV" export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD export ASCEND_RT_VISIBLE_DEVICES=$1 vllm serve your_model_path \ --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 dsv4 \ --max-model-len {{max_model_len}} \ --max-num-batched-tokens 8192 \ --max-num-seqs {{max_num_seqs}} \ --no-disable-hybrid-kv-cache-manager \ --model-loader-extra-config='{"enable_multithread_load": "true", "num_threads": 128}' \ {{prefix_caching}} \ --safetensors-load-strategy 'prefetch' \ {{spec_decoding}} \ --trust-remote-code \ --block-size 128 \ --tokenizer-mode deepseek_v4 \ --tool-call-parser deepseek_v4 \ --enable-auto-tool-choice \ --reasoning-parser deepseek_v4 \ --gpu-memory-utilization {{gpu_memory_utilization}} \ --quantization ascend \ --enforce-eager \ --additional-config '{"enable_cpu_binding": true, "enable_shared_expert_dp": true, "enable_dsa_cp": true}' \ --kv-transfer-config \ '{"kv_connector": "MooncakeHybridConnector", "kv_role": "kv_producer", "kv_port": "30000", "engine_id": "0", "kv_connector_extra_config": { "prefill": { "dp_size": 4, "tp_size": 4 }, "decode": { "dp_size": 16, "tp_size": 1 } } }' ``` - title: Prepare run_dp_template.sh – Decode node content: |- Decode node: ```shell nic_name="xxxx" # change to your own nic name local_ip=xx.xx.xx.2 # change to your own ip export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD export HCCL_OP_EXPANSION_MODE="AIV" export TASK_QUEUE_ENABLE=1 export VLLM_RPC_TIMEOUT=3600000 export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000 export HCCL_EXEC_TIMEOUT=204 export HCCL_CONNECT_TIMEOUT=1200 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=10 export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True export HCCL_BUFFSIZE=1024 export ASCEND_RT_VISIBLE_DEVICES=$1 vllm serve your_model_path \ --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 dsv4 \ --max-model-len {{max_model_len}} \ --max-num-batched-tokens 120 \ --max-num-seqs {{max_num_seqs}} \ {{async_scheduling}} \ --block-size 128 \ --no-disable-hybrid-kv-cache-manager \ {{prefix_caching}} \ --safetensors-load-strategy 'prefetch' \ --trust-remote-code \ --tokenizer-mode deepseek_v4 \ --model-loader-extra-config='{"enable_multithread_load": "true", "num_threads": 128}' \ --tool-call-parser deepseek_v4 \ --enable-auto-tool-choice \ --reasoning-parser deepseek_v4 \ --gpu-memory-utilization {{gpu_memory_utilization}} \ --quantization ascend \ {{spec_decoding}} \ {{compilation_config}} \ --kv-transfer-config \ '{"kv_connector": "MooncakeHybridConnector", "kv_role": "kv_consumer", "kv_port": "30100", "engine_id": "1", "kv_connector_extra_config": { "prefill": { "dp_size": 4, "tp_size": 4 }, "decode": { "dp_size": 16, "tp_size": 1 } } }' \ --additional-config '{ "ascend_compilation_config":{ "enable_npugraph_ex":true, "enable_static_kernel":false }, "enable_cpu_binding":true, "multistream_overlap_shared_expert":true, "recompute_scheduler_enable":true }' ``` - title: Start the service content: |- Start the server with the following command on each node. Prefill node: ```shell # change ip to your own python launch_online_dp.py --dp-size 4 --tp-size 4 --dp-size-local 4 --dp-rank-start 0 --dp-address xx.xx.xx.1 --dp-rpc-port 12321 --vllm-start-port 7100 ``` Decode node: ```shell # change ip to your own python launch_online_dp.py --dp-size 16 --tp-size 1 --dp-size-local 16 --dp-rank-start 0 --dp-address xx.xx.xx.2 --dp-rpc-port 12321 --vllm-start-port 7100 ``` - title: Deploy the P-D disaggregation proxy content: |- Refer to [Prefill-Decode Disaggregation (Deepseek)](https://docs.vllm.ai/projects/ascend/en/latest/tutorials/features/pd_disaggregation_mooncake_multi_node.html) to deploy the P-D disaggregation proxy. Key Parameter Descriptions: - `VLLM_ASCEND_ENABLE_FLASHCOMM1=1`: enables the communication optimization function on the prefill nodes. - `recompute_scheduler_enable: true`: enables the recomputation scheduler. When the 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, enable this configuration only on decode nodes. - `MooncakeHybridConnector`: the KV transfer connector used for PD separation, transferring KV Cache between prefill and decode nodes. - `enable_shared_expert_dp: true`: enables data parallelism for shared experts, applicable to MoE models. Common Issues Tip: If you encounter issues with PD separation deployment, please refer to the [Public FAQ](https://docs.vllm.ai/projects/ascend/en/latest/faqs.html) for troubleshooting. - title: Service Verification content: |- After the PD separation service is fully started, send a request through the proxy port on the prefill master node to verify that Prefill and Decode nodes are working correctly together. Refer to [Prefill-Decode Disaggregation (Deepseek)](https://docs.vllm.ai/projects/ascend/en/latest/tutorials/features/pd_disaggregation_mooncake_multi_node.html) for the proxy verification method. ```shell curl http://:/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "dsv4", "messages": [ { "role": "user", "content": "Who are you?" } ], "max_tokens": 256, "temperature": 0 }' ``` Expected Result: The service returns HTTP 200 OK with a JSON response containing the `choices` field. - npu: Atlas 800I A2 precision: W8A8 deployment: Multi-Node PD Separation case: PD Separation tags: [pd-multinode] strategy: pd_cluster steps: - title: Overview content: |- This section shows the deployment guide of DeepSeek-V4-Flash on Atlas 800 A2 (64G × 8) multi-node environment with 4*1P 1*4D for better performance. We recommend using Mooncake for deployment: [Mooncake](https://docs.vllm.ai/projects/ascend/en/latest/tutorials/features/pd_disaggregation_mooncake_multi_node.html). In the standard single-node deployment mode, Prefill (prompt processing) and Decode (token generation) tasks run on the same set of NPUs. This can lead to two issues: 1. **Prefill preemption interrupts Decode**: Prefill is a compute-intensive task that processes the entire input context at once, while Decode generates tokens one by one. When a new user request arrives, its Prefill phase can preempt and interrupt ongoing Decode tasks, causing jitter and higher time-per-output-token (TPOT) latency. 2. **Inflexible resource allocation**: Prefill and Decode have fundamentally different computational characteristics — Prefill is compute-bound and memory-bandwidth-intensive, while Decode is memory-bandwidth-bound. Running them on the same hardware forces a compromise that satisfies neither optimally. PD (Prefill-Decode) separation addresses these issues by running Prefill and Decode on dedicated node groups, each configured independently. This architecture is recommended for production deployments with concurrent multi-user workloads, where stable latency and high throughput are both required. - title: Prepare launch_online_dp.py content: |- Prepare the script `launch_online_dp.py` on each node. ```python import argparse import multiprocessing import os import subprocess import sys def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("--dp-size", type=int, required=True, help="Data parallel size.") parser.add_argument("--tp-size", type=int, default=1, help="Tensor parallel size.") parser.add_argument("--dp-size-local", type=int, default=-1, help="Local data parallel size.") parser.add_argument("--dp-rank-start", type=int, default=0, help="Starting rank for data parallel.") parser.add_argument("--dp-address", type=str, required=True, help="IP address for data parallel master node.") parser.add_argument("--dp-rpc-port", type=str, default=12345, help="Port for data parallel master node.") parser.add_argument("--vllm-start-port", type=int, default=9000, help="Starting port for the engine.") return parser.parse_args() args = parse_args() dp_size = args.dp_size tp_size = args.tp_size dp_size_local = args.dp_size_local if dp_size_local == -1: dp_size_local = dp_size dp_rank_start = args.dp_rank_start dp_address = args.dp_address dp_rpc_port = args.dp_rpc_port vllm_start_port = args.vllm_start_port def run_command(visible_devices, dp_rank, vllm_engine_port): command = [ "bash", "./run_dp_template.sh", visible_devices, str(vllm_engine_port), str(dp_size), str(dp_rank), dp_address, dp_rpc_port, str(tp_size), ] subprocess.run(command, check=True) if __name__ == "__main__": template_path = "./run_dp_template.sh" if not os.path.exists(template_path): print(f"Template file {template_path} does not exist.") sys.exit(1) processes = [] num_cards = dp_size_local * tp_size for i in range(dp_size_local): dp_rank = dp_rank_start + i vllm_engine_port = vllm_start_port + i visible_devices = ",".join(str(x) for x in range(i * tp_size, (i + 1) * tp_size)) process = multiprocessing.Process(target=run_command, args=(visible_devices, dp_rank, vllm_engine_port)) processes.append(process) process.start() for process in processes: process.join() ``` - title: Prepare run_dp_template.sh – Prefill node content: |- Prefill node (4 P nodes share the same script). For each P instance, only these two configuration values need to be modified: `kv_port` and `engine_id`. The `engine_id` should start from 0 and increment sequentially, while the `kv_port` (e.g., `30100`) must be unique for each P instance, such as 30000, 30100, etc. ```shell unset ftp_proxy unset https_proxy unset http_proxy rm -rf ~/ascend/log nic_name="xxxxxx" #eg."enp67s0f0np0" local_ip=`hostname -I|awk -F " " '{print$1}'` export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD export HCCL_OP_EXPANSION_MODE="AIV" export TASK_QUEUE_ENABLE=1 export VLLM_RPC_TIMEOUT=3600000 export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000 export HCCL_EXEC_TIMEOUT=204 export HCCL_CONNECT_TIMEOUT=1200 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=10 export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True export HCCL_BUFFSIZE=1024 export ASCEND_RT_VISIBLE_DEVICES=$1 export TASK_QUEUE_ENABLE=1 vllm serve your_model_path \ --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 dsv4 \ --max-model-len {{max_model_len}} \ --max-num-batched-tokens 4096 \ --max-num-seqs {{max_num_seqs}} \ --block-size 128 \ --enforce-eager \ {{async_scheduling}} \ --no-disable-hybrid-kv-cache-manager \ {{prefix_caching}} \ --trust-remote-code \ --gpu-memory-utilization {{gpu_memory_utilization}} \ --quantization ascend \ --safetensors-load-strategy 'prefetch' \ --model-loader-extra-config='{"enable_multithread_load": "true", "num_threads": 128}' \ --tokenizer-mode deepseek_v4 \ --tool-call-parser deepseek_v4 \ --enable-auto-tool-choice \ --reasoning-parser deepseek_v4 \ --additional-config '{"enable_cpu_binding": true, "enable_shared_expert_dp": true}' \ {{spec_decoding}} \ --kv-transfer-config \ '{"kv_connector": "MooncakeHybridConnector", "kv_role": "kv_producer", "kv_port": "30000", "engine_id": "0", "kv_connector_extra_config": { "prefill": { "dp_size": 8, "tp_size": 1 }, "decode": { "dp_size": 32, "tp_size": 1 } } }' ``` - title: Prepare run_dp_template.sh – Decode node content: |- Decode node (4 D nodes share the same script): ```shell unset ftp_proxy unset https_proxy unset http_proxy rm -rf ~/ascend/log nic_name="xxxxxx" #eg."enp67s0f0np0" local_ip=`hostname -I|awk -F " " '{print$1}'` export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD export HCCL_OP_EXPANSION_MODE="AIV" export TASK_QUEUE_ENABLE=1 export VLLM_RPC_TIMEOUT=3600000 export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=30000 export HCCL_EXEC_TIMEOUT=204 export HCCL_CONNECT_TIMEOUT=1200 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=10 export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True export HCCL_BUFFSIZE=1024 export ASCEND_RT_VISIBLE_DEVICES=$1 vllm serve your_model_path \ --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 dsv4 \ --max-model-len {{max_model_len}} \ --max-num-batched-tokens 60 \ --max-num-seqs {{max_num_seqs}} \ {{async_scheduling}} \ --block-size 128 \ --no-disable-hybrid-kv-cache-manager \ {{prefix_caching}} \ --trust-remote-code \ --gpu-memory-utilization {{gpu_memory_utilization}} \ --quantization ascend \ --safetensors-load-strategy 'prefetch' \ --model-loader-extra-config='{"enable_multithread_load": "true", "num_threads": 128}' \ --tokenizer-mode deepseek_v4 \ --tool-call-parser deepseek_v4 \ --enable-auto-tool-choice \ --reasoning-parser deepseek_v4 \ {{spec_decoding}} \ {{compilation_config}} \ --kv-transfer-config \ '{"kv_connector": "MooncakeHybridConnector", "kv_role": "kv_consumer", "kv_port": "30400", "engine_id": "4", "kv_connector_extra_config": { "prefill": { "dp_size": 8, "tp_size": 1 }, "decode": { "dp_size": 32, "tp_size": 1 } } }' \ --additional-config '{ "ascend_compilation_config":{ "enable_npugraph_ex":true, "enable_static_kernel":false }, "enable_cpu_binding":true, "multistream_overlap_shared_expert":true, "recompute_scheduler_enable":true }' ``` - title: Start the service content: |- Start the server with the following command on each node. Prefill node: ```shell # change ip to your own python launch_online_dp.py --dp-size 8 --tp-size 1 --dp-size-local 8 --dp-rank-start 0 --dp-address x.x.x.x --dp-rpc-port 12321 --vllm-start-port 7100 ``` For each P instance, only the `--dp-address` parameter differs and must be configured as the IP address of the service within the same subnet as the other instances. Decode node: ```shell # change ip to your own python launch_online_dp.py --dp-size 32 --tp-size 1 --dp-size-local 8 --dp-rank-start x --dp-address x.x.x.x --dp-rpc-port 12321 --vllm-start-port 7100 ``` For each D instance, only the `--dp-rank-start` parameter differs, which should be configured as 0, 8, 16, and 24 respectively. Each instance's `--dp-address` must be set to the IP address of the main D node, which is the IP of the Decode instance with `--dp-rank-start` set to 0. - title: Deploy the P-D disaggregation proxy content: |- The proxy is also implemented by referring to [Prefill-Decode Disaggregation (Deepseek)](https://docs.vllm.ai/projects/ascend/en/latest/tutorials/features/pd_disaggregation_mooncake_multi_node.html). Key Parameter Descriptions: - `VLLM_ASCEND_ENABLE_FLASHCOMM1=1`: enables the communication optimization function on the prefill nodes. - `recompute_scheduler_enable: true`: enables the recomputation scheduler. When the 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, enable this configuration only on decode nodes. - `MooncakeHybridConnector`: the KV transfer connector used for PD separation, transferring KV Cache between prefill and decode nodes. - `enable_shared_expert_dp: true`: enables data parallelism for shared experts, applicable to MoE models. Common Issues Tip: If you encounter issues with PD separation deployment, please refer to the [Public FAQ](https://docs.vllm.ai/projects/ascend/en/latest/faqs.html) for troubleshooting. - title: Service Verification content: |- After the PD separation service is fully started, send a request through the proxy port on the prefill master node to verify that Prefill and Decode nodes are working correctly together. Refer to [Prefill-Decode Disaggregation (Deepseek)](https://docs.vllm.ai/projects/ascend/en/latest/tutorials/features/pd_disaggregation_mooncake_multi_node.html) for the proxy verification method. ```shell curl http://:/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "dsv4", "messages": [ { "role": "user", "content": "Who are you?" } ], "max_tokens": 256, "temperature": 0 }' ``` Expected Result: The service returns HTTP 200 OK with a JSON response containing the `choices` field. verification: |- Once your server is started, you can query the model with input prompts: In :, use the IP address and port number of the primary node. If the primary and standby nodes are separated, use the IP address and port number of the proxy node. ```shell curl http://:/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "dsv4", "messages": [ { "role": "user", "content": "Who are you?" } ], "max_tokens": 256, "temperature": 0 }' ``` Expected Result: The service returns HTTP 200 OK with a JSON response containing the `choices` field. evaluation: accuracy: content: |- Here are two accuracy evaluation methods. ### Using AISBench 1. Refer to [Using AISBench](https://docs.vllm.ai/projects/ascend/en/latest/developer_guide/evaluation/using_ais_bench.html) for details. 2. After execution, you can get the result. | dataset | version | metric | mode | vllm-api-general-chat | note | | ----- | ----- | ----- | ----- | ----- | ----- | | GPQA | - | accuracy | gen | 88.17 | 1 Atlas 800 A3 (128G × 8) | | GSM8K | - | accuracy | gen | 96.44 | 1 Atlas 800 A3 (128G × 8) | performance: content: |- ### Using AISBench Refer to [Using AISBench for performance evaluation](https://docs.vllm.ai/projects/ascend/en/latest/developer_guide/evaluation/using_ais_bench.html#execute-performance-evaluation) for details. ### Using vLLM Benchmark Refer to [vllm benchmark](https://docs.vllm.ai/en/latest/contributing/) for more details. performance: accuracy: |- ### Using AISBench 1. Refer to [Using AISBench](https://docs.vllm.ai/projects/ascend/en/latest/developer_guide/evaluation/using_ais_bench.html) for details. 2. After execution, you can get the result. | dataset | version | metric | mode | vllm-api-general-chat | note | | ----- | ----- | ----- | ----- | ----- | ----- | | GPQA | - | accuracy | gen | 88.17 | 1 Atlas 800 A3 (128G × 8) | | GSM8K | - | accuracy | gen | 96.44 | 1 Atlas 800 A3 (128G × 8) | benchmark: |- ### Recommended Configurations > **Note**: The following configurations are validated in specific test environments and are for reference only. The optimal configuration depends on factors such as maximum input/output length, prefix cache hit rate, precision requirements, and deployment machine ratios. It is recommended to refer to Section 9.2 for tuning based on actual conditions. #### Table 1: Scenario Overview > `*Total NPUs` indicates the total number of NPUs used across all nodes. |Scenario|Deployment Mode|*Total NPUs|Weight Version|Key Considerations| |--------|---------------|-----------|---------------|-------------------| |High Throughput|Single-Node Mixed|16 (A3)|DeepSeek-V4-Flash-w8a8-mtp|Use dp4 tp4 to balance memory capacity and compute efficiency| |High Throughput|1P1D deployment|32 (A3)|DeepSeek-V4-Flash-w8a8-mtp|dp16 tp1 on both P and D nodes; balanced latency and throughput| |Long Context (1M)|Single-Node (A3)|8 (A3)|DeepSeek-V4-Flash-w8a8-mtp|Use dp4 tp4 to balance memory capacity and compute efficiency| |Long Context (1M)|1P1D deployment|32 (A3)|DeepSeek-V4-Flash-w8a8-mtp|dp16 tp1 on both P and D nodes; balanced latency and throughput| #### Table 2: Detailed Node Configuration **A3 Configurations** |Model|Product Combo|Scenario|Device|Networking|Total NPUs|Data Format|Context Length|Average Input|Average Output| |-----|-------------|--------|------|----------|----------|-----------|--------------|-------------|--------------| |deepseek V4 flash|A3 PD separation|High Throughput|Atlas 800I A3 560T|3*1P + 1*1D (EP16)
4 machines|32|W8A8C16|1M|8K|1K| |deepseek V4 flash|A3 PD separation|Low Latency|Atlas 800I A3 560T|3*1P + 1*1D (EP16)
4 machines|32|W8A8C16|1M|8K|1K| |deepseek V4 flash|A3 PD separation|High Throughput|Atlas 800I A3 560T|3*1P + 1*1D (EP16)
4 machines|32|W8A8C16|1M|32K|1K| |deepseek V4 flash|A3 PD separation|Low Latency|Atlas 800I A3 560T|3*1P + 1*1D (EP16)
4 machines|32|W8A8C16|1M|32K|1K| |deepseek V4 flash|A3 PD separation|High Throughput|Atlas 800I A3 560T|3*1P + 1*1D (EP16)
4 machines|32|W8A8C16|1M|128K|1K| |deepseek V4 flash|A3 PD separation|Low Latency|Atlas 800I A3 560T|3*1P + 1*1D (EP16)
4 machines|32|W8A8C16|1M|128K|1K| |deepseek V4 flash|A3 PD separation|Long Context|Atlas 800I A3 560T|3*1P + 1*1D (EP16)
4 machines|32|W8A8C16|1M|1M|1K| |deepseek V4 flash|A3 single-node mixed|High Throughput|Atlas 800I A3 560T|Single-node mixed EP16
1 machine|8|W8A8C16|1M|8K|1K| |deepseek V4 flash|A3 single-node mixed|Low Latency|Atlas 800I A3 560T|Single-node mixed EP16
1 machine|8|W8A8C16|1M|8K|1K| |deepseek V4 flash|A3 single-node mixed|High Throughput|Atlas 800I A3 560T|Single-node mixed EP16
1 machine|8|W8A8C16|1M|32K|1K| |deepseek V4 flash|A3 single-node mixed|Low Latency|Atlas 800I A3 560T|Single-node mixed EP16
1 machine|8|W8A8C16|1M|32K|1K| |deepseek V4 flash|A3 single-node mixed|High Throughput|Atlas 800I A3 560T|Single-node mixed EP16
1 machine|8|W8A8C16|1M|128K|1K| |deepseek V4 flash|A3 single-node mixed|Low Latency|Atlas 800I A3 560T|Single-node mixed EP16
1 machine|8|W8A8C16|1M|128K|1K| |deepseek V4 flash|A3 single-node mixed|Long Context|Atlas 800I A3 560T|Single-node mixed EP16
1 machine|8|W8A8C16|1M|1M|1K| **A2 Configurations** |Model|Product Combo|Scenario|Device|Networking|Total NPUs|Data Format|Context Length|Average Input|Average Output| |-----|-------------|--------|------|----------|----------|-----------|--------------|-------------|--------------| |deepseek V4 flash|A2 single-node mixed|High Throughput|Atlas 800I A2 280T|A2 single-node mixed|8|W8A8C16|133072|8K|1K| |deepseek V4 flash|A2 single-node mixed|Low Latency|Atlas 800I A2 280T|A2 single-node mixed|8|W8A8C16|133072|8K|1K| |deepseek V4 flash|A2 single-node mixed|High Throughput|Atlas 800I A2 280T|A2 single-node mixed|8|W8A8C16|133072|32K|1K| |deepseek V4 flash|A2 single-node mixed|Low Latency|Atlas 800I A2 280T|A2 single-node mixed|8|W8A8C16|133072|32K|1K| |deepseek V4 flash|A2 single-node mixed|High Throughput|Atlas 800I A2 280T|A2 single-node mixed|8|W8A8C16|133072|128K|1K| |deepseek V4 flash|A2 single-node mixed|Low Latency|Atlas 800I A2 280T|A2 single-node mixed|8|W8A8C16|133072|128K|1K| |deepseek V4 flash|A2 single-node mixed|Long Context|Atlas 800I A2 280T|A2 single-node mixed|8|W8A8C16|1M|1020K|1K| |deepseek V4 flash|A2 8-machine PD separation|High Throughput|Atlas 800I A2 280T|4*1P + 1*4D
8 machines|64|W8A8C16|133072|8K|1K| |deepseek V4 flash|A2 8-machine PD separation|Low Latency|Atlas 800I A2 280T|4*1P + 1*4D
8 machines|64|W8A8C16|133072|8K|1K| |deepseek V4 flash|A2 8-machine PD separation|High Throughput|Atlas 800I A2 280T|4*1P + 1*4D
8 machines|64|W8A8C16|133072|32K|1K| |deepseek V4 flash|A2 8-machine PD separation|Low Latency|Atlas 800I A2 280T|4*1P + 1*4D
8 machines|64|W8A8C16|133072|32K|1K| |deepseek V4 flash|A2 8-machine PD separation|High Throughput|Atlas 800I A2 280T|4*1P + 1*4D
8 machines|64|W8A8C16|133072|128K|1K| |deepseek V4 flash|A2 8-machine PD separation|Low Latency|Atlas 800I A2 280T|4*1P + 1*4D
8 machines|64|W8A8C16|133072|128K|1K| |deepseek V4 flash|A2 8-machine PD separation|Long Context|Atlas 800I A2 280T|4*1P + 1*4D
8 machines|64|W8A8C16|1M|1M|1K| > For complete startup commands and parameter descriptions, please refer to the deployment examples in [Chapter 5](#5-online-service-deployment). **Notice:** `max-model-len` and `max-num-seqs` need to be set according to the actual usage scenario. For other settings, please refer to the [Deployment](#5-online-service-deployment) chapter. Currently, we support 4K prefix cache hit in an experimental manner. You only need to change the value of --block-size from 128 to 32 in the service. tuning: |- ### Tuning Guidelines #### General Tuning Reference Please refer to the [Public Performance Tuning Documentation](https://docs.vllm.ai/projects/ascend/en/latest/developer_guide/performance_and_debug/optimization_and_tuning.html) for tuning methods. Please refer to the [Feature Guide](https://docs.vllm.ai/projects/ascend/en/latest/user_guide/support_matrix/feature_matrix.html) for detailed feature descriptions. faq: |- For common environment, installation, and general parameter issues, please refer to the [Public FAQ](https://docs.vllm.ai/projects/ascend/en/latest/faqs.html); this chapter only covers model-specific issues. references: - title: ModelScope Model Download url: https://www.modelscope.cn/models/Eco-Tech/DeepSeek-V4-Flash-w8a8-mtp - title: PD Disaggregation Guide (Mooncake) url: https://docs.vllm.ai/projects/ascend/en/latest/tutorials/features/pd_disaggregation_mooncake_multi_node.html - title: vllm-ascend Documentation url: https://docs.vllm.ai/projects/ascend/en/latest/tutorials/models/DeepSeek-V4-Flash.html - title: Additional Configuration url: https://docs.vllm.ai/projects/ascend/en/latest/user_guide/configuration/additional_config.html - title: vllm-ascend GitHub url: https://github.com/vllm-project/vllm-ascend