DeepSeek-V4-Flash (W8A8)

deepseek_v4 架构模型 — 256 专家 MoE,采用 MLA + DSA 稀疏注意力 以及原生 MTP speculative head,作为 W8A8 提供服务(int8 attention + expert, ~280 GB 权重,70 个 shard,43 层)。由于 ~280 GB 的权重无法装入单个 8 × 32 GB 节点,因此它在 Ascend 910B3(64 GB/卡)跨两个 节点 = 16 张卡 上进行了验证,作为一个单一聚合的 DP2 × TP=8 + EP16 服务, 通过 Alauda AI 的 InferNex 界面,使用 vLLM-Ascend nightly 引擎提供服务。它增加了一个 mooncake 跨 rank KV 存储,使两个数据并行 rank 共享前缀 KV;两种基准场景都通过 MaaS gateway(API-key)入口 以并发扫测方式驱动(8 / 16 / 32)。

模型标识

字段
发布方DeepSeek
架构deepseek_v4 — 256-expert MoE(每个 token 6 个 expert + 1 个 shared)+ MLA + DSA 稀疏注意力 + 原生 MTP
量化W8A8(W8A8_DYNAMIC,int8 attention + expert;~280 GB 权重,70 个 shard,43 层);MIT license
模型来源(W8A8)https://www.modelscope.cn/models/Eco-Tech/DeepSeek-V4-Flash-w8a8-mtp
ModelCar(OCI Image Layout tar)http://<model-package-host>/packages/aml-models-oci/v0.1.0/DeepSeek-V4-Flash-w8a8-mtp/DeepSeek-V4-Flash-w8a8-mtp.oci.tar
NOTE

W8A8 ModelCar 以 OCI Image Layout tar 的形式分发在内部 package store 上,而不是公共 Docker Hub 镜像。请将上面链接中的 <model-package-host> 替换为 Alauda 为该环境提供的 package store 地址。集群拉取的是 OCI image,不是 tar,因此请先将其导入你自己的 registry 一次,然后将 model.uri 指向该地址—— 见下方 部署 部分。基准测试本身使用的是按节点预置在 node-local PVC 上的权重;ModelCar 只是同一份权重的重新封装(manifest 头部记录了该 PVC 备选方案)。

已验证硬件 × 软件栈

平台引擎版本 / 配置状态
Ascend 910B3 64 GB × 16,2 节点(1 个实例,DP2 × TP=8 + EP16)vLLM-Ascendnightly-main-openeuler(vLLM 0.23.0)✅ 闭环,2 场景 并发扫测(8/16/32),每档 480 次请求,0 error / 0 mismatch,聚合 + mooncake KV store,通过 MaaS gateway
NOTE

nightly-main 镜像包含完整的 deepseek_v4以及 DP2 跨节点 graph + DSA-CP prefix-cache 修复。enable_dsa_cp 被刻意设置为 on —— 它是 非零 prefix-cache 命中的前提,并且该构建在开启它时保持稳定。在满足完整命中门槛 (见配置表)的情况下,prefix caching 可正常工作 —— 在 21k prefix 上单 rank 命中率约 ~90.9 %。

模型配置

