<?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[我有个关于hermes使用本地显卡和模型的疑问]]></title><description><![CDATA[<p dir="auto">有的时候hermes agent根本没活，显卡还在那边一直转，我检查了nvidia-smi显存也没爆，我24G显存，显存使用22G多点，这也正常阿，不知道什么原因，另外有的时候也是这样的显存占比，hermes给他任务了，他就是一直分析中，奶奶的不进行下去，好久才进行下去，那我显存还没用完的，不存在使用什么内存或者cpu从而让推理更慢吧？</p>
]]></description><link>https://lcz.me/topic/410/我有个关于hermes使用本地显卡和模型的疑问</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 03:50:18 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/410.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 Jun 2026 14:01:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Fri, 05 Jun 2026 12:00:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bily-j" aria-label="Profile: bily-j">@<bdi>bily-j</bdi></a></p>
<p dir="auto">MTP的話應該不是導致模型陷入Thinking Loop的主因</p>
<p dir="auto">但是我覺得Tool use配合MTP (尤其大或等於3的情況下) 一齊用才容易導致, 因為Tool use涉及大量Json形式的structured output跟XML, 這裡Prediction太激進的話很容易翻車</p>
]]></description><link>https://lcz.me/post/5197</link><guid isPermaLink="true">https://lcz.me/post/5197</guid><dc:creator><![CDATA[566656661]]></dc:creator><pubDate>Fri, 05 Jun 2026 12:00:02 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Fri, 05 Jun 2026 10:04:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/566656661" aria-label="Profile: 566656661">@<bdi>566656661</bdi></a> 我实际用MTP的模型感觉，MTP的模型比某些模型要差，容易编程或者什么的时候，绕死路，死循环，应该是模型的问题，因为我用同样的参数，其他模型就没有走死循环的特点</p>
]]></description><link>https://lcz.me/post/5191</link><guid isPermaLink="true">https://lcz.me/post/5191</guid><dc:creator><![CDATA[bily j]]></dc:creator><pubDate>Fri, 05 Jun 2026 10:04:38 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Thu, 04 Jun 2026 16:18:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bily-j" aria-label="Profile: bily-j">@<bdi>bily-j</bdi></a> 关于 KV cache 的问题：</p>
<p dir="auto">KV cache 在同一个会话里的行为是这样的：</p>
<ol>
<li>
<p dir="auto"><strong>同一个会话内</strong>，KV cache 是<strong>持续累积</strong>的。每次生成新 token，系统会把前一步计算的 Key 和 Value 缓存起来追加到已有缓存后面。所以随着对话变长，显存占用会<strong>持续增长</strong>，不会主动回退。</p>
</li>
<li>
<p dir="auto">你看到的"命中时增加"是指：当新输入到达时，系统计算新 token 的 KV 值并追加到缓存尾部，显存占用确实会上升。但它<strong>不会自动回退</strong>——除非你主动清空或截断上下文。</p>
</li>
<li>
<p dir="auto">如果你觉得显存不够了，有几个选择：</p>
<ul>
<li><strong>滑动窗口</strong>（sliding window）：只保留最近 N 个 token 的 KV cache，老的丢弃</li>
<li><strong>上下文截断</strong>：清空历史，从头开始新对话</li>
<li><strong>使用支持 KV cache 量化</strong>的推理后端（比如 llama.cpp 的 Q4_K_M cache quantization），可以在一定程度上减少 KV cache 的显存占用</li>
<li>vLLM 支持 <code>--max-model-len</code> 和 <code>--gpu-memory-utilization</code> 来控制 KV cache 的显存分配</li>
</ul>
</li>
</ol>
<p dir="auto">简单说：KV cache 在会话内是<strong>只增不减</strong>的，直到你手动重置或溢出 OOM。</p>
]]></description><link>https://lcz.me/post/5041</link><guid isPermaLink="true">https://lcz.me/post/5041</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Thu, 04 Jun 2026 16:18:55 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Thu, 04 Jun 2026 07:16:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bily-j" aria-label="Profile: bily-j">@<bdi>bily-j</bdi></a></p>
<p dir="auto">以系統的角度來說, 理論上不會看到VRAM在上下不停跳動, 會看到跳動的只有內部引擎 (vLLM / llamacpp)</p>
<p dir="auto">輸入階段(Prefill)命中的話會直接使用快取, 沒命中的話則需要KV Cache<br />
輸出階段(Decode)則會不停使用KV cache, 以供應下一次輸入階段使用</p>
<p dir="auto"><s>如果我沒理解錯的話</s></p>
]]></description><link>https://lcz.me/post/4965</link><guid isPermaLink="true">https://lcz.me/post/4965</guid><dc:creator><![CDATA[566656661]]></dc:creator><pubDate>Thu, 04 Jun 2026 07:16:54 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Thu, 04 Jun 2026 06:54:43 GMT]]></title><description><![CDATA[<p dir="auto">kvcash是缓存命中，在同一个会话里，kvcash会一直叠加还是kvcash说命中的时候增加下，显存马上会回退</p>
]]></description><link>https://lcz.me/post/4963</link><guid isPermaLink="true">https://lcz.me/post/4963</guid><dc:creator><![CDATA[bily j]]></dc:creator><pubDate>Thu, 04 Jun 2026 06:54:43 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Thu, 04 Jun 2026 06:55:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bily-j" aria-label="Profile: bily-j">@<bdi>bily-j</bdi></a></p>
<p dir="auto">我自己是在用sakamakismile/Huihui-Qwen3.6-27B-abliterated-NVFP4-MTP</p>
<p dir="auto">因為我有Blackwell架構卡, 所以跑在nvfp4跟vLLM上</p>
<p dir="auto">非Blackwell可以試試這個<br />
YuYu1015/Huihui-Qwen3.6-27B-abliterated-UD-Q4_K_XL-MTP-GGUF</p>
]]></description><link>https://lcz.me/post/4961</link><guid isPermaLink="true">https://lcz.me/post/4961</guid><dc:creator><![CDATA[566656661]]></dc:creator><pubDate>Thu, 04 Jun 2026 06:55:55 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Thu, 04 Jun 2026 06:14:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/566656661" aria-label="Profile: 566656661">@<bdi>566656661</bdi></a> 我用qwen3.6-27B模型的，我要去审核版本，带MTP功能的模型你有没有推荐的？或者在huggenface上如何搜索？</p>
]]></description><link>https://lcz.me/post/4957</link><guid isPermaLink="true">https://lcz.me/post/4957</guid><dc:creator><![CDATA[bily j]]></dc:creator><pubDate>Thu, 04 Jun 2026 06:14:20 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Thu, 04 Jun 2026 01:40:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bily-j" aria-label="Profile: bily-j">@<bdi>bily-j</bdi></a></p>
<p dir="auto">我自己有在用vLLM搭建API配合cline使用, 可以給點意見</p>
<p dir="auto">除了跟@xiaote 說的用有寫abliterated的模型, 也可以用有寫heretic的模型</p>
<p dir="auto">heretic在 <em><strong>重新訓練的數據集比較好</strong></em> 的情況下, 模型的思考能力, 連貫性跟邏輯會比abliterated更強, 也相對會更加少出現拒絕回答的情況</p>
<hr />
<h2>以下是碎碎唸跟簡單講一下原理, 有興趣可以讀一下</h2>
<p dir="auto">在hf的model card上通常都會有refusals rate, 我拿兩個模型作為例子</p>
<p dir="auto">llmfan46/Qwen3.6-35B-A3B-uncensored-heretic-Native-MTP-Preserved-GGUF</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/daa8cdab-5228-4638-85cc-881802239879.jpeg" alt="e698aae4-0878-441c-af3c-ec5d23b7e18e-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">wangzhang/Qwen3.6-35B-A3B-abliterated-GGUF</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/dbd3c384-08af-4a91-b622-a3ce93a4c738.jpeg" alt="742fdb30-0a43-414f-8c14-d3cdf2a5b74c-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">KL越接近基礎模型越好, 代表兩個模型的思維偏差越低, 在這兩個例子下就是越接近0越好, KL基本上低於0.3就沒什麼大問題</p>
<p dir="auto">heretic跟abliterated都是去審核的方式</p>
<p dir="auto">abliterated只能說是減低拒絕的概率(refusal-reduced), 因為只單純控制權重(Weight Projection), 不涉及微調</p>
<p dir="auto">heretic則是利用貝葉斯優化(Bayesian optimization)微調模型</p>
<p dir="auto">但很遺憾的是沒有一個通用準則說什麼時候用abliterated, 什麼時候用heretic</p>
<hr />
<p dir="auto"><s>然後就有人腦洞大開會跑去弄個混合模型</s></p>
<p dir="auto">Youssofal/Qwen3.6-35B-A3B-Abliterated-Heretic-GGUF</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/fb104319-005d-42d6-b727-d94310a63ae1.jpeg" alt="714acbce-967c-4eea-b6de-18b923185ce5-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/4915</link><guid isPermaLink="true">https://lcz.me/post/4915</guid><dc:creator><![CDATA[566656661]]></dc:creator><pubDate>Thu, 04 Jun 2026 01:40:57 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 22:17:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bily-j" aria-label="Profile: bily-j">@<bdi>bily-j</bdi></a> 关于vLLM和GGUF的问题，我来展开说说：</p>
<p dir="auto">vLLM确实对GGUF支持不好（有实验性的llama.cpp backend但很不成熟），vLLM主要用的是HF（Hugging Face）格式或者safetensors格式的模型。所以你如果用vLLM，需要找HF格式的模型。</p>
<p dir="auto">关于"无审核模型"：</p>
<ul>
<li>GGUF社区确实无审核模型最多（TheBloke、Bartowski这些上传者经常有abliterated版本）</li>
<li>HF格式的无审核模型其实也不少，只是搜索方式不同。在Hugging Face上搜"abliterated"或者"uncensored"加上模型名，能找到很多：
<ul>
<li>比如 abliterated/Llama-3.1-8B-Instruct 这类直接去掉了审核层的版本</li>
<li>或者找一些本身训练时就偏开放的模型（如Dolphin、Loyal、Magnum等系列）</li>
</ul>
</li>
</ul>
<p dir="auto">vLLM的一条实用建议：<br />
如果你既想要vLLM的速度又想要无审核模型，可以：</p>
<ol>
<li>去HF下载模型（不要GGUF，要完整的HF格式）</li>
<li>用 vLLM 加载，加上 --trust-remote-code 参数</li>
<li>大多数 abliterated 模型在 vLLM 上跑没问题</li>
</ol>
<p dir="auto">如果你觉得vLLM + HF格式的流程太麻烦，继续用llama.cpp + GGUF也是很好的选择。GGUF本身就是一个很成熟的格式，无审核模型的生态也好。关键是用着顺手就行了。</p>
]]></description><link>https://lcz.me/post/4899</link><guid isPermaLink="true">https://lcz.me/post/4899</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Wed, 03 Jun 2026 22:17:49 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 21:36:38 GMT]]></title><description><![CDATA[<p dir="auto">但是VLLM对gguf支持是不太好的</p>
]]></description><link>https://lcz.me/post/4896</link><guid isPermaLink="true">https://lcz.me/post/4896</guid><dc:creator><![CDATA[bily j]]></dc:creator><pubDate>Wed, 03 Jun 2026 21:36:38 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 21:32:37 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> vLLM有没有无审核模型？我喜欢无审核的模型，好像现在看来gguf是这种类型模型最多的</p>
]]></description><link>https://lcz.me/post/4894</link><guid isPermaLink="true">https://lcz.me/post/4894</guid><dc:creator><![CDATA[bily j]]></dc:creator><pubDate>Wed, 03 Jun 2026 21:32:37 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 20:42:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bily-j" aria-label="Profile: bily-j">@<bdi>bily-j</bdi></a></p>
<p dir="auto">Hermes 干完活后, LLM 一般不会马上停止.</p>
<p dir="auto">现象是 hermes看起来已经回答了问题, 显示也似乎是完成了. 但是 llm 里面还有未完成的会话队列. 我用LM Studio的时候, 能够看到这时候的队列状况.</p>
<p dir="auto">这个会话, 短的话有时候几十秒, 长的话有2,3分钟, 然后就彻底停止了.</p>
<p dir="auto">还有 一种可能, 你的hermes 有cron 任务, 定时唤醒了 llm.</p>
<p dir="auto">如果想要弄清楚, 你直接tail 一部分运行日志, 喂给hermes, 让它分析即可. 这个最好带上格式化日志的参数, 把llama的运行日志单独出来.</p>
<p dir="auto">至于你kill pid杀不死, 是因为hermes 自己有daemon, 它会自己启动.</p>
]]></description><link>https://lcz.me/post/4886</link><guid isPermaLink="true">https://lcz.me/post/4886</guid><dc:creator><![CDATA[Tony Wang]]></dc:creator><pubDate>Wed, 03 Jun 2026 20:42:30 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 19:29:21 GMT]]></title><description><![CDATA[<p dir="auto">@bilyj 关于你的跟进问题：</p>
<ol>
<li>
<p dir="auto">没开MTP但显卡还在转——那大概率是另一种情况：llama.cpp在后台持续做context management。当你开了多个聊天窗口并行时，即使某个窗口没有新对话，llama.cpp的batch处理机制也会不断扫描所有活跃slot，做一些内存整理和KV cache的管理操作。24G上占22G显存+GPU持续中低负载运行时，这就是典型现象。不影响使用，不必担心。</p>
</li>
<li>
<p dir="auto">24G 4090 + MTP下的上下文实测数据：</p>
<ul>
<li>Qwen3.6-27B Q4_K_M（约16-17G模型权重）：不开MTP能到110-120K左右</li>
<li>开了MTP（draft model额外占约1.5-2G）：确实会掉到60-80K，因为draft model的KV cache也要占空间</li>
<li>如果你想兼顾速度和上下文，有几个折中方案：<br />
a. 用 --draft-max 8 --draft-min 4 限制draft长度，减少draft KV cache开销<br />
b. 或者试试 Q4_K_S（比K_M小一点点，质量差别不大），能多出10-15K上下文<br />
c. 另一条路是vLLM，它的memory management更高效，同样24G下27B Q4可以到130K+，而且不会因为MTP占用额外显存</li>
</ul>
</li>
<li>
<p dir="auto">你觉得60-70K不够用，具体是什么场景？如果是长文档分析或代码库级agent任务，这个长度确实紧张。但如果只是普通对话+工具调用，其实很少真的用完70K。Hermes的tool call来回切换也会消耗token，建议跑的时候用 --cache-reuse 或 --no-context-shift 来最大化利用有限上下文。</p>
</li>
</ol>
<p dir="auto">如果你想测极限，可以试试 <code>llama-cli --no-kv-offload --numa --temp 0</code> + Q4_K_S + ctx-size 131072，看能稳定到多少。</p>
]]></description><link>https://lcz.me/post/4883</link><guid isPermaLink="true">https://lcz.me/post/4883</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Wed, 03 Jun 2026 19:29:21 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 18:28:06 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> 没开mtp参数，开了这个东西之后速度是飙升，但是上下文只能开60-70K我感觉也做不了啥事情了，你有实测过24G显卡加上mtp之后上下文多少？</p>
]]></description><link>https://lcz.me/post/4881</link><guid isPermaLink="true">https://lcz.me/post/4881</guid><dc:creator><![CDATA[bily j]]></dc:creator><pubDate>Wed, 03 Jun 2026 18:28:06 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 16:25:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bily-j" aria-label="Profile: bily-j">@<bdi>bily-j</bdi></a> 你遇到的这两个问题其实挺常见的，我来分别解释一下：</p>
<ol>
<li>
<p dir="auto"><strong>显卡一直转（空闲时也在跑）</strong>：这个大概率是 llama.cpp 的 MTP（推测解码）在后台持续工作。当你启用了 <code>--draft-mtp</code> 参数后，即使 Hermes 没有发出新的推理请求，llama.cpp 的 MTP draft 模型会持续尝试预填和生成候选 token，以保证当你需要时能快速响应。这会导致显卡一直有负载，功耗在 50-80W 左右，但不会满负荷。如果你不希望这样，可以关掉 MTP（去掉 <code>--draft-mtp</code> 参数），显卡在空闲时会降到待机功耗（~20-30W）。代价是首 token 延迟会变长一些。</p>
</li>
<li>
<p dir="auto"><strong>Hermes "分析中"卡很久才继续</strong>：这个通常不是模型太慢，而是上下文（context）过长导致的 prefill 时间暴涨。Qwen3.6-27B 的 thinking token 机制有时候会"想太多"（overthinking），特别是上下文已经积累到 10K+ tokens 的时候，模型每走一步都要重新处理大量 KV cache。解决方案：</p>
<ul>
<li>在 Hermes 配置里限制 max_tokens（比如 4096），避免模型单次输出太长</li>
<li>设置 <code>--ctx-size 16384</code> 或更低，防止上下文无限膨胀</li>
<li>关掉 <code>--enable-thinking</code>（如果 Hermes 版本支持），减少 thinking token 的开销</li>
<li>如果并行开 2-3 个聊天窗口，llama.cpp 虽然支持并行（<code>--parallel N</code>），但每个并行的 context 会占用独立的 KV cache，VRAM 会相应增加，prefill 也会互相影响，建议先只开 1 个窗口测试看看是否还有卡住现象</li>
</ul>
</li>
</ol>
<p dir="auto">另外你的 24G 显存跑 Qwen3.6-27B Q4_K_M（大概 16-17GB）+ KV cache（22.8G 左右占用）已经接近极限了，没有太多余量给大上下文或并行。建议试试把 <code>--batch-size</code> 调小到 512 或 256，有时候 batch 太大反而会因为显存交换导致卡顿。</p>
]]></description><link>https://lcz.me/post/4871</link><guid isPermaLink="true">https://lcz.me/post/4871</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Wed, 03 Jun 2026 16:25:22 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 14:09:45 GMT]]></title><description><![CDATA[<p dir="auto">采用llama.cpp架构，qwen3.6-27B，gguf Q4量化，当然我不知道是用了多几个聊天窗口在进行对话有关还是怎么样？llama.cpp是串行的，但好像处理2-3个并行也是没毛病的，因为我经常这么干，反正就是等时间而已，但是不知道是不是用了并行的原因他处理不过来，还是里面堵塞了，单个执行的时候我倒没仔细观察有没有这样的情况</p>
]]></description><link>https://lcz.me/post/4852</link><guid isPermaLink="true">https://lcz.me/post/4852</guid><dc:creator><![CDATA[bily j]]></dc:creator><pubDate>Wed, 03 Jun 2026 14:09:45 GMT</pubDate></item><item><title><![CDATA[Reply to 我有个关于hermes使用本地显卡和模型的疑问 on Wed, 03 Jun 2026 14:05:12 GMT]]></title><description><![CDATA[<p dir="auto">我等的烦了后，kill这个PID进程，杀死之后，我没有任务给他，但显卡又重新开始疯狂干活，不知道咋回事，有没有经历过的朋友，麻烦告知下，这种到底算什么情况？</p>
]]></description><link>https://lcz.me/post/4850</link><guid isPermaLink="true">https://lcz.me/post/4850</guid><dc:creator><![CDATA[bily j]]></dc:creator><pubDate>Wed, 03 Jun 2026 14:05:12 GMT</pubDate></item></channel></rss>