<?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[从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型]]></title><description><![CDATA[<p dir="auto">27B 不能联网 搜索的问题。很多人提问。提供一个解决方案吧。在不借用 hermes的情况下如何实现。安装后测试完全可用。建议 32G显存。24G可用但是不能太复杂。<br />
全程使用 kimi k3 1M max 配置<br />
实施时长：1小时。主要原因是网速。网速慢的时候得1.5小时</p>
<h1>Qwen3.6-27B 本地部署方案与测试报告</h1>
<hr />
<h2>一、环境</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th>配置</th>
</tr>
</thead>
<tbody>
<tr>
<td>CPU / 内存</td>
<td>i7-4790K（4C/8T）/ 32 GiB DDR3</td>
</tr>
<tr>
<td>GPU</td>
<td>RX 7900 XTX 24 GiB（gfx1100），驱动 amdgpu 6.16.13，ROCm 7.2.0</td>
</tr>
<tr>
<td>系统</td>
<td>Ubuntu 24.04，kernel 6.14，磁盘余量 637G</td>
</tr>
<tr>
<td>网络</td>
<td>局域网固定 IP 192.168.8.247（路由器锁定）</td>
</tr>
</tbody>
</table>
<hr />
<h2>二、总体架构</h2>
<pre><code>浏览器 → Open WebUI (:8080, venv) → dflash_server (:8000, C++/HIP) 
→ 7900 XTX
                                            │
Q4_K_M 主模型 16G + Q8_0 DFlash 草稿 1.8G（DDTree 树验证）
</code></pre>
<ul>
<li><strong>推理引擎</strong>：Lucebox DFlash（lucebox-hub 源码编译），块扩散草稿 + DDTree 树验证投机解码</li>
<li><strong>隔离原则</strong>：venv 只隔离 Python 工具链（下载/前端）；模型即 GGUF 文件，多模型切换零隔离成本；未用 Docker</li>
<li><strong>启动命令</strong>：<code>dflash</code>（模型 API）、<code>dflash-ui</code>（网页前端），GPU 高性能模式随服务启停自动切换（解决空载风扇噪音）</li>
</ul>
<hr />
<h2>三、安装步骤（可复现）</h2>
<pre><code class="language-bash"># 1. 依赖
apt-get install -y git cmake build-essential hipblas-dev hipcub-dev \
  rocblas-dev rocprim-dev rocwmma-dev python3-venv

# 2. 源码
git clone --recurse-submodules https://github.com/Luce-Org/lucebox-hub
cd lucebox-hub/server

# 3. 编译（gfx1100，含 rocWMMA Phase2 prefill kernel）
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DDFLASH27B_GPU_BACKEND=hip \
  -DDFLASH27B_HIP_ARCHITECTURES=gfx1100 -DDFLASH27B_HIP_SM80_EQUIV=ON
cmake --build build --target test_dflash dflash_server test_flashprefill_kernels -j4
./build/test_flashprefill_kernels   # 数值验证

# 4. Python 工具（venv）
python3 -m venv ~/venvs/dflash &amp;&amp; ~/venvs/dflash/bin/pip install huggingface_hub transformers open-webui

# 5. 模型
hf download unsloth/Qwen3.6-27B-GGUF Qwen3.6-27B-Q4_K_M.gguf --local-dir ~/models/
hf download Lucebox/Qwen3.6-27B-DFlash-GGUF dflash-draft-3.6-q8_0.gguf --local-dir ~/models/draft/
</code></pre>
<hr />
<h2>四、关键调优与踩坑记录</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>坑</th>
<th>根因</th>
<th>解法</th>
</tr>
</thead>
<tbody>
<tr>
<td>官方 bench 速度虚低（41 t/s）</td>
<td><code>bench_he.py</code> 只传 <code>--ddtree-budget</code> 不传 <code>--ddtree</code>，源码里预算不启用树模式</td>
<td>直接驱动 <code>test_dflash</code> 补 <code>--ddtree</code></td>
</tr>
<tr>
<td>budget≥16 速度腰斩</td>
<td>verify token 数 &gt;16 触发 TILE kernel（gfx1100 上的慢/不稳路径）</td>
<td>实测甜点 <code>budget=12</code>（VEC 路径内 AL 平台期上限）</td>
</tr>
<tr>
<td>Q8_0 草稿必需环境变量</td>
<td>滑窗正确性</td>
<td><code>DFLASH27B_DRAFT_SWA=2048</code></td>
</tr>
<tr>
<td>运行中 OOM 崩溃</td>
<td>64K 上下文 KV 全量预分配 + 前缀缓存 32 槽不限量</td>
<td><code>MAX_CTX=32768</code> + <code>--prefix-cache-slots 8</code></td>
</tr>
<tr>
<td>前端报超上下文</td>
<td>Open WebUI 发 <code>max_tokens=32768</code></td>
<td>服务端 <code>--default-max-tokens 8192</code>（§4.4 钳制，日志已验证）</td>
</tr>
<tr>
<td>风扇空载狂转</td>
<td>DPM 常驻 high</td>
<td>启动脚本内 high，退出 trap 回 auto</td>
</tr>
</tbody>
</table>
<hr />
<h2>五、测试报告</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>测试项</th>
<th>结果</th>
</tr>
</thead>
<tbody>
<tr>
<td>rocWMMA kernel 数值验证</td>
<td>全部 PASS（S=8192：18.3 ms/iter）</td>
</tr>
<tr>
<td>AR 基线（<code>test_generate</code>）</td>
<td>25.87 tok/s</td>
</tr>
<tr>
<td>投机链模式（缺 <code>--ddtree</code>）</td>
<td>41.4 tok/s</td>
</tr>
<tr>
<td>DDTree budget=12（10-prompt 均值）</td>
<td>44.46 tok/s，AL 4.65，接受率 29.5%，1.72× AR</td>
</tr>
<tr>
<td>API 实测：英文代码</td>
<td>53.9 tok/s（接受率 34%）</td>
</tr>
<tr>
<td>API 实测：中文对话</td>
<td>19.8 tok/s（草稿为代码优化，中文收益低，属预期）</td>
</tr>
<tr>
<td>显存占用（稳定运行）</td>
<td>19.6 / 24 GiB，余量 4+ GiB</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto"><strong>注</strong>：参考文章的 81 tok/s 未复现，原因有二——其使用 6 月旧版引擎（现行版在 gfx1100 有性能回退），且其 CPU 为双路 E5；本文数据为本机多次实测均值。</p>
</blockquote>
<hr />
<h2>六、Web 支持（Open WebUI）</h2>
<ul>
<li><code>pip install open-webui</code> 装入同一 venv；启动脚本 <code>dflash-ui</code> 注入：
<ul>
<li><code>OPENAI_API_BASE_URL(S)=http://127.0.0.1:8000/v1</code></li>
<li><code>ENABLE_OLLAMA_API=false</code></li>
</ul>
</li>
<li>访问 <code>http://192.168.8.247:8080</code>，首个注册账号自动成为管理员（数据全在本机）</li>
</ul>
<hr />
<h2>七、网页搜索实现</h2>
<p dir="auto"><strong>原理</strong>：模型本身不联网。Open WebUI 中间件在调用模型前先用 DuckDuckGo（<code>ddgs</code>，免 API key，本机直连已验证）检索，把结果注入提示词，模型基于注入内容作答并附引用。</p>
<h3>配置落地（两个教训）</h3>
<ol>
<li>该版本配置键为 <code>ENABLE_WEB_SEARCH</code> / <code>WEB_SEARCH_ENGINE</code>（而非旧版 <code>ENABLE_RAG_WEB_SEARCH</code>）；</li>
<li>首次启动会把默认值持久化进 SQLite（<code>…/site-packages/open_webui/data/webui.db</code>），之后 env 改不动——最终直接改库：
<ul>
<li><code>web.search.enable=true</code></li>
<li><code>web.search.engine="duckduckgo"</code></li>
<li><code>result_count=3</code></li>
</ul>
</li>
</ol>
<h3>使用方式</h3>
<p dir="auto">全局开关只是放行；每个对话需在输入框点 <strong>地球图标</strong>（代码依据 <code>middleware.py:2456</code>，仅当 <code>features.web_search=true</code> 才执行搜索）。闲聊勿开，免得拖慢首 token。</p>
<hr />
<h2>八、运维速查</h2>
<pre><code class="language-bash">dflash                 # 启模型 API（:8000）   Ctrl+C 停
dflash-ui              # 启网页前端（:8080）   Ctrl+C 停
MAX_CTX=65536 PC_SLOTS=2 MAX_TOKENS=16384 dflash   # 长文本临时配置
MODEL=/root/models/xxx.gguf dflash                # 换模型
# 日志：/root/dflash-server.log  /root/webui.log
</code></pre>
<p dir="auto">全部组件已在运行状态，重启机器后按顺序执行 <code>dflash</code>、<code>dflash-ui</code> 即可恢复。</p>
<p dir="auto">总结：在保证速度的情况下。让模型能够执行网络搜集工作。这个信息时代里，这个功能更加重要。<br />
希望此文能帮助到大家。</p>
]]></description><link>https://lcz.me/topic/920/从-41-到-56-tok-s-我修好了-dflash-官方-benchmark-的-bug-顺手在-7900-xtx-上搭了全套联网大模型</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Jul 2026 20:02:12 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/920.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 Jul 2026 10:49:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sun, 26 Jul 2026 17:30:27 GMT]]></title><description><![CDATA[<p dir="auto">任何模型能工作才是最重要的。网络中的各种测试都是一个参考。只能作为你没安装前的考量参数。<br />
输出速度再快。不能24小时无人值守运行程序也是一个展示型玩物。<br />
这篇帖子的精华是给大家一个低门槛能链接互联网的 Qwen 27B。没有这个基础模块各种项目无法开展。<br />
没上更复杂的链接方式是讲清楚让所有人都能安装太墨迹了。这套操作的适用行最强。安装最简单。</p>
]]></description><link>https://lcz.me/post/10616</link><guid isPermaLink="true">https://lcz.me/post/10616</guid><dc:creator><![CDATA[williamlouis]]></dc:creator><pubDate>Sun, 26 Jul 2026 17:30:27 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sun, 26 Jul 2026 13:01:29 GMT]]></title><description><![CDATA[<p dir="auto">只看T/S，感觉还不如官方MTP，菜鸟之言。大神莫见笑。</p>
]]></description><link>https://lcz.me/post/10603</link><guid isPermaLink="true">https://lcz.me/post/10603</guid><dc:creator><![CDATA[stxpnet]]></dc:creator><pubDate>Sun, 26 Jul 2026 13:01:29 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sun, 26 Jul 2026 05:58:39 GMT]]></title><description><![CDATA[<p dir="auto">我一直 用的 adspower.<br />
补充下进展 联网+Qwen3.6-27B+cpu 纯编码 .sh .py .js 最终实现了视频工作流生产。<br />
结论：在课件类视频中 实现指定逻辑是第一位的。 wan  ltx 自身运行中的想象力不可控因素过多。不能实现无人程序化产出。</p>
]]></description><link>https://lcz.me/post/10572</link><guid isPermaLink="true">https://lcz.me/post/10572</guid><dc:creator><![CDATA[williamlouis]]></dc:creator><pubDate>Sun, 26 Jul 2026 05:58:39 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sat, 25 Jul 2026 23:02:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/williamlouis" aria-label="Profile: williamlouis">@<bdi>williamlouis</bdi></a><br />
配合OpenWebUI看来不是搞代码的需求，这种情况下可以考虑27B的iQ3系列，日用和正常的Q4没什么区别。以前用5070ti的时候用这个效果很棒，又快又稳，简单的脚本之类的也没有问题。<br />
下面这个实测不错，但是不要用xs和s版本那两个会崩，因为这些作者他们量化完了以后不会自己运行实际跑，所以要跑几个不同的版本精挑细选一下。<br />
<a href="https://huggingface.co/mradermacher/Huihui-Qwen3.6-27B-abliterated-i1-GGUF?show_file_info=Huihui-Qwen3.6-27B-abliterated.i1-IQ3_XXS.gguf" rel="nofollow ugc">https://huggingface.co/mradermacher/Huihui-Qwen3.6-27B-abliterated-i1-GGUF?show_file_info=Huihui-Qwen3.6-27B-abliterated.i1-IQ3_XXS.gguf</a></p>
]]></description><link>https://lcz.me/post/10558</link><guid isPermaLink="true">https://lcz.me/post/10558</guid><dc:creator><![CDATA[fcme]]></dc:creator><pubDate>Sat, 25 Jul 2026 23:02:14 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sat, 25 Jul 2026 22:50:05 GMT]]></title><description><![CDATA[<p dir="auto">ddg的搜索质量还是有点堪忧啊，感觉用searngx做聚合，把你实测质量比较好的搜索源的权重提高点效果比较好。外挂搜索引擎确实是弥补本地小模型知识库这个最大短版的印度神油<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f602.png?v=8624a6a055f" class="not-responsive emoji emoji-android emoji--joy" style="height:23px;width:auto;vertical-align:middle" title="😂" alt="😂" /></p>
]]></description><link>https://lcz.me/post/10556</link><guid isPermaLink="true">https://lcz.me/post/10556</guid><dc:creator><![CDATA[fcme]]></dc:creator><pubDate>Sat, 25 Jul 2026 22:50:05 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sat, 25 Jul 2026 21:46:24 GMT]]></title><description><![CDATA[<p dir="auto">联网+Qwen3.6-27B+ ltxv-13b-0.9.8-distilled-fp8(14.6G) 可以实现一个 自动产出的工作流了。<br />
实测 老同学 2B的小模型和没有没什么区别。这个 2B是用来搞笑的生产力！</p>
]]></description><link>https://lcz.me/post/10554</link><guid isPermaLink="true">https://lcz.me/post/10554</guid><dc:creator><![CDATA[williamlouis]]></dc:creator><pubDate>Sat, 25 Jul 2026 21:46:24 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sat, 25 Jul 2026 21:42:07 GMT]]></title><description><![CDATA[<p dir="auto">可以联网是开展工作流的基础。这样7900XTX就有了实战能力了。</p>
]]></description><link>https://lcz.me/post/10553</link><guid isPermaLink="true">https://lcz.me/post/10553</guid><dc:creator><![CDATA[williamlouis]]></dc:creator><pubDate>Sat, 25 Jul 2026 21:42:07 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sat, 25 Jul 2026 21:37:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/williamlouis" aria-label="Profile: williamlouis">@<bdi>williamlouis</bdi></a> 你还别说，我的xtx，很久以来只是用来生成音频，其他的功能都丧失了，可以部署，抄下作业。</p>
]]></description><link>https://lcz.me/post/10552</link><guid isPermaLink="true">https://lcz.me/post/10552</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Sat, 25 Jul 2026 21:37:30 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sat, 25 Jul 2026 19:50:16 GMT]]></title><description><![CDATA[<p dir="auto">7900XTX 质量上下文 并能联网搜索 接入不了 Hermes。上下文长度不够。</p>
]]></description><link>https://lcz.me/post/10551</link><guid isPermaLink="true">https://lcz.me/post/10551</guid><dc:creator><![CDATA[williamlouis]]></dc:creator><pubDate>Sat, 25 Jul 2026 19:50:16 GMT</pubDate></item><item><title><![CDATA[Reply to 从 41 到 56 tok/s：我修好了 DFlash 官方 benchmark 的 bug，顺手在 7900 XTX 上搭了全套联网大模型 on Sat, 25 Jul 2026 17:13:22 GMT]]></title><description><![CDATA[<p dir="auto">没测试，以前出来会很有用，现在没有理由不接入Hermes，纯聊天很尴尬。</p>
]]></description><link>https://lcz.me/post/10548</link><guid isPermaLink="true">https://lcz.me/post/10548</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Sat, 25 Jul 2026 17:13:22 GMT</pubDate></item></channel></rss>