参数
Tensor parallelism (tensor-parallel-size)8
Data parallelism (data-parallel-size)2(每个节点 1 个 rank,跨节点)
Replicas (instances)1 个聚合服务(leader + worker = 16 张卡)
Expert parallelism (enable-expert-parallel)on(EP16)
max-model-len200000(agent 长上下文)
max-num-batched-tokens8192
max-num-seqs32
gpu-memory-utilization0.92(64 GB 卡 — ~20.6 GB/card 的权重为 KV 留出充足空间)
block-size128
Quantizationascend(W8A8_DYNAMIC)
Speculative decoding (MTP)mtp,1 token(draft head 上启用 enforce_eager
Decode graphFULL_DECODE_ONLYenable_npugraph_ex
DSA context parallel (enable_dsa_cp)on(prefix-cache 命中前提)
Prefix caching已启用且有效(单 rank 命中率约 ~90.9 %;需要 VLLM_ASCEND_ENABLE_FLASHCOMM1=1 + VLLM_PREFIX_CACHE_RETENTION_INTERVAL=16384 + prefix ≥ 16384)
Tool calling / reasoning--tool-call-parser deepseek_v4 + --enable-auto-tool-choice + --reasoning-parser deepseek_v4(默认关闭 thinking)

部署规格

作为 agg-mc-kv 提供服务——一个单一的 DP2 × TP=8 聚合 加上 由两个 DP rank 共享的 mooncake KV store。DP2 的随机路由会将每个用户不断增长的历史分散到两个 rank 上,因此每个 rank 的本地多轮命中率只有约 ~41 %;mooncake store 允许一个 rank 拉取另一个 rank 已经计算出的 prefix KV,将合并后的有效 prefix 复用率提升到约 ~84 %。路由器保持为 random,cache-indexer 关闭:单个聚合 endpoint 不需要全局 KV 索引或感知 KV-cache 的路由—— 这与 GLM-5.2 / Qwen3-8B 的聚合范式一致(store 共享 KV;router 保持 random)。

组件agg-mc-kv
hermes-router (EPP)✅ 已启动(单一 leader endpoint,random 无实际作用)
路由策略random
mooncake KV store (AscendStoreConnector)✅(在两个 DP rank 之间共享)
cache-indexer / KV-cache-aware routing—(单个聚合 endpoint 不需要)
跨 rank prefix KV 复用yes(合并后有效约 ~84 %)
NOTE

store 以异步方式写入(21k prefix 落盘约需 ~30–60 s)。跨 rank 命中会出现在多轮 agent 会话中,turn 间隔大约一分钟或更长时;连续的亚秒级复用只会命中同一 rank 的本地 prefix cache。 我们还评估过一种单独的 KV-cache-aware routing 方案(将后续请求引导回持有 cache 的 rank),并 已回退——在该规模下,这个栈没有带来收益,因此生产形态保持为 random + mooncake store。

部署

自包含的 InferNex manifest(engine 内联在 LLMInferenceService 的 leader + worker templates + hermes-router preset 中,跨两个节点的 DP2 × TP=8,并使用 mooncake store):

规格文件
agg-mc-kv, DP2 × TP=8deepseek-v4-flash-w8a8-agg-mc-kv-llmisvc.yaml
base=https://raw.githubusercontent.com/alauda/aml-docs/master/docs/en/plan/validated_models/assets/deepseek-v4-flash-w8a8

# 1. Import the ModelCar (OCI Image Layout tar) into your own registry once — the cluster
#    pulls an OCI image, not the tar. skopeo does the multi-arch (amd64+arm64) push in one go:
curl -sO http://<model-package-host>/packages/aml-models-oci/v0.1.0/DeepSeek-V4-Flash-w8a8-mtp/DeepSeek-V4-Flash-w8a8-mtp.oci.tar
skopeo copy --all \
  oci-archive:DeepSeek-V4-Flash-w8a8-mtp.oci.tar:v0.1.0 \
  docker://<your-registry>/modelcar-deepseek-v4-flash-w8a8-mtp:v0.1.0

# 2. Edit the manifest: set the namespace, set model.uri to the registry ref you just
#    pushed, and the image tag (match your CANN / host driver). Then apply — the
#    storageInitializer pulls the ModelCar to /mnt/models in each DP rank.
#    (Alternative: stage the weights on a node-local PVC per node — see the manifest header.)
kubectl apply -f $base/deepseek-v4-flash-w8a8-agg-mc-kv-llmisvc.yaml

# Internal KServe ingress (no auth):
curl -s http://<gateway>/<namespace>/deepseek-v4-flash-w8a8-agg-mc-kv/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"deepseek-v4-flash-w8a8","messages":[{"role":"user","content":"hello"}]}'

# Product MaaS gateway (OpenAI-compatible, API-key auth + token rate limiting):
curl -s http://<maas-gateway>/v1/chat/completions \
  -H "Authorization: Bearer $MAAS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"deepseek-v4-flash-w8a8","messages":[{"role":"user","content":"hello"}]}'

基准测试结果

闭环 aiperf 0.7.0DP2 × TP=8(16 × 910B3 64 GB),通过产品 MaaS gateway 驱动。并发扫测 8 / 16 / 32,每档 480 次请求(所有档位均为 0 error / 0 mismatch)。这些核心数字对应的是生产级 agg-mc-kv 配置——FULL_DECODE_ONLY graph + mooncake 跨 rank KV store,也就是上方 manifest 部署的 精确配置——场景 ②(多轮嵌套长上下文),也就是该 store 所针对的 agent 风格工作负载。TTFT / E2E 的单位为 s,ITL 的单位为 ms;decode = 仅输出 tok/s(实测),TPS = 总 token/s(输入 + 输出,计算得到;以 prefill 为主)。

场景 ② — 多轮对话,生产级 agg-mc-kv(ISL ~17.5k / OSL 128)

并发TTFT 平均值 (s)ITL 平均值 (ms)E2E 平均值 (s)Decode (tok/s)TPS (in+out)
81.767210.993.613198
161.369012.8159.322467
321.9412317.6230.932559

mooncake 跨 rank KV store 正是让这一方案变快的关键:它将多轮 prefix 复用率从约 ~41 %(每个 rank 本地)提升到约 ~84 %(合并后有效)。在并发 32 下,将同一 场景 ② 按部署演进的各个配置依次跑一遍,可以看出收益来自哪里:

配置演进 — 场景 ②,并发 32

配置TTFT 平均值 (s)E2E 平均值 (s)Decode (tok/s)TPS (in+out)
agg(基础版 — eager,无 store)10.283.748.16781
+ FULL_DECODE_ONLY graph3.229.3138.719554
+ mooncake KV store(生产版)1.917.6230.932559

→ graph + store 共同作用,相比相同并发下的基础聚合,TTFT 约提升 5.3× / E2E 约提升 4.8× / TPS 约提升 4.8×

场景 ① — 固定长度 system-prompt 复用(ISL ~8k / OSL 128),基础 agg

8k 固定 prompt 场景仅在基础聚合配置上进行了测量(graph

  • mooncake 没有为它单独复跑),因此请将这些结果视为下限——生产配置会像场景 ② 那样显著提升它们:
并发TTFT 平均值 (s)ITL 平均值 (ms)E2E 平均值 (s)Decode (tok/s)TPS (in+out)
83.1930541.924.21539
163.4235047.842.32689
325.7149368.359.23759
NOTE

如何解读这些结果。 每个档位都以 480/480 完成,零错误、零输出不匹配。随着并发上升,系统吞吐量(decode / TPS)会增加 (次线性,逐渐饱和),而尾延迟(TTFT / ITL / E2E)也会上升——这是更多 in-flight 请求带来的排队成本。TPS 是总 token(输入 + 输出) 层面的指标,并且以 prefill 为主(ISL 8k / 17.5k,OSL 128);仅解码输出速率则是单独的“Decode”列。

这些数字不能直接与本指南中的其他模型进行比较:它是并发扫测(而不是 Qwen 模型使用的固定并发 4 运行),运行在 910B3 64 GB 卡上(而不是 910B4 32 GB),并且采用 16 卡 DP2 × TP=8 拓扑。请将它们视为这个特定大型 MoE 部署的运行包络,而不是跨模型排名。