<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s]]></title><description><![CDATA[<h1>DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署复现手册</h1>
<blockquote>
<p dir="auto">目标：任何人在<strong>同规格硬件</strong>上，照着本文从零复现一套<br />
<code>DeepSeek-V4.1-Flash</code>（原生 MXFP4/MXFP8 权重）TP4+EP4 推理服务，<br />
1M 上下文、6 并发、四卡 180 W，接口对齐 OpenAI Chat Completions。</p>
<p dir="auto">本文所有命令均在本机实测通过（2026-11-25）。标注 <code>[实测]</code> 的为现场取证数据，<br />
标 <code>[推断]</code> 的为未直接验证、仅作参考的内容。</p>
</blockquote>
<hr />
<h2>0. 一页纸速览（TL;DR）</h2>
<pre><code class="language-text">硬件：4× NVIDIA CMP 170HX 81,920 MiB（解锁）+ Xeon E5-2696 v4 + 251 GiB RAM
系统：Ubuntu 20.04.6 / 内核 5.15.0-139-generic / 驱动 615.71.09
镜像：localhost/vllm-main-sm80:deepseek-v4.1-flash-tep4  (24.8 GB, sha256 fefdcd01…)
模型：DeepSeek-V4.1-Flash-1017 原生 checkpoint  476 GiB
参数：TP4 + EP4 + DCP1 + PP1 / ctx 1048576 / seqs 6 / batched 3072 / KV 2.2 GB / DSpark K=5
功耗：180 W/卡（持久化）
冷启：约 10 分钟（实测 09:32:52 → 09:43:12）
实测（180 W）：c1 531 tok/s，c6 1670 tok/s；6×32K prefill 6632 tok/s
参照（250 W）：c8 2084 tok/s；单路 prefill 64K 7795 tok/s
</code></pre>
<p dir="auto">最短路径（硬件与驱动已就绪时）：</p>
<pre><code class="language-bash"># 1) 取镜像与模型（见 §4、§5）
# 2) 写参数
sudo mkdir -p /media/ll/data/tep4
sudo tee /media/ll/data/tep4/params.json &gt;/dev/null &lt;&lt;'JSON'
{
  "PORT": 8000,
  "SERVED_MODEL_NAME": "DeepSeek-V4.1-Flash",
  "API_KEY": "3124",
  "MODEL_PATH": "/models/DeepSeek-V4.1-Flash-1017",
  "MAX_MODEL_LEN": 1048576,
  "MAX_SEQS": 6,
  "MAX_BATCHED": 3072,
  "DSPARK": 5,
  "KV_CACHE_GB": 2.2,
  "POWER_LIMIT": 180,
  "EXTRA_ARGS": ""
}
JSON
# 3) 启动（脚本见 §6.2）
bash /media/ll/data/tep4/run-tep4.sh
# 4) 等健康（约 10 分钟）
until [ "$(curl -s -o /dev/null -w %{http_code} -H 'Authorization: Bearer 3124' \
        http://127.0.0.1:8000/health)" = 200 ]; do sleep 10; done; echo READY
</code></pre>
<hr />
<h2>1. 这套部署到底是什么</h2>
<p dir="auto">与常见的"EXL3 量化 + recipe 脚本栈"不同，本部署是<strong>原生精度路线</strong>：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>维度</th>
<th>本部署（TEP4）</th>
<th>旧 recipe 栈（对照）</th>
</tr>
</thead>
<tbody>
<tr>
<td>权重</td>
<td>原生 MXFP4 MoE + MXFP8 dense</td>
<td>EXL3 混合量化（约 3 bpw）</td>
</tr>
<tr>
<td>引擎</td>
<td>官方 vLLM + TEP4 优化分支</td>
<td>社区 recipe 镜像</td>
</tr>
<tr>
<td>并行</td>
<td>TP4 + EP4 + DCP1 + PP1</td>
<td>TP4 + PP1</td>
</tr>
<tr>
<td>上下文</td>
<td>1,048,576</td>
<td>262,144</td>
</tr>
<tr>
<td>启动方式</td>
<td>一个 <code>docker run</code></td>
<td><code>./start.sh</code> + <code>.env</code></td>
</tr>
</tbody>
</table>
<p dir="auto">TEP4 = <strong>T</strong>ensor <strong>EP</strong>arallel 4，即四卡张量并行 + 专家并行，<br />
是 canoziia/vllm-cmp170hx 仓库为 CMP 170HX 定制的 SM80 优化档位。</p>
<p dir="auto">技术栈血缘（关键，决定能否复现）：</p>
<pre><code class="language-text">上游 vLLM  0e3c8db
   └── canoziia/vllm-cmp170hx 分支 vllm   commit 5470fe0   ← 取其 vllm/ Python 源码
          └── 叠加到本机 dsv41-flash:1.0.2 基础镜像（torch 2.14 / CUDA 13.3）
                 └── 就地编译 6 个 CUDA 原生扩展
                        └── docker commit → fefdcd01aee7
</code></pre>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ <strong>不要直接用对方的镜像</strong>：对方的镜像基于较旧 torch 构建，<br />
与本机驱动 615.71.09 + CUDA 13.4 UMD 不匹配。<br />
正确做法是<strong>取源码，在本机基础镜像里重编</strong>（§5）。</p>
</blockquote>
<hr />
<h2>2. 硬件与系统基线</h2>
<h3>2.1 实测规格</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项目</th>
<th>规格</th>
<th>取证命令</th>
</tr>
</thead>
<tbody>
<tr>
<td>主机</td>
<td><code>ll-desktop</code>，Ubuntu 20.04.6 LTS</td>
<td><code>hostnamectl</code></td>
</tr>
<tr>
<td>内核</td>
<td><code>5.15.0-139-generic</code></td>
<td><code>uname -r</code></td>
</tr>
<tr>
<td>主板</td>
<td>HUANANZHI X99-T8</td>
<td><code>sudo dmidecode -t 2</code></td>
</tr>
<tr>
<td>CPU</td>
<td>Xeon E5-2696 v4，22 核（DMI 报 22C/44T，当前仅 0-21 在线）</td>
<td><code>nproc</code> / <code>lscpu</code></td>
</tr>
<tr>
<td>内存</td>
<td>251 GiB（<code>MemTotal 263807680 kB</code>）</td>
<td><code>free -g</code></td>
</tr>
<tr>
<td>GPU</td>
<td>4× NVIDIA CMP 170HX，<strong>81,920 MiB/卡</strong></td>
<td><code>nvidia-smi -L</code></td>
</tr>
<tr>
<td>驱动</td>
<td><strong>615.71.09</strong>（KMD 615.71.09 / CUDA UMD 13.4）</td>
<td><code>nvidia-smi</code></td>
</tr>
<tr>
<td>PCIe</td>
<td><strong>Gen3 ×16</strong>（四卡一致）</td>
<td><code>nvidia-smi --query-gpu=pcie.link.gen.current,pcie.link.width.current</code></td>
</tr>
<tr>
<td>GPU BDF</td>
<td><code>07:00.0</code>、<code>0a:00.0</code>、<code>0e:00.0</code>、<code>0f:00.0</code>（<code>10de:20c2</code>）</td>
<td><code>lspci -nn \| grep 20c2</code></td>
</tr>
<tr>
<td>数据盘</td>
<td><code>/media/ll/data</code> 1.9 TB，余量需 ≥ 520 GB（模型 476 G + 镜像 25 G）</td>
<td><code>df -h</code></td>
</tr>
<tr>
<td>Docker</td>
<td>26.1.3，overlay2，cgroup v1</td>
<td><code>docker info</code></td>
</tr>
</tbody>
</table>
<h3>2.2 为什么必须是这些卡</h3>
<p dir="auto">CMP 170HX 是 GA100 核心的矿卡，出厂 8 GB / PCIe Gen1 / 无 P2P。<br />
必须通过 <strong>cmpunlocker</strong> 解锁到 80 GB 几何 + Gen3 链路才能跑本部署：</p>
<pre><code class="language-bash"># 解锁状态判据（三个都要满足）
nvidia-smi --query-gpu=name,memory.total,pcie.link.gen.current --format=csv
#   NVIDIA CMP 170HX, 81920 MiB, 3
</code></pre>
<p dir="auto">解锁细节（profile、寄存器根因、设备冷启动训练法）见本仓库<br />
<code>docs/DEPLOY-127-20260919.md</code> 与技能 <code>cmp170hx-gen3-80g</code>。<br />
关键点：</p>
<ul>
<li>解锁配置落盘在 <code>/lib/modules/$(uname -r)/updates/cmpunlocker/</code><br />
（<code>card_profile</code> = <code>mixed</code>，<code>driver_version</code> = <code>615.71.09</code>）；</li>
<li><strong>内核升级后必须重跑</strong> <code>/home/ll/run-cmpunlocker.sh</code>；</li>
<li>另有 <code>cmp-gpu-rescue.service</code>，负责开机重新枚举 BIOS 漏掉的卡（详见 §9.6）。</li>
</ul>
<hr />
<h2>3. 前置条件</h2>
<h3>3.1 系统层</h3>
<pre><code class="language-bash"># Docker（Ubuntu 20.04 自带源版本即可）
docker --version        # 26.1.3
# NVIDIA 容器运行时
docker info --format '{{.Driver}}'   # overlay2
nvidia-smi -L           # 必须能看到 4 张卡
</code></pre>
<h3>3.2 功耗上限（重要，默认值会咬人）</h3>
<p dir="auto">CMP 170HX 出厂默认 250 W。本部署定档 <strong>180 W/卡</strong>（温控与稳定性优先，<br />
decode 几乎不受影响，prefill 约低 3–5%）。</p>
<pre><code class="language-bash"># 立即生效
sudo /usr/local/bin/gpu-ctl pl 180 all
# 开机持久化（必须同时做，否则重启后被打回 250 W）
sudo /usr/local/bin/gpu-ctl persist-pl 180
</code></pre>
<p dir="auto"><code>persist-pl</code> 会写 <code>/etc/systemd/system/gpu-power-limit.service.d/pl-console.conf</code>：</p>
<pre><code class="language-ini">[Service]
Environment=PL=180
</code></pre>
<p dir="auto"><strong>还必须补一个开机顺序修正</strong>（踩过坑，见 §9.5）：</p>
<pre><code class="language-bash">sudo tee /etc/systemd/system/gpu-power-limit.service.d/pl-boot-order.conf &gt;/dev/null &lt;&lt;'EOF'
[Unit]
After=cmp-gpu-rescue.service
Wants=cmp-gpu-rescue.service

[Service]
# 等 4 张卡全部出现在 NVML 再设功耗，最多 300 s
ExecStartPre=/bin/sh -c 'for i in $(seq 1 150); do n=$(/usr/bin/nvidia-smi -L 2&gt;/dev/null | wc -l); [ "$n" -ge 4 ] &amp;&amp; exit 0; sleep 2; done; exit 0'
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now gpu-power-limit.service
</code></pre>
<p dir="auto">验证：</p>
<pre><code class="language-bash">systemctl is-enabled gpu-power-limit.service    # enabled
journalctl -u gpu-power-limit.service -b | tail -2
#   已设置功耗上限 180W   或   功耗上限已是 180W（无需改动）
nvidia-smi --query-gpu=index,power.limit --format=csv,noheader
</code></pre>
<h3>3.3 显存红线（必须先算清楚）</h3>
<p dir="auto">单卡 <strong>81.9 GB</strong>（<code>81920 MiB</code>）。实测各部分组成（<code>nvidia-smi memory.used</code>）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th>占用（实测）</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>权重 + CUDA Graph + 激活</td>
<td>≈ <strong>77 GB</strong></td>
<td>MXFP4 专家权重加载后按 4-bit 组织，显存占用远小于 checkpoint 文件体积（475.2 GiB）</td>
</tr>
<tr>
<td>KV 池</td>
<td><strong>2.2 GB</strong></td>
<td><code>--kv-cache-memory</code>，约 201 万 tokens</td>
</tr>
<tr>
<td><strong>单卡合计</strong></td>
<td><strong>≈ 79.3 GB</strong></td>
<td>余量约 2.6 GB</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">注意：<strong>不能用「475 GiB ÷ 4 = 119 GiB」估算单卡权重</strong>——那只是文件体积。<br />
实际显存以 <code>nvidia-smi</code> 读数为准，部署后立刻量一次。</p>
</blockquote>
<p dir="auto"><strong>KV 绝对不要超过 2.2 GB</strong>。实测把 KV 设成 4.2 GB 后，单卡占用达 79.08 GiB、<br />
只剩 114 MiB，多并发时一次 150 MiB 的临时分配就失败（详见 §9.4）。</p>
<hr />
<h2>4. 模型准备</h2>
<h3>4.1 需要的 checkpoint</h3>
<p dir="auto"><code>DeepSeek-V4.1-Flash-1017</code> 原生权重（<strong>不是</strong> EXL3 量化版）：</p>
<pre><code class="language-bash">ls /media/ll/data/dsv41-models/DeepSeek-V4.1-Flash-1017/ | head
# config.json  model-00001-of-00048.safetensors … model-00048-of-00048.safetensors
du -sh /media/ll/data/dsv41-models/DeepSeek-V4.1-Flash-1017      # 476G
</code></pre>
<p dir="auto">关键配置（<code>config.json</code> 实测）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>字段</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>architectures</code></td>
<td><code>DeepseekV41ForCausalLM</code></td>
</tr>
<tr>
<td><code>quantization_config.quant_method</code></td>
<td><code>fp8</code>，<code>weight_block_size [32,32]</code>，<code>expert_dtype = fp4</code></td>
</tr>
<tr>
<td><code>num_hidden_layers</code></td>
<td>40</td>
</tr>
<tr>
<td><code>hidden_size</code></td>
<td>5120</td>
</tr>
<tr>
<td><code>num_attention_heads</code></td>
<td>64</td>
</tr>
<tr>
<td><code>n_routed_experts</code></td>
<td>384</td>
</tr>
<tr>
<td><code>max_position_embeddings</code></td>
<td><strong>1048576</strong></td>
</tr>
<tr>
<td><code>vocab_size</code></td>
<td>129280</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">若拿到的是 EXL3 版本（体积约 150 GB），<strong>不能</strong>用于本部署——<br />
本部署依赖原生 MXFP4 专家权重 + 原生 MXFP8 dense 权重。</p>
</blockquote>
<h3>4.2 目录约定</h3>
<pre><code class="language-text">/media/ll/data/dsv41-models/            # 宿主机模型根目录，容器内挂为 /models:ro
└── DeepSeek-V4.1-Flash-1017/
</code></pre>
<p dir="auto">模型目录<strong>只读挂载</strong>，容器内路径为 <code>/models/DeepSeek-V4.1-Flash-1017</code>。</p>
<hr />
<h2>5. 镜像构建</h2>
<p dir="auto">镜像名：<code>localhost/vllm-main-sm80:deepseek-v4.1-flash-tep4</code><br />
（24.8 GB，<code>sha256:fefdcd01aee7b6e5c17e2c92bf0b0e9338ff3e448db1b39a0fe324e542da6755</code>）</p>
<h3>5.1 路线 A：直接导入现成镜像（最快）</h3>
<pre><code class="language-bash"># 在源机导出
docker save localhost/vllm-main-sm80:deepseek-v4.1-flash-tep4 | zstd -T0 &gt; tep4-image.tar.zst
# 目标机导入
zstd -d -c tep4-image.tar.zst | docker load
docker images | grep tep4
</code></pre>
<p dir="auto">适合"已有同型号机器、只想复制一份"的场景。</p>
<h3>5.2 路线 B：从基础镜像重建（推荐，可移植）</h3>
<p dir="auto"><strong>基础镜像要求</strong>（任一满足其一即可）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th>要求</th>
</tr>
</thead>
<tbody>
<tr>
<td>torch</td>
<td>2.14.0+cu130（本机实测）</td>
</tr>
<tr>
<td>CUDA</td>
<td>13.3（容器内 <code>CUDA_VERSION=13.3.1</code>）</td>
</tr>
<tr>
<td>vLLM</td>
<td>0.32.1rc1.dev515+ge05403fdc</td>
</tr>
<tr>
<td>Python</td>
<td>3.12（<code>/opt/venv</code>）</td>
</tr>
<tr>
<td>布局</td>
<td>引擎源码在 <code>/opt/assembly/engine/vllm</code></td>
</tr>
</tbody>
</table>
<p dir="auto">本机基线为 <code>dsv41-flash:1.0.2</code>（<code>e207e32be0be</code>，带上述环境）。</p>
<p dir="auto">构建步骤：</p>
<pre><code class="language-bash"># ── 0) 准备目录
sudo mkdir -p /media/ll/data/tep4 &amp;&amp; cd /media/ll/data/tep4

# ── 1) 取上游仓库的两个分支
#   vllm  分支 = 要覆盖进镜像的 vLLM Python 源码（commit 5470fe0）
git clone --depth 1 -b vllm https://github.com/canoziia/vllm-cmp170hx.git vllm-src
#   main  分支 = native 内核源码 + 补丁 + 构建脚本
git clone --depth 1 https://github.com/canoziia/vllm-cmp170hx.git repo
#   若目标机不能直连 GitHub：在能访问的机器上下载 tarball 再 rsync 上机
(cd vllm-src &amp;&amp; git log --oneline -1)   # 5470fe0

# ── 2) 起一个临时容器做编译环境
docker run -d --name tep4-build --gpus all --ipc=host \
  -v /media/ll/data/tep4/vllm-src:/src:ro \
  -v /media/ll/data/tep4/repo:/repo:ro \
  -v /media/ll/data/tep4/libso:/tmp/mxfp8_so \
  dsv41-flash:1.0.2 sleep infinity

# ── 3) 覆盖 Python 源码（保留镜像原有 *.so 与 _version.py）
docker exec tep4-build bash -c '
  cd / &amp;&amp;
  (cd /src &amp;&amp; tar cf - --exclude="*.so" --exclude="_version.py" ./vllm) |
    (cd /opt/assembly/engine &amp;&amp; tar xf -)'

# ── 4) 编译 6 个原生扩展（逐个调用各自的 build.sh）
docker exec -e PYTHON=/opt/venv/bin/python3 -e CUDA_HOME=/usr/local/cuda \
            -e MAX_JOBS=20 -e NVCC_APPEND_FLAGS=--std=c++20 \
            tep4-build bash -c '
  set -e
  V=/opt/assembly/engine/vllm
  N=/repo/models/deepseek-v4.1-flash/native
  bash $N/dsv4_moe/build.sh          "$V"
  bash $N/dsv41_indexer/build.sh     "$V"
  bash $N/dsv41_swa/build.sh         "$V"
  bash $N/dsv41_r2/build.sh          "$V"
  bash $N/dsv41_engram_cpu/build.sh  "$V/models/deepseek_v41/common"
  # dense_mxfp8 的产物名与目录不同，需单独拷贝
  bash $N/dsv41_dense_mxfp8/build.sh /tmp/mxfp8_so \
       --name _dsv41_dense_mxfp8 $N/dsv41_dense_mxfp8/dense_mxfp8.cu
  cp /tmp/mxfp8_so/_dsv41_dense_mxfp8.so "$V/_dsv41_dense_mxfp8.so"
  ls -l "$V"/*.so "$V"/models/deepseek_v41/common/*.so
'
#   产出（均在 /opt/assembly/engine/vllm/ 下）：
#     _dsv4_moe_C.abi3.so
#     _dsv41_indexer_C.abi3.so
#     _dsv41_dense_mxfp8.so
#     _dsv41_swa_C.abi3.so
#     _dsv41_r2_C.abi3.so
#     models/deepseek_v41/common/_dsv41_engram_cpu.so

# ── 5) 预编译字节码并固化
docker exec tep4-build /opt/venv/bin/python3 -m compileall -f -q /opt/assembly/engine/vllm
docker commit tep4-build localhost/vllm-main-sm80:deepseek-v4.1-flash-tep4
docker rm -f tep4-build
</code></pre>
<p dir="auto">编译耗时参考：单卡编译 6 个扩展约 12–18 分钟（<code>MAX_JOBS=20</code>）。</p>
<h3>5.3 路线 C：只替换单一内核（调参/修 bug 时）</h3>
<pre><code class="language-bash"># 例：只重编 swa
docker run --rm --gpus all -v /media/ll/data/tep4/repo:/repo:ro \
  -e NVCC_APPEND_FLAGS=--std=c++20 -e MAX_JOBS=20 \
  localhost/vllm-main-sm80:deepseek-v4.1-flash-tep4 \
  bash /repo/models/deepseek-v4.1-flash/native/dsv41_swa/build.sh \
       /opt/assembly/engine/vllm
# 然后在容器内拷回 + commit
</code></pre>
<h3>5.4 torch 2.14 兼容性补丁（<strong>必做</strong>）</h3>
<p dir="auto">若基础镜像 torch ≥ 2.14，以下两处<strong>不改就编不过</strong>：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>症状</th>
<th>处理</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ATen.h</code> 报 C++20 特性缺失</td>
<td>编译时加 <code>NVCC_APPEND_FLAGS=--std=c++20</code></td>
</tr>
<tr>
<td><code>aoti_torch_get_current_cuda_stream</code> / <code>torch_get_current_cuda_blas_handle</code> 未定义</td>
<td>改 <code>native/dsv41_swa/torch_utils.h</code>：&lt;br&gt;用 <code>c10::cuda::getCurrentCUDAStream().stream()</code> 与 <code>at::cuda::getCurrentCUDABlasHandle()</code></td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">原生内核以 <code>torch.ops.load_library</code> 装载（<strong>没有 <code>PyInit_</code></strong>），<br />
直接 <code>import</code> 会报 <code>PyInit</code> 缺失——这是正常现象，不是构建失败。</p>
</blockquote>
<h3>5.5 构建自检</h3>
<pre><code class="language-bash">docker run --rm --gpus all localhost/vllm-main-sm80:deepseek-v4.1-flash-tep4 \
  /opt/venv/bin/python -c "
import torch, vllm
print('vllm', vllm.__version__)
print('torch', torch.__version__, torch.version.cuda)
for n in ['_dsv4_moe_C','_dsv41_indexer_C','_dsv41_swa_C','_dsv41_r2_C']:
    torch.ops.load_library('/opt/assembly/engine/vllm/%s.abi3.so' % n)
torch.ops.load_library('/opt/assembly/engine/vllm/_dsv41_dense_mxfp8.so')
torch.ops.load_library('/opt/assembly/engine/vllm/models/deepseek_v41/common/_dsv41_engram_cpu.so')
print('natives OK')
"
</code></pre>
<p dir="auto">预期输出：<code>0.32.1rc1.dev515+ge05403fdc</code> / <code>2.14.0+cu130 13.0</code> / <code>natives OK</code>。</p>
<hr />
<h2>6. 启动</h2>
<h3>6.1 参数文件（唯一可改的地方）</h3>
<p dir="auto"><code>/media/ll/data/tep4/params.json</code>：</p>
<pre><code class="language-json">{
  "PORT": 8000,
  "SERVED_MODEL_NAME": "DeepSeek-V4.1-Flash",
  "API_KEY": "3124",
  "MODEL_PATH": "/models/DeepSeek-V4.1-Flash-1017",
  "MAX_MODEL_LEN": 1048576,
  "MAX_SEQS": 6,
  "MAX_BATCHED": 3072,
  "DSPARK": 5,
  "KV_CACHE_GB": 2.2,
  "POWER_LIMIT": 180,
  "EXTRA_ARGS": ""
}
</code></pre>
<p dir="auto">字段含义与安全范围：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>字段</th>
<th>范围</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>PORT</code></td>
<td>1024–65535</td>
<td>改端口要同步改客户端 Base URL</td>
</tr>
<tr>
<td><code>SERVED_MODEL_NAME</code></td>
<td>字母数字 <code>._/-</code></td>
<td>客户端 <code>model</code> 字段必须一致</td>
</tr>
<tr>
<td><code>API_KEY</code></td>
<td>非空则启用鉴权</td>
<td>留空 = 不鉴权</td>
</tr>
<tr>
<td><code>MODEL_PATH</code></td>
<td>容器内绝对路径</td>
<td></td>
</tr>
<tr>
<td><code>MAX_MODEL_LEN</code></td>
<td>8192–1048576</td>
<td>模型原生支持 1M</td>
</tr>
<tr>
<td><code>MAX_SEQS</code></td>
<td>1–6（建议）</td>
<td>受 KV 池与图捕获约束</td>
</tr>
<tr>
<td><code>MAX_BATCHED</code></td>
<td>256–8192</td>
<td>越大 prefill 越快、单步延迟越高</td>
</tr>
<tr>
<td><code>DSPARK</code></td>
<td>0–7</td>
<td>0 关闭投机；5–7 自适应</td>
</tr>
<tr>
<td><code>KV_CACHE_GB</code></td>
<td><strong>1.0–2.2</strong></td>
<td>超 2.2 会 OOM，见 §9.4</td>
</tr>
<tr>
<td><code>POWER_LIMIT</code></td>
<td>100–300</td>
<td>仅作展示/联动，实际由 <code>gpu-ctl</code> 设</td>
</tr>
</tbody>
</table>
<h3>6.2 启动脚本</h3>
<p dir="auto"><code>/media/ll/data/tep4/run-tep4.sh</code>（完整内容，可直接复制）：</p>
<pre><code class="language-bash">#!/usr/bin/env bash
# TEP4 launcher. All user-tunable values live in params.json (page :8002 edits it).
#   DRY_RUN=1 -&gt; print the docker command instead of running it.
set -euo pipefail
IMAGE=${IMAGE:-localhost/vllm-main-sm80:deepseek-v4.1-flash-tep4}
NAME=dsv41-tep4
MODELS=/media/ll/data/dsv41-models
CACHE=/media/ll/data/tep4/cache
PARAMS_JSON=${PARAMS_JSON:-/media/ll/data/tep4/params.json}

eval "$(python3 - "$PARAMS_JSON" &lt;&lt;'PY'
import json, shlex, sys
p = json.load(open(sys.argv[1], encoding="utf-8"))
keys = ["PORT", "SERVED_MODEL_NAME", "API_KEY", "MODEL_PATH", "MAX_MODEL_LEN",
        "MAX_SEQS", "MAX_BATCHED", "DSPARK", "KV_CACHE_GB", "POWER_LIMIT", "EXTRA_ARGS"]
for k in keys:
    print("P_%s=%s" % (k, shlex.quote(str(p.get(k, "")))))
PY
)"

PORT=${P_PORT:-8000}
SERVED=${P_SERVED_MODEL_NAME:-DeepSeek-V4.1-Flash}
MODEL_PATH=${P_MODEL_PATH:-/models/DeepSeek-V4.1-Flash-1017}
MAX_LEN=${P_MAX_MODEL_LEN:-1048576}
MAX_SEQS=${P_MAX_SEQS:-6}
MAX_BATCHED=${P_MAX_BATCHED:-3072}
DSPARK=${P_DSPARK:-5}
KV_GB=${P_KV_CACHE_GB:-2.2}
API_KEY=${P_API_KEY:-}
EXTRA_ARGS=${P_EXTRA_ARGS:-}

KV_BYTES=$(python3 -c "print(int(float('$KV_GB') * 1e9))")
SPEC_JSON=$(python3 -c "import json,sys;print(json.dumps({'method':'dspark','num_speculative_tokens':int('$DSPARK'),'use_local_argmax_reduction':True,'enable_adaptive_verification':True,'adaptive_verification_decay':0.95},separators=(',',':')))")
COMP_JSON=$(python3 -c "import json;n=int('$MAX_SEQS');sizes=sorted(set(list(range(1,min(n,8)+1))+[x for x in (8,16,24,32,48,64,96,128,192) if x&lt;=n]));print(json.dumps({'cudagraph_mode':'FULL_DECODE_ONLY','decode_cudagraph_capture_request_sizes':sizes},separators=(',',':')))")

CMD=(docker run -d --name "$NAME" --gpus all --ipc=host --network host --user 0:0
  -e CUDA_DEVICE_ORDER=PCI_BUS_ID
  -e HF_HUB_OFFLINE=1
  -e PYTHONPATH=/opt/assembly/engine
  -e VLLM_PLUGINS=dsh_vllm_logger
  -e DSH_ENGINE_PORT="$PORT"
  -e VLLM_WORKER_MULTIPROC_METHOD=spawn
  -e VLLM_SPARSE_INDEXER_MAX_LOGITS_MB=64
  -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False
  -e NCCL_IB_DISABLE=1
  -e NCCL_P2P_LEVEL=SYS
  -e VLLM_DSV4_MXFP4_DECODE_MAX_TOKENS=192
  -e VLLM_DSV41_OPT_PROFILE=tep4_fused
  -e VLLM_DSV41_OFFLOAD_VISION_EMBED=1
  -e VLLM_ENGINE_READY_TIMEOUT_S=3600
  -e VLLM_RPC_TIMEOUT=600000
  -e PYTHONUNBUFFERED=1
  -e TMPDIR=/root/.cache/tmp
  -v "$MODELS":/models:ro
  -v "$CACHE":/root/.cache
  -v /home/ll/dsv41-flash-cmp170hx-recipe/cache:/cache
  -v /home/ll/dsv41-flash-cmp170hx-recipe/dsh-logger-pkg/dsh_vllm_logger:/opt/venv/lib/python3.12/site-packages/dsh_vllm_logger:ro
  -v /home/ll/dsv41-flash-cmp170hx-recipe/dsh-logger-pkg/dsh_vllm_logger-0.1.0.dist-info:/opt/venv/lib/python3.12/site-packages/dsh_vllm_logger-0.1.0.dist-info:ro
  --entrypoint /opt/venv/bin/vllm
  "$IMAGE" serve "$MODEL_PATH"
  --host=0.0.0.0 --port="$PORT"
  --served-model-name="$SERVED"
  --trust-remote-code --disable-custom-all-reduce --dtype=bfloat16
  --tensor-parallel-size=4 --enable-expert-parallel --decode-context-parallel-size=1 --pipeline-parallel-size=1
  --max-model-len="$MAX_LEN" --max-num-seqs="$MAX_SEQS" --max-num-batched-tokens="$MAX_BATCHED"
  --kv-cache-dtype=auto --kv-cache-memory="$KV_BYTES"
  --prefix-cache-retention-interval=1024 --enable-prefix-caching --enable-prompt-tokens-details
  '--engram-config={"cpu_offload":true}'
  --speculative-config="$SPEC_JSON"
  --per-request-spec-decode-metrics=detailed
  --tokenizer-mode=deepseek_v41 --enable-auto-tool-choice
  '--structured-outputs-config={"backend":"auto","disable_any_whitespace":false}'
  --tool-call-parser=deepseek_v41 --reasoning-parser=deepseek_v41
  --sse-keep-alive-interval=15
  --compilation-config="$COMP_JSON")

if [ -n "$API_KEY" ]; then
  CMD+=(--api-key="$API_KEY")
fi
if [ -n "$EXTRA_ARGS" ]; then
  read -r -a _extra &lt;&lt;&lt; "$EXTRA_ARGS"
  CMD+=("${_extra[@]}")
fi

if [ "${DRY_RUN:-0}" = 1 ]; then
  printf '%q ' "${CMD[@]}"
  echo
  exit 0
fi

docker rm -f "$NAME" &gt;/dev/null 2&gt;&amp;1 || true
"${CMD[@]}" &gt;/dev/null
echo "started $NAME on port $PORT (ctx=$MAX_LEN seqs=$MAX_SEQS batched=$MAX_BATCHED dspark=$DSPARK kv=${KV_GB}GB)"
</code></pre>
<p dir="auto"><strong>先干跑核对参数</strong>（不发车）：</p>
<pre><code class="language-bash">DRY_RUN=1 bash /media/ll/data/tep4/run-tep4.sh | tr ' ' '\n' | grep -E 'max-num-seqs|max-model-len|kv-cache-memory|compilation-config|engram'
</code></pre>
<h3>6.3 等价的手写命令（不用脚本时）</h3>
<pre><code class="language-bash">docker run -d --name dsv41-tep4 --gpus all --ipc=host --network host --user 0:0 \
  -e CUDA_DEVICE_ORDER=PCI_BUS_ID -e HF_HUB_OFFLINE=1 \
  -e PYTHONPATH=/opt/assembly/engine -e VLLM_PLUGINS=dsh_vllm_logger \
  -e DSH_ENGINE_PORT=8000 -e VLLM_WORKER_MULTIPROC_METHOD=spawn \
  -e VLLM_SPARSE_INDEXER_MAX_LOGITS_MB=64 \
  -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False \
  -e NCCL_IB_DISABLE=1 -e NCCL_P2P_LEVEL=SYS \
  -e VLLM_DSV4_MXFP4_DECODE_MAX_TOKENS=192 \
  -e VLLM_DSV41_OPT_PROFILE=tep4_fused \
  -e VLLM_DSV41_OFFLOAD_VISION_EMBED=1 \
  -e VLLM_ENGINE_READY_TIMEOUT_S=3600 -e VLLM_RPC_TIMEOUT=600000 \
  -e PYTHONUNBUFFERED=1 -e TMPDIR=/root/.cache/tmp \
  -v /media/ll/data/dsv41-models:/models:ro \
  -v /media/ll/data/tep4/cache:/root/.cache \
  --entrypoint /opt/venv/bin/vllm \
  localhost/vllm-main-sm80:deepseek-v4.1-flash-tep4 \
  serve /models/DeepSeek-V4.1-Flash-1017 \
  --host=0.0.0.0 --port=8000 \
  --served-model-name=DeepSeek-V4.1-Flash \
  --trust-remote-code --disable-custom-all-reduce --dtype=bfloat16 \
  --tensor-parallel-size=4 --enable-expert-parallel \
  --decode-context-parallel-size=1 --pipeline-parallel-size=1 \
  --max-model-len=1048576 --max-num-seqs=6 --max-num-batched-tokens=3072 \
  --kv-cache-dtype=auto --kv-cache-memory=2200000000 \
  --prefix-cache-retention-interval=1024 --enable-prefix-caching \
  --enable-prompt-tokens-details \
  '--engram-config={"cpu_offload":true}' \
  '--speculative-config={"method":"dspark","num_speculative_tokens":5,"use_local_argmax_reduction":true,"enable_adaptive_verification":true,"adaptive_verification_decay":0.95}' \
  --per-request-spec-decode-metrics=detailed \
  --tokenizer-mode=deepseek_v41 --enable-auto-tool-choice \
  '--structured-outputs-config={"backend":"auto","disable_any_whitespace":false}' \
  --tool-call-parser=deepseek_v41 --reasoning-parser=deepseek_v41 \
  --sse-keep-alive-interval=15 \
  '--compilation-config={"cudagraph_mode":"FULL_DECODE_ONLY","decode_cudagraph_capture_request_sizes":[1,2,3,4,5,6]}' \
  --api-key=3124
</code></pre>
<h3>6.4 关键参数逐条解释</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>参数</th>
<th>作用</th>
<th>为什么这么选</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--tensor-parallel-size=4</code></td>
<td>权重四卡切分</td>
<td>单卡放不下 476 GB 模型</td>
</tr>
<tr>
<td><code>--enable-expert-parallel</code></td>
<td>MoE 专家按 EP4 分布</td>
<td>384 专家均摊到 4 卡</td>
</tr>
<tr>
<td><code>--disable-custom-all-reduce</code></td>
<td>禁用自研 all-reduce</td>
<td>CMP 卡 + 该拓扑下不稳</td>
</tr>
<tr>
<td><code>--kv-cache-memory=2200000000</code></td>
<td>KV 池显存<strong>字节数</strong></td>
<td>见 §3.3 红线</td>
</tr>
<tr>
<td><code>--max-num-seqs=6</code></td>
<td>并发上限</td>
<td>1M 上下文下 KV 只够约 2 路满长，6 路短请求是平衡点</td>
</tr>
<tr>
<td><code>--max-num-batched-tokens=3072</code></td>
<td>单步 token 上限</td>
<td>与 DSpark K=5 匹配</td>
</tr>
<tr>
<td><code>--speculative-config</code>（dspark K=5）</td>
<td>投机解码</td>
<td>实测每步接受 5.88 token，吞吐翻倍主因</td>
</tr>
<tr>
<td><code>--enable-adaptive-verification</code></td>
<td>按负载自适应验证</td>
<td>高并发时降 K，防拖慢</td>
</tr>
<tr>
<td><code>--engram-config={"cpu_offload":true}</code></td>
<td>Engram 表放 CPU</td>
<td>显存不够；访存由 CPU 侧承担</td>
</tr>
<tr>
<td><code>--compilation-config</code></td>
<td>CUDA Graph</td>
<td><strong>必须用 <code>decode_cudagraph_capture_request_sizes</code></strong>，见 §9.3</td>
</tr>
<tr>
<td><code>--sse-keep-alive-interval=15</code></td>
<td>流式保活</td>
<td>长思考时防网关断开</td>
</tr>
</tbody>
</table>
<h3>6.5 环境变量解释</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>变量</th>
<th>作用</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>PYTHONPATH=/opt/assembly/engine</code></td>
<td>让 <code>vllm</code> 走覆盖后的源码</td>
</tr>
<tr>
<td><code>VLLM_PLUGINS=dsh_vllm_logger</code></td>
<td><strong>必须显式点名</strong>；设为空串会禁用全部 entry-point 插件</td>
</tr>
<tr>
<td><code>VLLM_WORKER_MULTIPROC_METHOD=spawn</code></td>
<td>四卡 worker 隔离，避免 fork 继承 CUDA 上下文</td>
</tr>
<tr>
<td><code>VLLM_DSV41_OPT_PROFILE=tep4_fused</code></td>
<td>启用 TEP4 融合内核档</td>
</tr>
<tr>
<td><code>VLLM_DSV4_MXFP4_DECODE_MAX_TOKENS=192</code></td>
<td>MXFP4 解码分块</td>
</tr>
<tr>
<td><code>VLLM_SPARSE_INDEXER_MAX_LOGITS_MB=64</code></td>
<td>稀疏索引器显存上限</td>
</tr>
<tr>
<td><code>PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False</code></td>
<td>关可扩展段，减少长上下文碎片</td>
</tr>
<tr>
<td><code>NCCL_P2P_LEVEL=SYS</code></td>
<td>四卡全互联走 P2P</td>
</tr>
<tr>
<td><code>VLLM_ENGINE_READY_TIMEOUT_S=3600</code></td>
<td>冷启动约 10 分钟，超时放宽</td>
</tr>
</tbody>
</table>
<hr />
<h2>7. 验证清单</h2>
<h3>7.1 就绪判据</h3>
<pre><code class="language-bash"># 1) 容器在跑
docker ps --format '{{.Names}}\t{{.Status}}' | grep dsv41-tep4

# 2) 健康检查（注意：必须带 Key）
curl -s -o /dev/null -w '%{http_code}\n' \
  -H 'Authorization: Bearer 3124' http://127.0.0.1:8000/health      # 200

# 3) 模型信息
curl -s -H 'Authorization: Bearer 3124' http://127.0.0.1:8000/v1/models
#   {"data":[{"id":"DeepSeek-V4.1-Flash","max_model_len":1048576,...}]}

# 4) 真实参数（读容器内进程 cmdline，是唯一真值）
docker exec dsv41-tep4 sh -c "ps -eo args | grep 'vllm serve' | grep -v grep" \
  | tr ' ' '\n' | grep -E 'max-num-seqs|max-model-len|kv-cache-memory|api-key'
</code></pre>
<h3>7.2 KV 池与运行指标</h3>
<pre><code class="language-bash">curl -s http://127.0.0.1:8000/metrics | grep -E \
  'kv_cache_size_tokens|num_gpu_blocks|num_requests_running|num_preemptions_total'
</code></pre>
<p dir="auto">预期：<code>kv_cache_size_tokens</code> ≈ <strong>2,014,502</strong>（KV 2.2 GB 时）。</p>
<h3>7.3 冒烟推理</h3>
<pre><code class="language-bash">curl -s http://127.0.0.1:8000/v1/chat/completions \
  -H 'Authorization: Bearer 3124' -H 'Content-Type: application/json' \
  -d '{"model":"DeepSeek-V4.1-Flash","messages":[{"role":"user","content":"用一句话说明你是什么模型"}],"max_tokens":64}' \
  | python3 -c 'import sys,json;print(json.load(sys.stdin)["choices"][0]["message"]["content"])'
</code></pre>
<h3>7.4 客户端接入（OpenAI SDK）</h3>
<p dir="auto">服务对 OpenAI 协议兼容，直接把 <code>base_url</code> 指过来即可：</p>
<pre><code class="language-python">from openai import OpenAI

client = OpenAI(base_url="http://192.168.1.127:8000/v1", api_key="3124")

resp = client.chat.completions.create(
    model="DeepSeek-V4.1-Flash",
    messages=[{"role": "user", "content": "介绍一下你自己"}],
    max_tokens=512,
    stream=True,
)
for chunk in resp:
    d = chunk.choices[0].delta
    if getattr(d, "content", None):
        print(d.content, end="", flush=True)
</code></pre>
<p dir="auto">注意三点：</p>
<ul>
<li><code>model</code> 必须是 <code>DeepSeek-V4.1-Flash</code>（等于 <code>--served-model-name</code>）；</li>
<li><code>max_tokens</code> 与 prompt 之和不得超过 <code>--max-model-len</code>；</li>
<li>该服务支持 tool calling 与结构化输出，<code>tool-call-parser=deepseek_v41</code>。</li>
</ul>
<h3>7.5 性能基准（仓库自带 <code>bench.mjs</code>）</h3>
<pre><code class="language-bash">export VLLM_API_KEY=3124 VLLM_BASE_URL=http://127.0.0.1:8000
node /media/ll/data/tep4/bench.mjs --mode counting --concurrency 1,2,4,6 --max-tokens 500
node /media/ll/data/tep4/bench.mjs --mode code     --concurrency 1,4,6   --max-tokens 500
node /media/ll/data/tep4/bench.mjs --mode prose    --concurrency 1,4,6   --max-tokens 500
node /media/ll/data/tep4/bench.mjs --mode prefill  --input-tokens 32768 --concurrency 1
</code></pre>
<p dir="auto">字段口径：<br />
<code>per_request_tok_s</code> = 单路 decode 速度；<code>full_batch_tok_s</code> = 整批聚合速度；<br />
<code>output_tok_s</code> = 含首 token 的端到端速度；<code>accepted_tokens_per_step</code> = DSpark 每步接受数。</p>
<hr />
<h2>8. 性能基线 <code>[实测]</code></h2>
<p dir="auto">环境：4×CMP 170HX，Gen3×16，<code>bench.mjs</code>，输出 500 token，无前缀缓存命中。</p>
<h3>8.1 180 W 定档（当前生产配置）</h3>
<p dir="auto"><strong>测试时引擎空闲（<code>num_requests_running = 0</code>）</strong>。</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>负载</th>
<th>并发</th>
<th>单路 tok/s</th>
<th>整批 tok/s</th>
<th>TTFT</th>
</tr>
</thead>
<tbody>
<tr>
<td>counting</td>
<td>1</td>
<td>531.5</td>
<td>531.5</td>
<td>0.19 s</td>
</tr>
<tr>
<td>counting</td>
<td>4</td>
<td>336.2</td>
<td><strong>1,388</strong></td>
<td>0.35 s</td>
</tr>
<tr>
<td>counting</td>
<td>6</td>
<td>274.4</td>
<td><strong>1,670</strong></td>
<td>0.43 s</td>
</tr>
<tr>
<td>6×1000 token 持续输出</td>
<td>6</td>
<td>273.1</td>
<td>1,670</td>
<td>0.66 s</td>
</tr>
<tr>
<td>6×32K prefill</td>
<td>6</td>
<td>—</td>
<td><strong>6,632</strong>（prefill 速率）</td>
<td>16.1 s</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ <strong>测速必须独占引擎</strong>。同一台机器上若有其它客户端（包括正在对话的<br />
AI 会话本身）在发请求，并发测试会被抢占污染：本机实测污染时<br />
c2 可从 916 tok/s 掉到 11.7 tok/s。测前先确认<br />
<code>curl /metrics | grep num_requests_running</code> 为 0。</p>
</blockquote>
<h3>8.2 250 W 参照（对比用，非当前配置）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>负载</th>
<th>c1</th>
<th>c2</th>
<th>c4</th>
<th>c6</th>
<th>c8</th>
<th>c16</th>
<th>c32</th>
</tr>
</thead>
<tbody>
<tr>
<td>counting</td>
<td>546.3</td>
<td>916.2</td>
<td>1,487.6</td>
<td>—</td>
<td>2,084.4</td>
<td>2,259.7</td>
<td>2,741.1</td>
</tr>
<tr>
<td>code</td>
<td>493.6</td>
<td>779.7</td>
<td>1,169.5</td>
<td>—</td>
<td>1,781.1</td>
<td>2,004.8</td>
<td>2,457.7</td>
</tr>
<tr>
<td>prose</td>
<td>211.6</td>
<td>358.4</td>
<td>541.4</td>
<td>—</td>
<td>804.7</td>
<td>1,056.8</td>
<td>1,240.1</td>
</tr>
</tbody>
</table>
<h3>8.3 预填充（单路，250 W）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>输入</th>
<th>prefill tok/s</th>
<th>TTFT</th>
</tr>
</thead>
<tbody>
<tr>
<td>8 K</td>
<td>2,634</td>
<td>2.56 s</td>
</tr>
<tr>
<td>32 K</td>
<td>7,298</td>
<td>3.68 s</td>
</tr>
<tr>
<td>64 K</td>
<td>7,795</td>
<td>6.89 s</td>
</tr>
<tr>
<td>128 K</td>
<td>7,850</td>
<td>13.67 s</td>
</tr>
</tbody>
</table>
<h3>8.4 与上游项目 README 的对齐度</h3>
<p dir="auto">以对方 250 W 参考值为 100%：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>场景</th>
<th>本机</th>
<th>占参考</th>
</tr>
</thead>
<tbody>
<tr>
<td>counting c1</td>
<td>546.3</td>
<td>96.2%</td>
</tr>
<tr>
<td>counting c4</td>
<td>1,487.6</td>
<td>100.5%</td>
</tr>
<tr>
<td>counting c8</td>
<td>2,084.4</td>
<td>99.5%</td>
</tr>
<tr>
<td>counting c16</td>
<td>2,259.7</td>
<td>85.2%</td>
</tr>
<tr>
<td>code c1</td>
<td>493.6</td>
<td>100.4%</td>
</tr>
<tr>
<td>prose c1</td>
<td>211.6</td>
<td>99.8%</td>
</tr>
<tr>
<td>prefill 64K</td>
<td>7,795</td>
<td>78.6%</td>
</tr>
</tbody>
</table>
<p dir="auto">结论：单路与 4 路吞吐与参考基本持平，<strong>瓶颈在 decode 阶段</strong>；<br />
高并发（c16/c32）偏低属调度与图捕获档位差异，非硬件问题。</p>
<hr />
<h2>9. 已知坑与规避（<strong>复现时必须逐条核对</strong>）</h2>
<p dir="auto">按踩坑频率排序。每一条都是本机真实发生过的故障。</p>
<h3>9.1 JSON 参数被 shell 撑开 → <code>Invalid JSON</code></h3>
<p dir="auto"><strong>症状</strong></p>
<pre><code>vllm serve: error: argument --engram-config: 1 validation error for EngramConfig
  Invalid JSON: key must be a string at line 1 column 2
  [type=json_invalid, input_value='{cpu_offload:true}', input_type=str]
</code></pre>
<p dir="auto"><strong>根因</strong>：bash 对未加引号的 <code>{...}</code> 做花括号展开，双引号被吃掉。</p>
<p dir="auto"><strong>修法</strong>：所有 JSON 类参数<strong>加单引号</strong>：</p>
<pre><code class="language-bash">'--engram-config={"cpu_offload":true}'
'--structured-outputs-config={"backend":"auto","disable_any_whitespace":false}'
</code></pre>
<p dir="auto">用 <code>DRY_RUN=1</code> 干跑检查时，正确形态是 <code>{\"cpu_offload\":true}</code>（保留转义）。</p>
<h3>9.2 <code>VLLM_PLUGINS=</code> 置空 → 插件全灭</h3>
<p dir="auto"><strong>症状</strong>：<code>AttributeError: 'GraphMemWorker' object has no attribute 'use_v2_model_runner'</code><br />
（镜像自带的 <code>vllm_sm80</code> entry-point 插件与本栈不兼容）</p>
<p dir="auto"><strong>修法</strong>：显式点名，不要留空：</p>
<pre><code class="language-bash">-e VLLM_PLUGINS=dsh_vllm_logger
</code></pre>
<p dir="auto">空串会被解析成 <code>[""]</code>（只允许名字为空的插件），结果<strong>所有</strong>插件都不装载。</p>
<h3>9.3 CUDA Graph 尺寸的两个坑（最隐蔽）</h3>
<p dir="auto"><strong>坑 A：与旧参数互斥</strong></p>
<pre><code>Value error, The deprecated cudagraph_capture_sizes and max_cudagraph_capture_size
cannot be combined with the prefill and decode CUDA graph capture sizes;
set only the latter.
</code></pre>
<p dir="auto">→ <code>max_cudagraph_capture_size</code> 与 <code>decode_cudagraph_capture_request_sizes</code><br />
<strong>不能同时出现</strong>，只能用后者。</p>
<p dir="auto"><strong>坑 B：默认尺寸缺档，高并发掉进 eager</strong></p>
<p dir="auto"><code>--max-num-seqs=6</code> 时，vLLM 默认把 decode 图捕获为 <code>[1, 2, 4]</code>，日志会提示：</p>
<pre><code>Dropping [8, 16, 32] from decode_cudagraph_capture_request_sizes: outside [1, 6].
</code></pre>
<p dir="auto">第 5、6 路拿不到图，退化为 eager 执行，<strong>单步从 16 ms 掉到 179 ms</strong>，<br />
整批吞吐从 1771 tok/s 暴跌到 200 tok/s（约 1/9）。</p>
<p dir="auto"><strong>修法</strong>：按并发数显式生成完整档位（<code>run-tep4.sh</code> 已内置）：</p>
<pre><code class="language-bash">'--compilation-config={"cudagraph_mode":"FULL_DECODE_ONLY",
 "decode_cudagraph_capture_request_sizes":[1,2,3,4,5,6]}'
</code></pre>
<p dir="auto"><strong>验证</strong>：改前/后分别跑 <code>--concurrency 5</code> 与 <code>6</code>，吞吐应相差在 15% 以内。</p>
<h3>9.4 KV 池开太大 → 多并发 OOM（本机真实崩溃）</h3>
<p dir="auto"><strong>症状</strong></p>
<pre><code>torch.OutOfMemoryError: CUDA out of memory.
Tried to allocate 150.00 MiB. GPU 0 has a total capacity of 79.30 GiB
of which 114.06 MiB is free. This process has 79.08 GiB memory in use.
...
vllm.v1.engine.exceptions.EngineDeadError
</code></pre>
<p dir="auto">随后四卡报 <code>Xid 31 / MMU Fault</code>（<strong>这是 OOM 的连带，不是根因</strong>），容器退出。</p>
<p dir="auto"><strong>根因</strong>：KV 被设成 4.2 GB/卡（池 3,845,995 tokens）。<br />
权重+图/激活约 74.9 GB，加 KV 4.2 GB 后单卡占用 <strong>79.08 GiB</strong>，<br />
只剩 114 MiB 余量，多并发时一次 150 MiB 临时分配即失败。</p>
<p dir="auto"><strong>修法</strong>：</p>
<pre><code class="language-bash"># 改回 2.2 GB 后重启
curl -s -X POST http://127.0.0.1:8002/api/tep4 \
  -H 'Content-Type: application/json' -H 'X-Admin-Key: 3124' \
  -d '{"action":"save","values":{"KV_CACHE_GB":2.2}}'
bash /media/ll/data/tep4/run-tep4.sh
</code></pre>
<p dir="auto"><strong>红线</strong>：<code>KV_CACHE_GB ≤ 2.2</code>。若要更大 KV，必须同时降<br />
<code>MAX_MODEL_LEN</code>（如 512K）或降并发。</p>
<h3>9.5 开机功耗被打回 250 W</h3>
<p dir="auto"><strong>症状</strong>：手动设了 180 W，重启后 <code>nvidia-smi</code> 显示 250 W。<br />
<code>journalctl -u gpu-power-limit.service</code> 却显示"已设置功耗上限 180W"。</p>
<p dir="auto"><strong>根因</strong>：开机时该服务在 09:31:10 就执行，而 GPU 直到 09:32:07 才初始化完，<br />
<strong>后初始化的卡会重置回默认 250 W</strong>。</p>
<p dir="auto"><strong>修法</strong>：加开机顺序修正（§3.2 的 <code>pl-boot-order.conf</code>），<br />
等四卡全部出现后再设。</p>
<h3>9.6 开机少一张卡（GSP Booter 0x31）</h3>
<p dir="auto"><strong>症状</strong>：<code>nvidia-smi -L</code> 只有 3 张卡，启动时报</p>
<pre><code>Value error, World size (4) is larger than the number of available GPUs (3)
</code></pre>
<p dir="auto">dmesg 中可见：</p>
<pre><code>NVRM: GPU0 s_executeBooterUcode_TU102: Booter failed with non-zero error code: 0x31
</code></pre>
<p dir="auto"><strong>修法（不必断电）</strong>：PCI 移除 + 重新枚举</p>
<pre><code class="language-bash"># 找到缺的卡（无 driver 绑定或 NVML 缺失的那个 BDF）
for b in 07 0a 0e 0f; do printf '%s: ' $b; \
  readlink -f /sys/bus/pci/devices/0000:$b:00.0/driver 2&gt;/dev/null | xargs -r basename || echo MISSING; done

# 用仓库脚本恢复（会等待 4 卡全部回来）
bash /media/ll/data/tep4/recover-gpu.sh 0000:0e:00.0
</code></pre>
<p dir="auto">若两次 PCI rescan 仍不回来，才需要<strong>完全断电冷启动</strong>（warm reboot 无效）。</p>
<h3>9.7 旧容器抢占显卡</h3>
<p dir="auto">recipe 栈的 <code>dsv41-flash</code> 容器常带 <code>restart=unless-stopped</code>，<br />
开机会自动拉起并占满四卡，导致 TEP4 报 GPU 数不足。</p>
<pre><code class="language-bash">docker update --restart no dsv41-flash
docker rm -f dsv41-flash
</code></pre>
<h3>9.8 MCE 硬件报错导致整机重启</h3>
<p dir="auto"><strong>症状</strong>：<code>dmesg</code> 出现多条 <code>mce: [Hardware Error]: Machine check events logged</code>，<br />
随后整机失联重启（本机 11-25 09:29 发生过）。</p>
<p dir="auto"><strong>排查</strong></p>
<pre><code class="language-bash">sudo ras-mc-ctl --summary     # 内存是否报错
sudo ras-mc-ctl --errors | head -30
</code></pre>
<p dir="auto">本机实测：<code>No Memory errors</code>，但 PCIe AER 大量集中在 <code>0000:00:03.0</code><br />
（<code>Completion Timeout</code> / <code>Receiver Error</code>）。</p>
<p dir="auto"><strong>建议</strong>：检查四卡转接线/延长线是否松动、插槽供电、电源余量；<br />
PCIe 链路异常会以 MCE 形式拖垮整机。</p>
<h3>9.9 其它环境陷阱</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>现象</th>
<th>原因</th>
<th>处理</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>docker: unknown flag --gpus</code></td>
<td>未装 nvidia-container-toolkit</td>
<td>装 toolkit 后重启 docker</td>
</tr>
<tr>
<td>容器内读不到模型</td>
<td>挂载路径写错</td>
<td><code>-v /media/ll/data/dsv41-models:/models:ro</code></td>
</tr>
<tr>
<td>客户端 401</td>
<td>未带 Key</td>
<td><code>/v1/models</code>、<code>/health</code> 也需要 <code>Authorization: Bearer 3124</code></td>
</tr>
<tr>
<td>客户端 404 model not found</td>
<td><code>model</code> 字段与 <code>--served-model-name</code> 不一致</td>
<td>用 <code>DeepSeek-V4.1-Flash</code></td>
</tr>
<tr>
<td>冷启动超时</td>
<td>默认超时太短</td>
<td><code>VLLM_ENGINE_READY_TIMEOUT_S=3600</code></td>
</tr>
</tbody>
</table>
<hr />
<h2>10. 日常运维</h2>
<h3>10.1 脚本清单</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>脚本</th>
<th>用途</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>run-tep4.sh</code></td>
<td>启动（支持 <code>DRY_RUN=1</code> 干跑）</td>
</tr>
<tr>
<td><code>status.sh</code></td>
<td>一键状态（容器/健康/GPU/内存/日志尾）</td>
</tr>
<tr>
<td><code>swap.sh</code></td>
<td>从旧栈切到 TEP4（含健康等待、失败自动回滚、基准冒烟）</td>
</tr>
<tr>
<td><code>rollback.sh</code></td>
<td>回滚到旧 recipe 栈</td>
</tr>
<tr>
<td><code>recover-gpu.sh</code></td>
<td>掉卡恢复（PCI remove + rescan）</td>
</tr>
<tr>
<td><code>bench.mjs</code></td>
<td>基准测试（counting / code / prose / prefill）</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">脚本内 <code>rollback.sh</code> 的 recipe 路径 <code>/home/ll/dsv41-flash-cmp170hx-recipe</code><br />
是本机既有部署的路径，移植到新机器时按实际位置改；<br />
若新机器没有旧栈，<code>rollback.sh</code> 不需要也不应执行。</p>
</blockquote>
<h3>10.2 停止与重启</h3>
<pre><code class="language-bash"># 停止
docker stop -t 120 dsv41-tep4

# 重启（等价于停止 + 启动，冷启约 10 分钟）
docker rm -f dsv41-tep4 &amp;&amp; bash /media/ll/data/tep4/run-tep4.sh
</code></pre>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ 若引擎同时是你的对话后端，重启会<strong>中断正在进行的会话</strong>。<br />
建议先把验证脚本挂到后台跑，再重启。</p>
</blockquote>
<h3>10.3 回滚到旧 EXL3 栈</h3>
<pre><code class="language-bash">bash /media/ll/data/tep4/rollback.sh
# 行为：删 TEP4 容器 → 若 dsv41-flash 容器存在则 start，否则 ./start.sh start 重建
</code></pre>
<h3>10.4 开机自启（可选）</h3>
<p dir="auto">当前 <code>dsv41-tep4</code> 为 <code>restart=no</code>，开机会<strong>不会</strong>自动拉起。<br />
需要自启时建议写成"等条件满足再起"的服务，而不是简单 <code>--restart</code>：</p>
<pre><code class="language-ini"># /etc/systemd/system/dsv41-tep4.service
[Unit]
Description=DeepSeek-V4.1-Flash TEP4 engine
After=docker.service network-online.target gpu-power-limit.service cmp-gpu-rescue.service
Wants=network-online.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/sh -c 'for i in $(seq 1 60); do [ "$(nvidia-smi -L 2&gt;/dev/null | wc -l)" -ge 4 ] &amp;&amp; exit 0; sleep 5; done; exit 1'
ExecStart=/bin/bash /media/ll/data/tep4/run-tep4.sh
ExecStop=/usr/bin/docker stop -t 120 dsv41-tep4
TimeoutStartSec=120

[Install]
WantedBy=multi-user.target
</code></pre>
<h3>10.5 日志与现场保留</h3>
<pre><code class="language-bash"># 引擎日志
docker logs --tail 200 dsv41-tep4
# 崩溃现场（示例）
docker logs dsv41-tep4 &gt; /media/ll/data/tep4/crash-$(date +%Y%m%d-%H%M).log 2&gt;&amp;1
</code></pre>
<hr />
<h2>11. 附录</h2>
<h3>11.1 文件清单（目标机）</h3>
<pre><code class="language-text">/media/ll/data/tep4/
├── params.json              # 运行参数（唯一可改）
├── run-tep4.sh              # 启动脚本
├── swap.sh / rollback.sh / status.sh / recover-gpu.sh
├── bench.mjs                # 基准测试
├── cache/                   # 容器 /root/.cache 挂载点（编译缓存，建议保留）
├── repo/                    # 上游仓库（native 源码 + 补丁）
├── vllm-src/                # 覆盖用的 vllm Python 源码
└── *.log / *.jsonl          # 部署与基准现场
</code></pre>
<h3>11.2 版本指纹（核对用）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>组件</th>
<th>版本 / 哈希</th>
</tr>
</thead>
<tbody>
<tr>
<td>引擎</td>
<td><code>0.32.1rc1.dev515+ge05403fdc</code></td>
</tr>
<tr>
<td>torch</td>
<td><code>2.14.0+cu130</code>（CUDA UMD 13.4）</td>
</tr>
<tr>
<td>基础镜像</td>
<td><code>dsv41-flash:1.0.2</code> = <code>sha256:e207e32be0be…</code></td>
</tr>
<tr>
<td>TEP4 镜像</td>
<td><code>sha256:fefdcd01aee7b6e5c17e2c92bf0b0e9338ff3e448db1b39a0fe324e542da6755</code></td>
</tr>
<tr>
<td>上游 vLLM</td>
<td><code>0e3c8dbdae9d55149b0fba4e6c1014b4b08c9c73</code></td>
</tr>
<tr>
<td>优化分支</td>
<td><code>canoziia/vllm-cmp170hx</code> @ <code>5470fe0735fa7719fb92819b4c9b4d136e331794</code></td>
</tr>
<tr>
<td>驱动</td>
<td><code>615.71.09</code></td>
</tr>
<tr>
<td>模型</td>
<td><code>DeepSeek-V4.1-Flash-1017</code>（476 GiB，48 shards）</td>
</tr>
</tbody>
</table>
<h3>11.3 最小复现核对表</h3>
<p dir="auto">复现完成后逐项打勾：</p>
<ul>
<li><div class="plugin-markdown"><input type="checkbox" /></div><code>nvidia-smi -L</code> 显示 4 张 CMP 170HX，各 81,920 MiB</li>
<li><div class="plugin-markdown"><input type="checkbox" />四卡 </div><code>power.limit = 180 W</code>，且 <code>systemctl is-enabled gpu-power-limit</code> = enabled</li>
<li><div class="plugin-markdown"><input type="checkbox" />镜像 </div><code>sha256</code> 与 §11.2 一致，或 6 个 <code>.so</code> 齐全</li>
<li><div class="plugin-markdown"><input type="checkbox" /></div><code>params.json</code> 中 <code>KV_CACHE_GB ≤ 2.2</code></li>
<li><div class="plugin-markdown"><input type="checkbox" /></div><code>/health</code> 返回 200（带 Key）</li>
<li><div class="plugin-markdown"><input type="checkbox" /></div><code>/v1/models</code> 返回 <code>DeepSeek-V4.1-Flash</code>，<code>max_model_len = 1048576</code></li>
<li><div class="plugin-markdown"><input type="checkbox" /></div><code>kv_cache_size_tokens</code> ≈ 2,014,502</li>
<li><div class="plugin-markdown"><input type="checkbox" />容器内 cmdline 含 </div><code>--max-num-seqs=6</code> 与 <code>decode_cudagraph_capture_request_sizes:[1,2,3,4,5,6]</code></li>
<li><div class="plugin-markdown"><input type="checkbox" />counting c1 ≥ 500 tok/s，c6 ≥ 1,500 tok/s</div></li>
<li><div class="plugin-markdown"><input type="checkbox" />prefill 32K ≥ 6,000 tok/s</div></li>
</ul>
<h3>11.4 相关文档</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>文档</th>
<th>内容</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>docs/TEP4-deploy-20261124.md</code></td>
<td>本次部署全过程记录（含构建日志）</td>
</tr>
<tr>
<td><code>docs/TEP4-验收报告-20261124.md</code></td>
<td>验收项与结论</td>
</tr>
<tr>
<td><code>docs/TEP4-250W-对照与可移植性评估-20261124.md</code></td>
<td>与上游项目的逐项对照</td>
</tr>
<tr>
<td><code>docs/DEPLOY-127-20260919.md</code></td>
<td>GPU 解锁与驱动层</td>
</tr>
<tr>
<td><code>docs/PITFALLS.md</code></td>
<td>本项目累计踩坑库</td>
</tr>
</tbody>
</table>
<hr />
<p dir="auto"><em>文档基线：2026-11-25 10:00，引擎 <code>dsv41-tep4</code> 运行中（6 并发 / 1M / KV 2.2 GB / 180 W）。</em></p>
]]></description><link>https://lcz.me/topic/3333</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 03:22:24 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/3333.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Nov 2026 11:34:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Fri, 27 Nov 2026 02:29:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chia-an-yang" aria-label="Profile: CHIA-AN-YANG">@<bdi>CHIA-AN-YANG</bdi></a> 3w多了，解锁80g的淘一淘3.4左右就能买个不错品相的，和4090 48g差不多价格</p>
]]></description><link>https://lcz.me/post/36134</link><guid isPermaLink="true">https://lcz.me/post/36134</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Fri, 27 Nov 2026 02:29:51 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Fri, 27 Nov 2026 01:38:40 GMT]]></title><description><![CDATA[<p dir="auto">強者!推一個，好奇現在一張卡多少了</p>
]]></description><link>https://lcz.me/post/36127</link><guid isPermaLink="true">https://lcz.me/post/36127</guid><dc:creator><![CDATA[CHIA AN YANG]]></dc:creator><pubDate>Fri, 27 Nov 2026 01:38:40 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 23:18:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%E6%9D%A8tom" aria-label="Profile: 杨tom">@<bdi>杨tom</bdi></a> 单卡180w</p>
]]></description><link>https://lcz.me/post/36119</link><guid isPermaLink="true">https://lcz.me/post/36119</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Thu, 26 Nov 2026 23:18:17 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 20:42:03 GMT]]></title><description><![CDATA[<p dir="auto">楼主你好,请问电费多少钱.路人好奇</p>
]]></description><link>https://lcz.me/post/36115</link><guid isPermaLink="true">https://lcz.me/post/36115</guid><dc:creator><![CDATA[杨tom]]></dc:creator><pubDate>Thu, 26 Nov 2026 20:42:03 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 14:13:50 GMT]]></title><description><![CDATA[<p dir="auto">两张卡就能拉起来，关键弄那么大个llm没用啊，不骗你，他真的不是用来推车的，他真给你真改啊，只要程序致密点，你让他推一圈，就全是窟窿，随机性拆门控，而且不光他，hy4也一样，我用的还是全量的，这事锤哥不让说，所以当我没说哈哈哈@顾新兵</p>
]]></description><link>https://lcz.me/post/36093</link><guid isPermaLink="true">https://lcz.me/post/36093</guid><dc:creator><![CDATA[范志刚]]></dc:creator><pubDate>Thu, 26 Nov 2026 14:13:50 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 14:07:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%E8%8C%83%E5%BF%97%E5%88%9A" aria-label="Profile: 范志刚">@<bdi>范志刚</bdi></a> 再加一张卡，4卡部署满血，直接毕业</p>
]]></description><link>https://lcz.me/post/36092</link><guid isPermaLink="true">https://lcz.me/post/36092</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Thu, 26 Nov 2026 14:07:33 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 14:06:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a> nvlik也解锁了，跑完600g</p>
]]></description><link>https://lcz.me/post/36091</link><guid isPermaLink="true">https://lcz.me/post/36091</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Thu, 26 Nov 2026 14:06:32 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 14:04:32 GMT]]></title><description><![CDATA[<p dir="auto">Nvlik解锁跑满300g带宽！<br />
<img src="https://upload.lcz.me/uploads/51471cbf-f0d1-4d0c-858e-c306a8263652.png" alt="mmexport1795701586308.png" class="img-markdown  img-fluid" /><br />
<img src="https://upload.lcz.me/uploads/88bef915-fab1-4887-8b53-cbe0ebbaa778.png" alt="mmexport1795701574587.png" class="img-markdown  img-fluid" /><br />
<img src="https://upload.lcz.me/uploads/6debabf3-72b0-480c-a2f0-49057b858958.jpg" alt="mmexport1795701510724.jpg" class="img-markdown  img-fluid" /><br />
<img src="https://upload.lcz.me/uploads/bde7072e-5ded-4d8e-915f-509b5cd3e99e.png" alt="mmexport1795701503655.png" class="img-markdown  img-fluid" /></p>
]]></description><link>https://lcz.me/post/36090</link><guid isPermaLink="true">https://lcz.me/post/36090</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Thu, 26 Nov 2026 14:04:32 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 11:50:59 GMT]]></title><description><![CDATA[<p dir="auto">我卡不够内存也不够，太奢侈了,佩服佩服@顾新兵 <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a></p>
]]></description><link>https://lcz.me/post/36076</link><guid isPermaLink="true">https://lcz.me/post/36076</guid><dc:creator><![CDATA[范志刚]]></dc:creator><pubDate>Thu, 26 Nov 2026 11:50:59 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 09:49:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ralfzhu" aria-label="Profile: ralfzhu">@<bdi>ralfzhu</bdi></a> 是的，目前又优化了，整体又提升了20%</p>
]]></description><link>https://lcz.me/post/36060</link><guid isPermaLink="true">https://lcz.me/post/36060</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Thu, 26 Nov 2026 09:49:53 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 09:02:27 GMT]]></title><description><![CDATA[<p dir="auto">这是不是接着就可以卖token或者卖整套设备赚钱了哦？</p>
]]></description><link>https://lcz.me/post/36056</link><guid isPermaLink="true">https://lcz.me/post/36056</guid><dc:creator><![CDATA[ralfzhu]]></dc:creator><pubDate>Thu, 26 Nov 2026 09:02:27 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 08:27:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%E8%8C%83%E5%BF%97%E5%88%9A" aria-label="Profile: 范志刚">@<bdi>范志刚</bdi></a> 我弟验证下呢</p>
]]></description><link>https://lcz.me/post/36052</link><guid isPermaLink="true">https://lcz.me/post/36052</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Thu, 26 Nov 2026 08:27:14 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 07:36:04 GMT]]></title><description><![CDATA[<p dir="auto">感谢，视频有着落了</p>
]]></description><link>https://lcz.me/post/36047</link><guid isPermaLink="true">https://lcz.me/post/36047</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Thu, 26 Nov 2026 07:36:04 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 07:35:21 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2b50.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--star" style="height:1.4em;width:auto;vertical-align:middle" title="⭐" alt="⭐" /> 本帖由<strong>优秀</strong>升级为<strong>精华</strong>（两者互斥，只补差价），作者 <strong>+3 积分</strong>，累计 6 分。</p>
<blockquote>
<p dir="auto">补差凭证：优秀升精华 +3 分 · 编号 ef3333-4761-1</p>
</blockquote>
]]></description><link>https://lcz.me/post/36046</link><guid isPermaLink="true">https://lcz.me/post/36046</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Thu, 26 Nov 2026 07:35:21 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 05:09:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a> 发了你看下两个图一个视频</p>
]]></description><link>https://lcz.me/post/36031</link><guid isPermaLink="true">https://lcz.me/post/36031</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Thu, 26 Nov 2026 05:09:07 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 05:08:47 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://upload.lcz.me/uploads/1fdfe052-7bf0-4854-ba9b-a5f8ffef8c4a.mp4" rel="nofollow ugc">43f943b3c2bc9cf879617714f5643b17.mp4</a></p>
]]></description><link>https://lcz.me/post/36030</link><guid isPermaLink="true">https://lcz.me/post/36030</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Thu, 26 Nov 2026 05:08:47 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Thu, 26 Nov 2026 05:06:57 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/e3c2f7d5-6696-45df-90c3-3f7275ce4024.jpg" alt="1.jpg" class="img-markdown  img-fluid" /><br />
<img src="https://upload.lcz.me/uploads/f0279549-6ab2-496c-93cb-18e24eac3d01.jpg" alt="2.jpg" class="img-markdown  img-fluid" /></p>
]]></description><link>https://lcz.me/post/36029</link><guid isPermaLink="true">https://lcz.me/post/36029</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Thu, 26 Nov 2026 05:06:57 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Wed, 25 Nov 2026 14:18:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%E9%A1%BE%E6%96%B0%E5%85%B5" aria-label="Profile: 顾新兵">@<bdi>顾新兵</bdi></a> 不错，继续更新，我找时间云一个视频，数据很重要！<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f64f.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--pray" style="height:1.4em;width:auto;vertical-align:middle" title="🙏" alt="🙏" /><br />
有空附下显卡实拍，我做视频就不用找图片了。</p>
]]></description><link>https://lcz.me/post/35963</link><guid isPermaLink="true">https://lcz.me/post/35963</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 25 Nov 2026 14:18:26 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Wed, 25 Nov 2026 13:20:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a> 现在已经变成a100pro了。nvlik也支持了不过需要补件。</p>
]]></description><link>https://lcz.me/post/35952</link><guid isPermaLink="true">https://lcz.me/post/35952</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Wed, 25 Nov 2026 13:20:21 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Wed, 25 Nov 2026 13:08:38 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 版主审定：本帖设为<strong>优秀</strong>，作者 <strong>+3 积分</strong>奖励，继续加油！</p>
<blockquote>
<p dir="auto">奖励凭证：优秀 +3 分 · 编号 e3333-4761-1</p>
</blockquote>
]]></description><link>https://lcz.me/post/35944</link><guid isPermaLink="true">https://lcz.me/post/35944</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Wed, 25 Nov 2026 13:08:38 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Wed, 25 Nov 2026 13:08:07 GMT]]></title><description><![CDATA[<p dir="auto">有大雕们验证下吗，这个数据还是很牛的。170HX的PCIE带宽能扛得住吗？</p>
]]></description><link>https://lcz.me/post/35943</link><guid isPermaLink="true">https://lcz.me/post/35943</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 25 Nov 2026 13:08:07 GMT</pubDate></item><item><title><![CDATA[Reply to 老黄留下的bug导致史上最具性价比的方案来了只要14w，DeepSeek-V4.1-Flash 四卡 CMP 170HX 满血部署250+token/s on Wed, 25 Nov 2026 11:38:44 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/canoziia/vllm-cmp170hx/tree/main/models/deepseek-v4.1-flash#250w-power-limit-155--69--69--341-mib-free-hbm-post-stress-6165-c" rel="nofollow ugc">https://github.com/canoziia/vllm-cmp170hx/tree/main/models/deepseek-v4.1-flash#250w-power-limit-155--69--69--341-mib-free-hbm-post-stress-6165-c</a> 这是仓库，有170hx显卡的朋友可以复现</p>
]]></description><link>https://lcz.me/post/35924</link><guid isPermaLink="true">https://lcz.me/post/35924</guid><dc:creator><![CDATA[顾新兵]]></dc:creator><pubDate>Wed, 25 Nov 2026 11:38:44 GMT</pubDate></item></channel></rss>