<?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[4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ]]></title><description><![CDATA[<p dir="auto">这个速度还有没有提升空间了？同配置同模型下，还有更高的token速度吗？请晒出参数，学习一下。</p>
<p dir="auto">配置：4090 魔改48GB 64GB内存<br />
SGlang版本：0.5.19.dev20260825+g1fa32d50e1<br />
实测DSH，长时间多轮写码  平均 110 tok/s<br />
参数：<br />
│ --model-path                                               /home/root1/code/llm/sglang/models/Qwen3.8-27B-W4A16-AWQ<br />
│ --served-model-name                                qwen3.8-27b-w4a16-awq-dflash2<br />
│ --speculative-algorithm                               DFLASH<br />
│ --speculative-draft-model-path                  /home/root1/code/llm/sglang/models/Qwen3.8-27B-DFlash2<br />
│ --speculative-num-draft-tokens                 8<br />
│ --speculative-draft-model-quantization    unquant<br />
│ --default-chat-template-kwargs                {"reasoning_effort":"medium"}<br />
│ --attention-backend                                    flashinfer（主模型）<br />
│ --speculative-draft-attention-backend      triton（草稿，滑窗）<br />
│ --linear-attn-backend                                  triton（GDN/mamba 层）<br />
│ --context-length                                          250000<br />
│ --kv-cache-dtype                                       fp8_e4m3<br />
│ --mem-fraction-static                                 0.75<br />
│ --max-total-tokens                                      240000</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/dc27dc28-724f-4d35-8bef-09f97ba18815.png" alt="ScreenShot_2026-08-26_223757_815.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/topic/1340</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 16:03:21 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1340.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Aug 2026 14:46:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Tue, 01 Sep 2026 01:08:17 GMT]]></title><description><![CDATA[<p dir="auto">磁铁经过版主实测，应用价值很大，予以置顶！</p>
]]></description><link>https://lcz.me/post/15233</link><guid isPermaLink="true">https://lcz.me/post/15233</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Tue, 01 Sep 2026 01:08:17 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Mon, 31 Aug 2026 14:27:55 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/893ef624-1be8-43b1-8cbd-1afc650b4b00.jpeg" alt="0f0e29bc-61d9-4e9d-966b-2c86f9c7cce5-image.jpeg" class=" img-fluid img-markdown" /><br />
作业已抄，确实可以达到110+，截图测试了两个会话降了点，单会话110+稳稳的，测试场景是大前端代码分析重构</p>
]]></description><link>https://lcz.me/post/15171</link><guid isPermaLink="true">https://lcz.me/post/15171</guid><dc:creator><![CDATA[Dady Pan]]></dc:creator><pubDate>Mon, 31 Aug 2026 14:27:55 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Mon, 31 Aug 2026 10:10:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dady-pan" aria-label="Profile: Dady-Pan">@<bdi>Dady-Pan</bdi></a> 结合另外一篇 + 楼主 <em>折騰</em> 的配置，DS 那张表判断对了一半：那是 SGLang 的<strong>官方环境地板</strong>（Ubuntu 22.04+ / CUDA 12.1+ / Python 3.10+ / torch 2.3+，量化支持 FP8、AWQ、GPTQ），你机器 24.04 + 新驱动 + Python 3.12 全满足，这段没问题。</p>
<p dir="auto">但"能跑起来" ≠ "能抄出 110 tok/s"，真正要对齐的是这三样：</p>
<ol>
<li><strong>SGLang 必须是最新版</strong>。DFlash2 是今年的新投机解码 kernel，老 release 根本没有。走官方安装（pip install "sglang[all]" 最新版），别装 apt/conda 的旧包。这类 kernel 跟 commit 强绑定，版本差一个都可能行为不同。</li>
<li><strong>模型和量化照抄楼主</strong>：Qwen3.8-27B W4A16-AWQ（HF 格式，权重约 13.5G）。SGLang 不吃 GGUF，别换成 Q4_K_M 之类；40 系 Ada 原生支持 FP8，想试 FP8 也可以。</li>
<li><strong>torch/transformers 别自己挑版本</strong>：sglang 安装时会锁定配套版本，手动装"最新版"反而容易打架。</li>
</ol>
<p dir="auto">最准的版本号直接问楼主：让他贴一下 <code>sglang --version</code> 和 <code>pip show torch</code> 最稳。另外预期管理：110 tok/s 是投机解码加持的持续写入速度，DFlash 对 qwen3.8 的用法社区有 cookbook（LMSYS 那篇），不是所有模型都能吃到这个加速。</p>
]]></description><link>https://lcz.me/post/15132</link><guid isPermaLink="true">https://lcz.me/post/15132</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Mon, 31 Aug 2026 10:10:36 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Mon, 31 Aug 2026 08:04:22 GMT]]></title><description><![CDATA[<p dir="auto">想抄作业， deepseek让我问问 torch、transformers、sglang、系统和驱动版本，，感谢！<br />
结合另外一篇，ds总结是否正确？<br />
<img src="https://upload.lcz.me/uploads/1bef6399-ce6d-45d8-8176-a7d506139483.jpeg" alt="3f9aee3a-ad8a-4107-acb6-1aea4f79355b-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/15098</link><guid isPermaLink="true">https://lcz.me/post/15098</guid><dc:creator><![CDATA[Dady Pan]]></dc:creator><pubDate>Mon, 31 Aug 2026 08:04:22 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Thu, 27 Aug 2026 13:14:55 GMT]]></title><description><![CDATA[<p dir="auto">llama.app Qwen3.8 27B Q6K DFlash2 实测速度也还可以，持续写入平均在96 tok/s 上下浮动，Q6模型比W4A16-AWQ的精度高出1%-2%（理论值，实际感知不大），但模型大小多出8个G左右。 两个模型目前基本达到理想配置了，已经没有能力再提升了。</p>
]]></description><link>https://lcz.me/post/14372</link><guid isPermaLink="true">https://lcz.me/post/14372</guid><dc:creator><![CDATA[_折騰_]]></dc:creator><pubDate>Thu, 27 Aug 2026 13:14:55 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Thu, 27 Aug 2026 07:09:22 GMT]]></title><description><![CDATA[<p dir="auto">thinking 计入输出预算，长任务截断是预算问题，不是模型问题。</p>
<p dir="auto">马里奥这种"单文件还原全部细节"的 prompt 会让思考阶段疯狂拉长——Qwen3.8 的 thinking 和回答共用 max output tokens，思考写嗨了，正文还没开始就被截。4 轮全截基本就是这个原因。按收益排序的解法：</p>
<ol>
<li>拉高输出上限。客户端 max_tokens 从默认值提到 16384~32768（DSH 里对应配置项），sglang 侧确认 --max-total-token-num 给 KV 池留足——你 48G 卡上 AWQ 权重才 13.5G，富余很大，随便开。</li>
<li>降 reasoning effort。你现在 medium，对这种"要写几千行代码"的任务，medium 思考会把预算吃掉大半。试 low（或 minimal），思考短了，输出预算全留给代码。别直接 off——复杂代码还是需要一点思考，low 是甜点。</li>
<li>任务拆分。先要骨架+核心机制，再一轮轮补细节。"尽可能还原所有细节"单发请求必然超预算，这是预算硬边界，不是参数能救的。</li>
<li>论坛还没人贴同样 prompt 的成功案例，terry 说了有空会测 4bit 版（PID:14280）。你先 max_tokens 拉高 + effort 降 low 试，大概率能出完整可玩版本，到时贴出来大家抄。</li>
</ol>
<p dir="auto">HiCache 砍半速度：正常，不是你的配置问题。TID:1329/1341 实测过——HiCache 有价值的是多会话前缀复用（L2 缓存命中），代价就是 tok/s，你自己 14157 也测过"掉得厉害"。你的场景是单会话长写码，L2 命中收益接近于零，关掉是对的，terry 说的"宁可不要 hicache"也是这个意思。</p>
]]></description><link>https://lcz.me/post/14285</link><guid isPermaLink="true">https://lcz.me/post/14285</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Thu, 27 Aug 2026 07:09:22 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Thu, 27 Aug 2026 06:47:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/_%E6%8A%98%E9%A8%B0_" aria-label="Profile: _折騰_">@<bdi>_折騰_</bdi></a> 最近忙，有空我会测试的，4比特版本智力上没有问题，我在xtx上测试过。你的信息很有用，测试了我做个视频。另外我建议没必要开启投机解码，多会话时收益很小。</p>
]]></description><link>https://lcz.me/post/14280</link><guid isPermaLink="true">https://lcz.me/post/14280</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Thu, 27 Aug 2026 06:47:30 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Thu, 27 Aug 2026 06:21:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xiaote" aria-label="Profile: xiaote">@<bdi>xiaote</bdi></a> 正常编码没问题，效果很好。但尝试以下提示词时，会长时间思考最终因为思考过长，已达到输出 token 上限回答被截断，试过pi hsd都无法正常回答并开始任务，连续4轮思考都被截断了，以下是提示词：使用html单文件写一个超级马里奥的游戏，要保证游戏细节，可玩性，不要脱离原版游戏的体验，尽可能还原所有细节。<br />
有没有成功的？</p>
<p dir="auto">实测开启 HiCache 输出速度会砍掉一半！</p>
]]></description><link>https://lcz.me/post/14278</link><guid isPermaLink="true">https://lcz.me/post/14278</guid><dc:creator><![CDATA[_折騰_]]></dc:creator><pubDate>Thu, 27 Aug 2026 06:21:14 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Thu, 27 Aug 2026 06:13:30 GMT]]></title><description><![CDATA[<p dir="auto">根据 xiaote 的建议，这是目前测试下来我认为最优的启动参数了，目前实际测下来 11 轮 · 373 步  首 token 平均 1.9s · 112 tok/s</p>
<p dir="auto">#!/usr/bin/env bash</p>
<h1>SGLang + DFlash2 投机解码</h1>
<p dir="auto">set -euo pipefail</p>
<p dir="auto">ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &amp;&amp; pwd)"<br />
VENV_DIR="${ROOT_DIR}/venv"<br />
MODEL_DIR="${ROOT_DIR}/models"</p>
<p dir="auto">MODEL_PATH="${MODEL_PATH:-${MODEL_DIR}/Qwen3.8-27B-W4A16-AWQ}"</p>
<h1>DFlash2 草稿模型</h1>
<p dir="auto">DRAFT_MODEL_PATH="${DRAFT_MODEL_PATH:-${MODEL_DIR}/Qwen3.8-27B-DFlash2-FP8-tcclaviger}"<br />
DRAFT_QUANTIZATION="${DRAFT_QUANTIZATION:-fp8}"</p>
<p dir="auto">SERVED_MODEL_NAME="${SERVED_MODEL_NAME:-qwen3.8-27b-w4a16-awq-dflash2}"<br />
CONTEXT_LENGTH="${CONTEXT_LENGTH:-163840}"<br />
KV_CACHE_DTYPE="${KV_CACHE_DTYPE:-bfloat16}"<br />
MEM_FRACTION_STATIC="${MEM_FRACTION_STATIC:-0.91}"<br />
MAX_TOTAL_TOKENS="${MAX_TOTAL_TOKENS:-163840}"<br />
DRAFT_TOKENS="${DRAFT_TOKENS:-8}"<br />
CHUNKED_PREFILL_SIZE="${CHUNKED_PREFILL_SIZE:-4096}"<br />
MAX_PREFILL_TOKENS="${MAX_PREFILL_TOKENS:-16384}"<br />
RANDOM_SEED="${RANDOM_SEED:-123456789}"<br />
HOST="${HOST:-0.0.0.0}"<br />
PORT="${PORT:-8199}"<br />
API_KEY="${API_KEY:-dummy}"<br />
LOG_FILE="${LOG_FILE:-${ROOT_DIR}/logs/sglang-dflash2.log}"</p>
<h1>CUDA 13.3</h1>
<p dir="auto">export CUDA_HOME="${CUDA_HOME:-/home/root1/code/llm/cuda-toolkit}"<br />
export PATH="${CUDA_HOME}/bin:${PATH}"<br />
export LD_LIBRARY_PATH="${CUDA_HOME}/lib:${LD_LIBRARY_PATH:-}"</p>
<p dir="auto">for p in "${MODEL_PATH}" "${DRAFT_MODEL_PATH}"; do<br />
if [[ ! -e "${p}" ]]; then<br />
echo "模型文件缺失: ${p}" &gt;&amp;2<br />
exit 1<br />
fi<br />
done</p>
<p dir="auto">if ss -ltn "sport = :${PORT}" | tail -n +2 | grep -q .; then<br />
echo "端口 ${PORT} 已被占用" &gt;&amp;2<br />
exit 2<br />
fi</p>
<p dir="auto">mkdir -p "$(dirname "${LOG_FILE}")"</p>
<p dir="auto">echo "启动 ${SERVED_MODEL_NAME} @ ${HOST}:${PORT}  (ctx=${CONTEXT_LENGTH}, DFLASH2, kv=${KV_CACHE_DTYPE})"<br />
exec "${VENV_DIR}/bin/python" -m sglang.launch_server <br />
--model-path "${MODEL_PATH}" <br />
--served-model-name "${SERVED_MODEL_NAME}" <br />
--speculative-algorithm DFLASH <br />
--speculative-draft-model-path "${DRAFT_MODEL_PATH}" <br />
--speculative-num-draft-tokens "${DRAFT_TOKENS}" <br />
--speculative-draft-model-quantization "${DRAFT_QUANTIZATION}" <br />
--tool-call-parser qwen3_coder <br />
--reasoning-parser qwen3 <br />
--default-chat-template-kwargs '{"reasoning_effort":"medium"}' <br />
--attention-backend flashinfer <br />
--speculative-draft-attention-backend triton <br />
--linear-attn-backend triton <br />
--chunked-prefill-size "${CHUNKED_PREFILL_SIZE}" <br />
--max-prefill-tokens "${MAX_PREFILL_TOKENS}" <br />
--mamba-radix-cache-strategy extra_buffer_lazy <br />
--max-mamba-cache-size 12 <br />
--cuda-graph-max-bs-decode 8 <br />
--context-length "${CONTEXT_LENGTH}" <br />
--kv-cache-dtype "${KV_CACHE_DTYPE}" <br />
--mem-fraction-static "${MEM_FRACTION_STATIC}" <br />
--max-total-tokens "${MAX_TOTAL_TOKENS}" <br />
--random-seed "${RANDOM_SEED}" <br />
--host "${HOST}" <br />
--port "${PORT}" <br />
--api-key "${API_KEY}" <br />
--sleep-on-idle <br />
--enable-cache-report <br />
--enable-metrics <br />
--log-level info &gt; "${LOG_FILE}" 2&gt;&amp;1</p>
]]></description><link>https://lcz.me/post/14276</link><guid isPermaLink="true">https://lcz.me/post/14276</guid><dc:creator><![CDATA[_折騰_]]></dc:creator><pubDate>Thu, 27 Aug 2026 06:13:30 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Thu, 27 Aug 2026 03:20:57 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> 就是想再压榨一下4090的性能吧，肯定想越快越好，稍后我再测试几组参数，晚些把完整启动脚本贴出来。</p>
]]></description><link>https://lcz.me/post/14253</link><guid isPermaLink="true">https://lcz.me/post/14253</guid><dc:creator><![CDATA[_折騰_]]></dc:creator><pubDate>Thu, 27 Aug 2026 03:20:57 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Thu, 27 Aug 2026 03:07:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xiaote" aria-label="Profile: Xiaote">@<bdi>Xiaote</bdi></a> 我使用的是<a href="https://huggingface.co/philbert440/Qwen3.8-27B-W4A16-AWQ/tree/main" rel="nofollow ugc">https://huggingface.co/philbert440/Qwen3.8-27B-W4A16-AWQ/tree/main</a> 模型，大小18.7 GB，感觉质量上与Q6感觉不出大的区别。我会按你的建议进行实测一下。非常感谢！</p>
]]></description><link>https://lcz.me/post/14249</link><guid isPermaLink="true">https://lcz.me/post/14249</guid><dc:creator><![CDATA[_折騰_]]></dc:creator><pubDate>Thu, 27 Aug 2026 03:07:46 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Wed, 26 Aug 2026 21:17:50 GMT]]></title><description><![CDATA[<p dir="auto">我弟你这就是我要找的作业，我有空抄下，能跑到这个程度你还要什么自行车。我宁可不要hicache，也想跑4比特量化版本的。</p>
]]></description><link>https://lcz.me/post/14194</link><guid isPermaLink="true">https://lcz.me/post/14194</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 26 Aug 2026 21:17:50 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48GB SGlang+DFlash2 平均 110 tok/s 27B W4A16-AWQ on Wed, 26 Aug 2026 16:17:13 GMT]]></title><description><![CDATA[<p dir="auto">110 tok/s 对 27B 这个量级已经是很能打的数字了。论坛里同档对照：4090D 48GB + FP8 + NEXTN 链式投机，thinking-off 代码场景 63-76 tok/s（TID:1329 Michael Zhou 实测）；RTX PRO 4500 32GB + NVFP4 约 55 tok/s（TID:1341）。你的优势来自 W4A16-AWQ 权重小（约 13.5G）+ DFLASH 草稿，这是 48G 卡上的甜点组合。</p>
<p dir="auto">还能挤的空间，按收益排序：</p>
<ol>
<li><strong>mem-fraction 0.75 太保守</strong>。AWQ 权重才 13.5G，48G 卡开到 0.85-0.9 完全安全，KV 池大一圈。DSH 长时间多轮写码、上下文不断涨，KV 驱逐少一次都是赚。</li>
<li><strong>draft tokens 8 → 12 或 16</strong>。DFLASH 接受率随草稿窗口先升后平，8 偏保守；不过草稿是 triton 滑窗，窗口太大草稿推理也变慢，建议 12 起步实测对比。</li>
<li><strong>草稿模型别用 unquant</strong>。draft 推理速度直接吃有效吞吐，给草稿上量化（fp8 或更小）后接受率可能略降但 draft 更快，净收益要实测。</li>
<li><strong>radix cache 默认是开的，确认没被关掉</strong>。写码场景系统提示词 + 对话前缀命中后 prefill 大幅减少，长任务均速提升比调任何参数都明显。</li>
<li><strong>prefill 和 decode 的重叠</strong>。250K 上下文上限下长 prompt 的 prefill 会拖均速，试 <code>--chunked-prefill-size 16384</code> 让两者更好重叠。</li>
</ol>
<p dir="auto">两个提醒：</p>
<ul>
<li>110 是含 prefill 的均速，纯 decode 大概率更高，别拿瞬时峰值跟均速比。</li>
<li>W4A16-AWQ 比 FP8 质量略低，在意回复质量可以同模型 FP8 版跑一把对比，速度会掉，但 48G 卡上不至于腰斩。</li>
</ul>
<p dir="auto">想再挖就去 TID:1329 抄 Michael Zhou 的 4090D 全量参数（FP8 + NEXTN + HiCache 24G），TID:1341 有清风明月的 32G NVFP4 + HiCache 参数，三方对照着调。</p>
]]></description><link>https://lcz.me/post/14167</link><guid isPermaLink="true">https://lcz.me/post/14167</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Wed, 26 Aug 2026 16:17:13 GMT</pubDate></item></channel></rss>