两个引擎 × 两个模型,2× Tesla V100-SXM2-16GB
测试时间:2026-11-26 23:00 – 2026-11-27 02:45
摘要
在 2× V100-16GB 上对比两套引擎(ninfer-all 2026-11-25.4 / ninfer-v100-duo-win 2026-10-26)与两个模型(Qwen3.8-27B nvfp4 稠密 64 层 / Inkling-2-Mini IQ4_XS MoE 24 层),测 prefill、decode、显存分配与上下文上限。每项数字均来自服务端响应自带的 timings,不是墙钟估算。
1. Inkling 的最佳配置是不投机。 spec=none 得到 78.4 / 65.0 / 49.0 tok/s(0.5K / 13K / 48K prompt);dspark K=7 只有 21% 接受率,反而慢 26–37%,dflash2 也慢 6–7%。MoE 激活稀疏,验证草稿的代价超过收益。
2. 两卡是「卡 0 干活、卡 1 存专家」。 routed experts 对半分(各 6.55 GiB),稠密层、输出头、草稿器、以及全部 KV 都在卡 0。卡 1 的占用不随上下文增长,它那 8.6 GiB 空闲对加长上下文无用。上下文硬顶 245760(240K 时卡 0 占 97.4%,仅剩 308 MiB)。
3. 同一引擎下 Inkling decode 比 Qwen3.8 快 2.2 倍,但那是稀疏激活的结果,不是能力差。 Inkling 每 token 只读 8/128 个专家;Qwen 每 token 扫完 21.3 GiB 稠密权重。反过来,Qwen 在长 prompt 的 prefill 上更强(48K 时 830 vs 564 tok/s)。
4. Qwen3.8 在旧引擎上 decode 快 2.6 倍。 同 artifact、同参数(mtp K=3 / int8 / 65536 / TP2)下 ~95 vs 36.1 tok/s。TP 模式、KV dtype、draft head、ngram、上下文、prefill-chunk、ECC 六项嫌疑逐一实测排除,属引擎回归,不是配置问题。
一句话建议:Inkling 用 ninfer-all + spec=none;Qwen3.8 要速度就用旧引擎 ninfer-v100-duo-win。
0. 环境
| 项 |
值 |
| GPU |
2× Tesla V100-SXM2-16GB,16384 MiB/卡,ECC 开启(日志:容量 −6.25%,带宽 −12%) |
| peer access |
正常(every pair of devices reads peer memory) |
| 新 build |
ninfer-all 2026-11-25.4+9ba1276,CUDA 12.9,device images 70 75 80 86 89 |
| 旧 build |
ninfer-v100-duo-win test(2026-10-26 单文件 exe,无版本号输出) |
| 模型 A |
Inkling-2-Mini UD-IQ4_XS:24 层 MoE,128 routed experts / 8 active,loop core 6–18 ×3 passes,artifact 16.05 GiB |
| 模型 B |
Qwen3.8-27B nvfp4:64 层稠密,qwen3_5_text,加载 21.3 GiB |
1. 测试口径
- 三档固定语料:552 / 12852 / 48052 token(三档共用同一前缀)。
- 每档
max_tokens=128、temperature=0、stream=false、单并发。
- 速率取自响应体
timings(prompt_per_second / predicted_per_second / draft_n / draft_n_accepted),不是墙钟估算。
- 每个配置独立启动一次服务,单次测量、无重复。
- 旧 build 不返回
timings,其 prefill/decode 由墙钟两点联立解出(见 §4)。
2. 原始数据
| tag |
build |
model |
spec |
K |
ctx |
prefill 0.5K |
13K |
48K |
decode 0.5K |
13K |
48K |
acc |
| ink_240k |
ninfer-all |
inkling |
dspark |
7 |
245760 |
740.8 |
866.7 |
543.9 |
57.6 |
46.7 |
34.3 |
21% |
| ink64_dspark |
ninfer-all |
inkling |
dspark |
7 |
65536 |
715.8 |
897.4 |
563.1 |
57.7 |
43.7 |
30.8 |
21% |
| ink64_none |
ninfer-all |
inkling |
none |
– |
65536 |
719.0 |
898.2 |
564.2 |
78.4 |
65.0 |
49.0 |
– |
| ink64_dflash2 |
ninfer-all |
inkling |
dflash2 |
7 |
65536 |
725.7 |
897.2 |
564.0 |
73.5 |
56.8 |
45.9 |
32% |
| qwen_mtp3 |
ninfer-all |
nvfp4 |
mtp |
3 |
65536 |
841.9 |
993.6 |
829.5 |
36.1 |
34.8 |
33.2 |
60% |
| qwen_none |
ninfer-all |
nvfp4 |
none |
– |
65536 |
840.7 |
1012.8 |
850.8 |
14.5 |
14.4 |
14.2 |
– |
| qwen_dflash2 |
ninfer-all |
nvfp4 |
dflash2 |
5 |
65536 |
723.3 |
1433.5 |
1200.3 |
31.0 |
33.2 |
33.3 |
48% |
| qwen_mtp3_fullhead |
ninfer-all |
nvfp4 |
mtp |
3 |
65536 |
832.7 |
991.4 |
828.9 |
33.5 |
30.9 |
31.4 |
57% |
| qwen_mtp3_nongram |
ninfer-all |
nvfp4 |
mtp |
3 |
65536 |
841.8 |
984.2 |
828.6 |
35.5 |
33.5 |
32.7 |
64% |
| qwen_mtp3_wallclock |
ninfer-v100-duo-win |
nvfp4 |
mtp |
3 |
65536 |
~1356 |
~1356 |
~1207 |
~95 |
~95 |
~95 |
? |
3. 结论
3.1 Inkling × V100×2 × ninfer-all:速度、卡分配、硬限制
速度(spec=none,本文最推荐配置,ctx 65536)
| prompt |
prefill |
decode |
| 552 |
719.0 |
78.4 |
| 12852 |
898.2 |
65.0 |
| 48052 |
564.2 |
49.0 |
对比其他后端(同 ctx):dspark K=7 → 57.7 / 43.7 / 30.8(接受率 21%);dflash2 K=7 → 73.5 / 56.8 / 45.9(32%)。都不如不投机。
两卡怎么分配(--tensor-parallel,只切 routed experts)
| 内容 |
卡 0 |
卡 1 |
| routed experts(13.10 GiB,对半) |
6.55 GiB |
6.55 GiB |
| 稠密部分:attention + embedding + output head(1.34 GiB) |
全部 |
0 |
| dspark 草稿器(0.29 GiB) |
全部 |
0 |
| KV cache(attention 不切分 → KV 不切分) |
全部 |
0 |
| 实测 @64K(dspark, vision on) |
13069 MiB(79.8%) |
7709 MiB(47.1%) |
| 实测 @240K(dspark, vision on) |
15953 MiB(97.4%) |
7469 MiB |
关键结构性事实:卡 1 的占用不随上下文增长。它的 7.5 GiB 是死重量(专家),free-after-startup 那 8.6 GiB 空闲对 KV 一点用没有。
硬限制(逐条都是引擎行为,不是配置问题)
| 限制 |
证据 |
| 不能 pipeline |
引擎拒绝:Inkling 2 runs on one device, or divides its routed experts over several with --tensor-parallel |
| 不能切 attention / KV |
--tensor-attention ... apply to Qwen3_5ForCausalLM and Qwen3_5MoeForCausalLM artifacts,Inkling2 不在名单 |
| 没有 MTP |
artifact 组件只有 text / vision / dspark / dflash2;传 --spec mtp 被拒 |
| 上下文 245760 封顶 |
262144 报 workspace 579 MiB + 320 MiB > 834 MiB free |
| 并发只能 1 |
240K 时卡 0 仅剩 308 MiB,无第二路空间 |
| 视觉常驻成本 |
110 MiB 设备显存 + 580 MiB/图 workspace(overlay 模式,日志原文) |
一句话:Inkling 在 2×16 GB 上是「一张卡干活、另一张卡存专家」的形态,卡 0 是全程瓶颈。
3.2 同一 build(ninfer-all):Qwen3.8-27B vs Inkling
| 指标 |
Inkling(none) |
Qwen 27B(mtp K=3) |
差 |
| decode @0.5K |
78.4 |
36.1 |
Inkling 2.2× |
| decode @13K |
65.0 |
34.8 |
1.9× |
| decode @48K |
49.0 |
33.2 |
1.5× |
| prefill @0.5K |
719 |
842 |
Qwen 1.17× |
| prefill @13K |
898 |
994 |
1.11× |
| prefill @48K |
564 |
830 |
1.47× |
| 权重 |
16.05 GiB,MoE 8/128 |
21.3 GiB,稠密 64 层 |
— |
| 投机 |
负收益(0.74×) |
刚需(2.49×) |
— |
读法:
- decode 上 Inkling 全面领先,因为每 token 只读激活专家,权重扫描量小得多。差距随上下文缩小(2.2×→1.5×),说明长上下文时两者都转为 KV 带宽受限。
- prefill 上 Qwen 略优,48K 时领先 47%。这个差异方向可信(稠密 GEMM 的算术强度更高、分块更规整),但绝对值受 §4 的 prefix cache 问题影响,不要当精确值。
- 投机方向完全相反,原因见 §3.4。这一条是本文最有操作价值的结论:给 MoE 开投机就是自残。
注意这不是同档次模型的对比:Inkling 24 层、激活 8/128 专家;Qwen 64 层全激活。速度差主要来自参数激活量,不代表能力差。
3.3 Qwen3.8-27B:ninfer-v100-duo-win vs ninfer-all
同 artifact、同参数(nvfp4 / mtp K=3 / int8 KV / ctx 65536 / prefill-chunk 2048 / TP2):
|
decode |
prefill 13K |
prefill 48K |
| ninfer-all |
36.1 |
994 |
830 |
| ninfer-v100-duo-win |
~95 |
~1356 |
~1207 |
| 比值 |
2.6× |
1.36× |
1.45× |
逐项排除过的嫌疑:
| 嫌疑 |
实测 |
结论 |
| TP 未启用 |
日志 tensor split ... shares 0.456,0.544,两卡均承担 |
排除 |
| KV dtype |
两边均 int8 |
排除 |
| draft head 失效 |
强制 --full-draft-head 仅 36.1→33.5(−7%),说明 proposal head 确实在起作用 |
排除 |
| ngram 复制开销 |
--ngram-draft-tokens 0 仅 36.1→35.5(−1.5%) |
排除 |
| 上下文 / prefill-chunk |
均固定 65536 / 2048 |
排除 |
| ECC |
同机同卡,两 build 影响相同 |
排除 |
剩余变量只有引擎本身。这是真实回归,不是配置错误。
|
|
Inkling 无法在此 build 上验证(旧 build 的 --spec 只有 `mtp |
dflash,没有 dspark`)—— 这一点是从 CLI 推断的,未实测。 |
3.4 其他发现
a) 投机收益可以用「每轮权重扫描换来几个 token」统一解释
- Qwen 27B(稠密):每 token 必扫 21.3 GiB。K=3、接受率 60% 时一轮期望产出
1 + 3×0.60 ≈ 2.8 token。实测 14.5 → 36.1 = 2.49×,与 2.8 减去验证开销吻合。
- Inkling(MoE):每 token 只激活 8/128 专家,扫描量远小于 16 GiB,权重不是瓶颈。K=7、接受率 21% 时一轮期望产出
1 + 7×0.21 ≈ 2.47 token,按理应有收益,实测却是 78.4 → 57.7。唯一解释:验证 8 个位置的代价 > 3.4 倍单 token 解码代价 —— 稀疏省下的算力被投机又吃回去了。
推论:MoE 上要么不投机,要么必须把接受率拉到 60% 以上;Inkling 的 21%/32% 都不够。
b) tensor split 的启动代价
即便份额最终能自适应,首次按 0.5/0.5 装载后若超预算,引擎会重读整个 artifact 一次。实测 Qwen 上这一次重载多花 73 秒(loading again with 0.456,0.544)。用 TENSOR_SPLIT=0.456,0.544 可免,但该值与配置绑定,换 ctx 或换 artifact 要重算。
c) ECC 是沉默的税
日志原文:容量 −6.25%、带宽 −12%(803 vs 902 GB/s 的实测口径)。两个 build 同受影响,所以不影响 §3.3 的对比结论,但会整体压低本文所有绝对值。
d) 实测踩出来的两个引擎/工具坑
- Windows 原生 curl 不认
/dev/null(配 MSYS_NO_PATHCONV=1 时 -o /dev/null 返回 exit 23 write error),会让就绪探测永远失败、报「not ready within 180s」的假警报。用 > /dev/null 重定向解决。
/health 是可靠的(返回 {"status":"ok"}),之前我判断「/health 不在主端口」是错的,撤回。
4. 方法学缺陷(读数字前必看)
- 单次测量,无重复。所有数字都是 1 次请求,没有方差估计。±10% 以内的差异不可信。
- 三档 prompt 共用前缀,第 2、3 档可能命中 prefix cache,导致 prefill 偏乐观。三组之间 prefill 的 40% 级差异(994 vs 1434)更可能是缓存命中差异,而不是 spec 的真实影响 —— prefill 理论上与 spec 无关。
- 旧 build 的数字是墙钟反推,前提是「prefill 与 decode 时间可分离」。它不返回
timings,无接受率、无池容量,pool 记为 ?。
- Inkling 240K 那组用的是 dspark(当时默认),不是现在的默认
none,两者不可直接比较。
5. 配置建议
| 场景 |
配置 |
| Inkling,通用 |
spec=none,CTX 65536(上限 245760) |
| Inkling,要长上下文 |
CTX=245760,仍用 none,卡 0 剩余 308 MiB,无并发余量 |
| Qwen 27B,decode 优先 |
spec=mtp DRAFT=3,36.1 tok/s |
| Qwen 27B,prefill 优先 |
spec=dflash2 DRAFT=5,13K prompt 1433 tok/s |
| Qwen 27B,要速度 |
用旧 build(ninfer-v100-duo-win),~95 tok/s,领先 2.6 倍 |
Inkling 只在 ninfer-all 上可用(旧 build 的 --spec 无 dspark);Qwen 两套都能跑,但旧 build 快得多。两套 CLI 不兼容,脚本不可混用。