<?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[分享：日常让豆包帮调llama.cpp参数的过程]]></title><description><![CDATA[<p dir="auto">我发的：slot launch_slot_: id  1 | task -1 | sampler chain: logits -&gt; ?penalties -&gt; ?dry -&gt; ?top-n-sigma -&gt; top-k -&gt; ?typical -&gt; top-p -&gt; min-p -&gt; ?xtc -&gt; ?temp-ext -&gt; dist<br />
slot launch_slot_: id  1 | task 6822 | processing task, is_child = 0<br />
slot update_slots: id  1 | task 6822 | new prompt, n_ctx_slot = 95232, n_keep = 0, task.n_tokens = 30511<br />
slot update_slots: id  1 | task 6822 | n_past = 30273, slot.prompt.tokens.size() = 30505, seq_id = 1, pos_min = 30504, n_swa = 0<br />
slot update_slots: id  1 | task 6822 | Checking checkpoint with [30270, 30270] against 30273...<br />
slot update_slots: id  1 | task 6822 | restored context checkpoint (pos_min = 30270, pos_max = 30270, n_tokens = 30271, n_past = 30271, size = 149.626 MiB)<br />
slot update_slots: id  1 | task 6822 | n_tokens = 30271, memory_seq_rm [30271, end)<br />
slot update_slots: id  1 | task 6822 | prompt processing progress, n_tokens = 30507, batch.n_tokens = 236, progress = 0.999869<br />
slot update_slots: id  1 | task 6822 | n_tokens = 30507, memory_seq_rm [30507, end)<br />
slot init_sampler: id  1 | task 6822 | init sampler, took 2.71 ms, tokens: text = 30511, total = 30511<br />
slot update_slots: id  1 | task 6822 | prompt processing done, n_tokens = 30511, batch.n_tokens = 4<br />
slot create_check: id  1 | task 6822 | created context checkpoint 11 of 32 (pos_min = 30506, pos_max = 30506, n_tokens = 30507, size = 149.626 MiB)<br />
srv  log_server_r: done request: POST /v1/chat/completions 127.0.0.1 200<br />
reasoning-budget: deactivated (natural end)<br />
slot print_timing: id  1 | task 6822 |<br />
prompt eval time =     421.28 ms /   240 tokens (    1.76 ms per token,   569.69 tokens per second)<br />
eval time =    1775.41 ms /    66 tokens (   26.90 ms per token,    37.17 tokens per second)<br />
total time =    2196.70 ms /   306 tokens<br />
slot      release: id  1 | task 6822 | stop processing: n_tokens = 30576, truncated = 0<br />
srv  update_slots: all slots are idle<br />
srv  params_from_: Chat format: peg-native<br />
slot get_availabl: id  1 | task -1 | selected slot by LCP similarity, sim_best = 0.677 (&gt; 0.100 thold), f_keep = 1.000<br />
reasoning-budget: activated, budget=2147483647 tokens<br />
slot launch_slot_: id  1 | task -1 | sampler chain: logits -&gt; ?penalties -&gt; ?dry -&gt; ?top-n-sigma -&gt; top-k -&gt; ?typical -&gt; top-p -&gt; min-p -&gt; ?xtc -&gt; ?temp-ext -&gt; dist<br />
slot launch_slot_: id  1 | task 6890 | processing task, is_child = 0<br />
slot update_slots: id  1 | task 6890 | new prompt, n_ctx_slot = 95232, n_keep = 0, task.n_tokens = 45168<br />
slot update_slots: id  1 | task 6890 | n_tokens = 30576, memory_seq_rm [30576, end)<br />
slot update_slots: id  1 | task 6890 | prompt processing progress, n_tokens = 32624, batch.n_tokens = 2048, progress = 0.722281<br />
slot update_slots: id  1 | task 6890 | n_tokens = 32624, memory_seq_rm [32624, end)<br />
slot update_slots: id  1 | task 6890 | prompt processing progress, n_tokens = 34672, batch.n_tokens = 2048, progress = 0.767623<br />
slot update_slots: id  1 | task 6890 | n_tokens = 34672, memory_seq_rm [34672, end)<br />
slot update_slots: id  1 | task 6890 | prompt processing progress, n_tokens = 36720, batch.n_tokens = 2048, progress = 0.812965<br />
slot update_slots: id  1 | task 6890 | n_tokens = 36720, memory_seq_rm [36720, end)<br />
slot update_slots: id  1 | task 6890 | prompt processing progress, n_tokens = 38768, batch.n_tokens = 2048, progress = 0.858307<br />
slot update_slots: id  1 | task 6890 | n_tokens = 38768, memory_seq_rm [38768, end)<br />
slot update_slots: id  1 | task 6890 | 8192 tokens since last checkpoint at 30507, creating new checkpoint during processing at position 40816<br />
slot update_slots: id  1 | task 6890 | prompt processing progress, n_tokens = 40816, batch.n_tokens = 2048, progress = 0.903649<br />
slot create_check: id  1 | task 6890 | created context checkpoint 12 of 32 (pos_min = 38767, pos_max = 38767, n_tokens = 38768, size = 149.626 MiB)<br />
slot update_slots: id  1 | task 6890 | n_tokens = 40816, memory_seq_rm [40816, end)<br />
slot update_slots: id  1 | task 6890 | prompt processing progress, n_tokens = 42864, batch.n_tokens = 2048, progress = 0.948990<br />
slot update_slots: id  1 | task 6890 | n_tokens = 42864, memory_seq_rm [42864, end)<br />
slot update_slots: id  1 | task 6890 | prompt processing progress, n_tokens = 44652, batch.n_tokens = 1788, progress = 0.988576<br />
slot update_slots: id  1 | task 6890 | n_tokens = 44652, memory_seq_rm [44652, end)<br />
slot update_slots: id  1 | task 6890 | prompt processing progress, n_tokens = 45164, batch.n_tokens = 512, progress = 0.999911<br />
slot create_check: id  1 | task 6890 | created context checkpoint 13 of 32 (pos_min = 44651, pos_max = 44651, n_tokens = 44652, size = 149.626 MiB)<br />
slot update_slots: id  1 | task 6890 | n_tokens = 45164, memory_seq_rm [45164, end)<br />
slot init_sampler: id  1 | task 6890 | init sampler, took 4.16 ms, tokens: text = 45168, total = 45168<br />
slot update_slots: id  1 | task 6890 | prompt processing done, n_tokens = 45168, batch.n_tokens = 4<br />
slot create_check: id  1 | task 6890 | created context checkpoint 14 of 32 (pos_min = 45163, pos_max = 45163, n_tokens = 45164, size = 149.626 MiB)<br />
srv  log_server_r: done request: POST /v1/chat/completions 127.0.0.1 200<br />
reasoning-budget: deactivated (natural end)<br />
slot print_timing: id  1 | task 6890 |<br />
prompt eval time =   16677.88 ms / 14592 tokens (    1.14 ms per token,   874.93 tokens per second)<br />
eval time =    2132.32 ms /    79 tokens (   26.99 ms per token,    37.05 tokens per second)<br />
total time =   18810.20 ms / 14671 tokens<br />
slot      release: id  1 | task 6890 | stop processing: n_tokens = 45246, truncated = 0<br />
srv  update_slots: all slots are idle<br />
这是本次用到35%左右上下文时的日志， 后面是本次的启动参数，我主要拉长了一些上下文 # 杀死旧进程，等待3秒确保释放资源<br />
killall llama3-server 2&gt;/dev/null; sleep 3</p>
<h1>进入目录，启动优化后的服务（Hermes专属45分钟缓存保留，全局自动回收）</h1>
<p dir="auto">cd ~ &amp;&amp; LLAMA_SET_ROWS=0 ./llama3-server <br />
-m /data/models/Qwen3.6-27B-Omnimerge-v4-IQ4_NLmanni.gguf <br />
--mmproj /data/models/mmproj-Qwen_Qwen3.6-27B-f16.gguf <br />
--host 0.0.0.0 --port 12026 --fit on <br />
--ctx-size 105000 -n -1 \</p>
<h1>批处理拉满，3090算力最大化</h1>
<p dir="auto">--batch-size 8192 --ubatch-size 4096 \</p>
<h1>KV缓存最低量化，稳跑65000ctx</h1>
<p dir="auto">--cache-type-k q2_K --cache-type-v q2_K --cache-reuse 65000 \</p>
<h1>CPU满线程，速度核心</h1>
<p dir="auto">--parallel 1 --threads 10 --threads-batch 10 \</p>
<h1>生成质量优化（不影响速度）</h1>
<p dir="auto">--temp 0.85 --top_p 0.9 --top_k 24 --repeat_penalty 1.04 \</p>
<h1>服务/监控/模板</h1>
<p dir="auto">--metrics --jinja --seed 42 --cont-batching \</p>
<h1>思考模式保留</h1>
<p dir="auto">--reasoning-budget 768 --reasoning on --reasoning-format deepseek \</p>
<h1>===================== 核心优化：Hermes专属45分钟缓存保留 =====================</h1>
<p dir="auto">--max-slots 8 <br />
--slot-reclaim-timeout 2700 \ <br />
-ngl 99 -fa on <br />
--memory-usage high <br />
--max-batch-size 8192 <br />
--low-vram off <br />
--no-penalty-off <br />
--prompt-cache-full <br />
--no-check-tensors <br />
--log_file /tmp/fastllm-llm.log <br />
--metrics on   目前 的情况 我在nvtop里面看 GPU线和MEM线在运行的时候完美重合，满载时，最高 温度我看似乎是47度，这个温度我挺满意 的，不过如果还能降低一些就好了。，算是吃到了 算力+显存的甜点配置，但是日志里面看速度掉落到了38TOKENS/S  这种情况下，我应该如何优化及调整参数，以获得最大的上下文 + 均衡配置呢？</p>
]]></description><link>https://lcz.me/topic/103/分享-日常让豆包帮调llama.cpp参数的过程</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 07:04:44 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/103.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 May 2026 14:41:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 19:24:24 GMT]]></title><description><![CDATA[<p dir="auto">说说我的看法。小显存这么玩都是个 折腾。最后还是 大力出奇迹。 折腾也就是消磨了你的时间。这些经验其实都是应对这些没什么经济价值的娱乐项目。给自己找个事做。祝耍的愉快。复制你的技术再搞一遍的人就是不想打游戏。也想折腾一遍。</p>
]]></description><link>https://lcz.me/post/1081</link><guid isPermaLink="true">https://lcz.me/post/1081</guid><dc:creator><![CDATA[williamlouis]]></dc:creator><pubDate>Mon, 11 May 2026 19:24:24 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 19:04:12 GMT]]></title><description><![CDATA[<p dir="auto">标签系统（全览）</p>
<pre><code> | 标签 | 作用 |                                                                                                                                                                                              
 |------|------|                                                                                                                                                                                              
 | /no think | reasoning=none，不思考 casual模式默认没后缀就这个，如果确实需要LLM思考的话，用户会加/think|                                                                                                                                                                       
 | /think | reasoning=默认级别 本地主会话默认啥也不输入就这个，但是如果CPU判断这是简单消息的话，要加上 /no think|                                                                                                                                                                              
 | /deepp | 切 DeepSeek v4-pro，删标签，发消息（session级） |                                                                                                                                                 
 | /deepf | 切 DeepSeek v4-flash，删标签，发消息（session级） |                                                                                                                                               
 | /qwe | 切回 Qwen 3.6 27B，删标签，发消息给 Qwen（session级） |                                                                                                                                             
                                                                                                                                                                                                              
 每个标签只在消息末尾生效。模型切换不持久（新会话默认本地 Qwen）。                                                                                                                                            
 处理顺序                                                                                                                                                                                                     
                                                                                                                                                                                                              
 消息到达                                                                                                                                                                                                     
 │                                                                                                                                                                                                            
 ├─ Step 0: 简单任务预判（仅主会话 + 无任何后缀标签）                                                                                                                                                         
 │   ├─ &lt; 50 字符                                                                                                                                                                                             
 │   ├─ 不含代码块（）                                                                                                                                                                                        
 │   ├─ 不含文件路径、复杂技术词                                                                                                                                                                              
 │   └─ 匹配简单句型（你好/什么是/帮我查/今天...）                                                                                                                                                            
 │   → 命中 → 自动追加 /no think                                                                                                                                                                              
 │                                                                                                                                                                                                            
 ├─ Step 1: 提取末尾标签                                                                                                                                                                                      
 │   正则: /(no\s*think|think|deepp|deepf|qwe)$                                                                                                                                                               
 │                                                                                                                                                                                                            
 ├─ Step 2: 冲突检查                                                                                                                                                                                          
 │   /deepp /deepf /qwe 三者互斥 → 同时出现报错                                                                                                                                                               
 │   /no think /think 二者互斥 → 同时出现报错                                                                                                                                                                 
 │   模型标签 + 推理标签 → 可以共存                                                                                                                                                                           
 │                                                                                                                                                                                                            
 ├─ Step 3: 从 user_input 删除所有标签                                                                                                                                                                        
 │                                                                                                                                                                                                            
 ├─ Step 4: 模型切换（如有 /deepp /deepf /qwe）                                                                                                                                                               
 │   → 调用 switch_model()，session 级，不写 config                                                                                                                                                           
 │                                                                                                                                                                                                            
 ├─ Step 5: 决定 reasoning                                                                                                                                                                                    
 │   casual + auto_no_think + 无 /think → none                                                                                                                                                                
 │   有 /no think → none                                                                                                                                                                                      
 │   有 /think → 默认                                                                                                                                                                                         
 │   deepseek 模式 → 不介入，保持用户设置                                                                                                                                                                     
 │                                                                                                                                                                                                            
 └─ Step 6: self.chat(cleaned_message)                                                                                                                                                                        
                                                                                                                                                                                                              
 各模式行为矩阵                                                                                                                                                                                               
                                                                                                                                                                                                              
 | | casual | 主会话 | deepseek模式 |                                                                                                                                                                         
 |--|--------|--------|-------------|                                                                                                                                                                         
 | 无标签 | 自动 /no think | 自动判断简单→/no think | 深度思考（用户自控） |                                                                                                                                  
 | /no think | reasoning=none | reasoning=none | reasoning=none |                                                                                                                                             
 | /think | 覆盖，深度思考 | 深度思考 | 深度思考 |                                                                                                                                                            
 | /deepp | 切 v4-pro | 切 v4-pro | — |                                                                                                                                                                       
 | /deepf | 切 v4-flash | 切 v4-flash | — |                                                                                                                                                                   
 | /qwe | 切回 Qwen | 切回 Qwen | 切回 Qwen |                                                                                                                                                                 
 需要确认                                                                                                                                                                                                     
                                                                                                                                                                                                              
 DeepSeek 的模型名——deepseek-v4-pro 和 deepseek-v4-flash 是 API 里的实际 model ID 。我确认
</code></pre>
<p dir="auto">switch_model 的映射。<br />
改动的文件</p>
<pre><code> 1. ~/.hermes/config.yaml                                                                                                                                                                                     
    - custom_providers 加 deepseek 条目                                                                                                                                                                       
    - casual profile 加 auto_no_think: true                                                                                                                                                                   
                                                                                                                                                                                                              
 2. ~/.hermes/hermes-agent/cli.py                                                                                                                                                                             
    - 在 self.chat()` 前插入 ~60 行：标签检测 + 模型切换 + reasoning + 简单预判
</code></pre>
]]></description><link>https://lcz.me/post/1077</link><guid isPermaLink="true">https://lcz.me/post/1077</guid><dc:creator><![CDATA[Jame Huang]]></dc:creator><pubDate>Mon, 11 May 2026 19:04:12 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 18:43:38 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/7d3fffb3-b6a5-4dfd-8560-bfca667163b6.jpeg" alt="4f1b47e3-7d1c-46e4-9cdf-7bda6ee58b85-image.jpeg" class=" img-fluid img-markdown" /><br />
比较底层的修改，所以要慎重一些，上了pro模型</p>
]]></description><link>https://lcz.me/post/1075</link><guid isPermaLink="true">https://lcz.me/post/1075</guid><dc:creator><![CDATA[Jame Huang]]></dc:creator><pubDate>Mon, 11 May 2026 18:43:38 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 18:39:15 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/23252562-3382-46d5-92e9-d021320ab983.jpeg" alt="bc4d7500-a7b3-4fbc-95ee-42d91b606b97-image.jpeg" class=" img-fluid img-markdown" /><br />
qwen已经被撑爆了，再继续运行没有 意义，我只好换deepseek v4 PRO,这里来个题外话，感觉生产力，还是deepseek香啊 。拿 flash狂造都可以</p>
]]></description><link>https://lcz.me/post/1074</link><guid isPermaLink="true">https://lcz.me/post/1074</guid><dc:creator><![CDATA[Jame Huang]]></dc:creator><pubDate>Mon, 11 May 2026 18:39:15 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 18:32:32 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/d429b729-211f-4329-82e3-2074807d98f2.jpeg" alt="c1441919-628b-4890-9ae4-f64a82b3331f-image.jpeg" class=" img-fluid img-markdown" /> 满了，这就 是马儿跑得慢的原因，所以问了3个AI，最后还是豆包胜，通过改chat_template, 在提示词中加入 /no think结尾，来禁止AI过度思考。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/251694bb-c6fe-4d37-b790-8a1332d1ed7b.jpeg" alt="ddbe4cb6-0b79-4295-9f40-02512e7e9507-image.jpeg" class=" img-fluid img-markdown" /> 这里如果不用/no think结尾 ，起码要20多秒吧，浪费算力。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/040b78dc-7783-404c-9744-386355f556ab.jpeg" alt="1e7a4232-7ad4-48dc-88cc-aea38f4fc3f5-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/1073</link><guid isPermaLink="true">https://lcz.me/post/1073</guid><dc:creator><![CDATA[Jame Huang]]></dc:creator><pubDate>Mon, 11 May 2026 18:32:32 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 15:36:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jame-huang" aria-label="Profile: Jame-Huang">@<bdi>Jame-Huang</bdi></a> 666</p>
]]></description><link>https://lcz.me/post/1048</link><guid isPermaLink="true">https://lcz.me/post/1048</guid><dc:creator><![CDATA[jcwb520]]></dc:creator><pubDate>Mon, 11 May 2026 15:36:31 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 15:14:19 GMT]]></title><description><![CDATA[<p dir="auto">问： 我显存的峰值占用似乎在23.23G，剩下几百MB，峰值时回复速度掉到了38.5T/S，我现在是在等45分钟把我网页端 占的那些slot 释放<br />
豆包： 先把你当前现状一句话看透<br />
显存顶到 23.23G 只剩几百 MB 余量 = 直接踩 3090 24G 物理红线<br />
不是算力不够，是显存完全塞满、无缓冲空余，llama.cpp 会微量把 KV 碎片往系统内存蹭、显存控制器满载拥堵，直接从 43 掉到 38.5 token/s，完全是显存溢出边界的典型降速。<br />
你现在做法完全正确：不动 Hermes 会话，等 45 分钟超时把网页端多余 slot 自动释放，显存回落、碎片清空后，速度会自动回弹回 42~43 T/S。<br />
现在网页端残留 slot 占着 KV 槽位，堆高了显存峰值，只要这些闲置 slot 释放掉，立马恢复满血。<br />
一、为什么撑到 23.23G 就必掉速？<br />
27B 模型 + mmproj 固定打底约 15.6G<br />
多 slot 叠加 KV 缓存 + 105k 超大上下文 + q2_K KV 量化<br />
吃到 23.23G 几乎占满 24G，没有预留显存缓冲区<br />
llama.cpp 瞬时申请不到显存 → 内存映射 / 页交换 → 生成 token 延迟拉高 → 锁死 38.5<br />
nvtop GPU/MEM 重合 = 带宽已经 100% 跑满，再堆 KV 只能降速<br />
二、现在不用干等 45 分钟，可手动加速释放（不重启、不影响 Hermes）<br />
你不用硬生生等满 45 分钟，现在做两步就能提前回落显存：<br />
关闭网页端所有闲置对话标签，只留 Hermes；<br />
静置 5~10 分钟不发新请求，闲置 slot 会进入完整 idle 状态；<br />
llama.cpp 会主动压缩 KV 碎片、回收空闲槽位显存，不用等到 45 分钟超时也能回落。<br />
重点：Hermes 的 127.0.0.1 会话只要有交互，slot 会持续续期，永远不会被回收，完全不影响你继续问问题。<br />
三、根治方案：以后永远不让显存冲到 23.23G、稳定不掉速<br />
核心思路：保留 Hermes 45 分钟长驻、保留 105000 大上下文，限制最大 slot 数量，卡死显存峰值不碰红线<br />
关键改 2 个参数即可（其他全保留）<br />
--max-slots 8 → 改成 --max-slots 4你日常就只用 Hermes + 偶尔网页端，4 个槽位完全够用；直接限制最多只开 4 个会话 KV 槽，从根源杜绝 slot 堆积撑满 23G 显存，峰值会锁在 21.5~22G，留 1G + 安全缓冲，再也不会踩内存边界掉速。<br />
保持 --slot-reclaim-timeout 2700 不动Hermes 依旧 45 分钟续期不回收，网页端闲置照样 45 分钟自动清，逻辑不变。<br />
顺带适配你 105k 上下文的配套小修正<br />
--cache-reuse 105000 必须和 --ctx-size 105000 对齐（你之前已经拉了 ctx，这个要跟上）<br />
--ubatch-size 2048 维持不变，降低瞬时 KV 显存尖峰<br />
四、改完后的稳态效果<br />
显存峰值锁死 21.5~22G，留有充足缓冲，不会再顶到 23.23G；<br />
生成速度稳定 42~43 token/s，不再掉到 38.5；<br />
Hermes 本地会话永久长驻、自动续期；<br />
网页端闲置 slot 45 分钟自动清；<br />
温度依旧 47℃ 完美不变，不升温、不用降功耗。<br />
五、你现在当下建议<br />
继续正常跟 Hermes 对话，不用停；<br />
关掉网页端不用的对话，静置一会，等闲置 slot 逐步释放，显存回落、速度自动回弹；<br />
下次重启服务时，把 --max-slots 8 改成 --max-slots 4 即可，一劳永逸解决显存撑满掉速问题。<br />
我可以直接给你改好最终版完整启动脚本，你下次复制替换就行，要吗？</p>
]]></description><link>https://lcz.me/post/1044</link><guid isPermaLink="true">https://lcz.me/post/1044</guid><dc:creator><![CDATA[Jame Huang]]></dc:creator><pubDate>Mon, 11 May 2026 15:14:19 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 14:59:42 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/bdf1a40a-0348-44f7-b9c9-1759ce29a665.jpg" alt="girl3334.jpg" class=" img-fluid img-markdown" /> 美少女客串一下。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/3f4849a1-ea58-4e3b-9a30-a3c2f25e7e67.png" alt="8999aa.png" class=" img-fluid img-markdown" /> 视觉能力调戏千问。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/22d41daf-ca03-438a-83a1-98ff02064da0.png" alt="999-10aa.png" class=" img-fluid img-markdown" /> 回复43 T/S，稳。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/7cd52a7e-29c4-4a91-8b8f-8f77bcc3152d.png" alt="1111aa.png" class=" img-fluid img-markdown" /> NVTOP图，截得有点晚了。 我的UBUNTU24.04，安装了cooler controld的 ，按结点温度疯狂压制，风扇不到100元吧，狠狠的给我转起来！</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/dcbdb9d3-51fe-48bf-8394-62ec61f0243f.png" alt="ELVENT344.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/1042</link><guid isPermaLink="true">https://lcz.me/post/1042</guid><dc:creator><![CDATA[Jame Huang]]></dc:creator><pubDate>Mon, 11 May 2026 14:59:42 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 14:50:47 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/72ff3369-a498-4583-b4c1-3ccfcf3a91dd.png" alt="111aa.png" class=" img-fluid img-markdown" /><br />
<img src="https://upload.lcz.me/uploads/4e4867cc-b392-415b-bd87-31bf93be1d82.png" alt="222aa.png" class=" img-fluid img-markdown" /><br />
<img src="https://upload.lcz.me/uploads/87ffefe4-824b-4631-ac0b-1bb828c32a5c.png" alt="333aa.png" class=" img-fluid img-markdown" /><br />
<img src="https://upload.lcz.me/uploads/deac4e1c-cf0c-4f11-87ee-dde64f042358.png" alt="444aa.png" class=" img-fluid img-markdown" /> 目前看来，速度是稳的， 这里介绍一下，我用模型是   <a href="https://hf-mirror.com/ManniX-ITA/Qwen3.6-27B-Omnimerge-v4-GGUF/tree/main" rel="nofollow ugc">https://hf-mirror.com/ManniX-ITA/Qwen3.6-27B-Omnimerge-v4-GGUF/tree/main</a> 模型大小 为15.8GB，按作者页面，去 <a href="https://hf-mirror.com/bartowski/Qwen_Qwen3.6-27B-GGUF" rel="nofollow ugc">https://hf-mirror.com/bartowski/Qwen_Qwen3.6-27B-GGUF</a> 下载了 928MB的视觉文件，这些就 是权重的基础了。 我这样，是可以 用模型识别图片的，下面给出识别图片的测试。</p>
]]></description><link>https://lcz.me/post/1041</link><guid isPermaLink="true">https://lcz.me/post/1041</guid><dc:creator><![CDATA[Jame Huang]]></dc:creator><pubDate>Mon, 11 May 2026 14:50:47 GMT</pubDate></item><item><title><![CDATA[Reply to 分享：日常让豆包帮调llama.cpp参数的过程 on Mon, 11 May 2026 14:47:30 GMT]]></title><description><![CDATA[<p dir="auto">豆包回复： 我先给你核心结论：你的当前状态极其完美：GPU / 显存满载重合 = 算力 / 显存利用率拉满（3090 完全吃满），温度 47℃是3090 满载的天花板级低温（完全不用降温，强行降温会掉速）；速度从 43→38 token/s，唯一原因是你把上下文从 65000 拉到 105000，KV 缓存体积暴涨，榨干了 3090 的显存带宽（这是物理瓶颈，不是参数问题）。<br />
我给你的优化方案：完全保留 105000 最大上下文，仅微调 3 个核心参数，不牺牲温度、不降低显存利用率，把速度拉回 40~42 token/s，实现「最大上下文 + 速度均衡」的最优解。<br />
一、掉速核心原因（精准对应你的日志）<br />
从日志能直接看到：<br />
Prompt 处理速度极快（874 token/s）：CPU 喂数据、GPU 加载模型无任何瓶颈；<br />
生成速度掉到 38：105000 上下文 → KV 缓存大小比 65000 增加61%，3090 的 GDDR6 显存带宽被完全占满，生成时每生成一个 token，都要读写更大的 KV 缓存，速度自然小幅下降；<br />
GPU/MEM 线重合：证明没有算力浪费，是纯带宽瓶颈，优化空间仅在「减少带宽浪费」。<br />
二、3 个必改优化参数（不缩 ctx，拉回速度）<br />
所有修改完全保留 105000 上下文、45 分钟 Hermes 缓存、满载温度 47℃，仅优化带宽 / 线程效率：<br />
表格<br />
原参数	问题	优化后参数	作用<br />
--cache-reuse 65000	上下文已改 105000，缓存复用不匹配，浪费带宽	--cache-reuse 105000	强制 KV 缓存与上下文完全匹配，消除重复计算<br />
--ubatch-size 4096	105k ctx 下微批处理过大，增加带宽压力	--ubatch-size 2048	降低小批处理开销，生成速度直接回升<br />
--threads 10 / --threads-batch 10	i5-10600 只有 6 核 12 线程，10 线程会 CPU 争抢，拖慢 GPU	--threads 8 / --threads-batch 8	CPU 甜点线程，无争抢，稳定喂数据给 GPU<br />
三、优化后的完整启动脚本（直接复制用）<br />
保留你所有核心配置（105000 上下文、Hermes45 分钟缓存、Flash Attention、全量 GPU 加载），仅修改上述 3 个参数，清理冗余：<br />
bash<br />
运行</p>
<h1>杀死旧进程，等待3秒确保释放资源</h1>
<p dir="auto">killall llama3-server 2&gt;/dev/null; sleep 3</p>
<h1>最大上下文105000 + 速度均衡优化（3090甜点配置）</h1>
<p dir="auto">cd ~ &amp;&amp; LLAMA_SET_ROWS=0 ./llama3-server <br />
-m /data/models/Qwen3.6-27B-Omnimerge-v4-IQ4_NLmanni.gguf <br />
--mmproj /data/models/mmproj-Qwen_Qwen3.6-27B-f16.gguf <br />
--host 0.0.0.0 --port 12026 --fit on <br />
--ctx-size 105000 -n -1 \</p>
<h1>批处理优化（适配105k上下文，降低带宽压力）</h1>
<p dir="auto">--batch-size 8192 --ubatch-size 2048 \</p>
<h1>KV缓存完全匹配105k上下文，无浪费</h1>
<p dir="auto">--cache-type-k q2_K --cache-type-v q2_K --cache-reuse 105000 \</p>
<h1>CPU甜点线程（i5-10600 最优值，无争抢）</h1>
<p dir="auto">--parallel 1 --threads 8 --threads-batch 8 \</p>
<h1>生成质量（不动，不影响速度）</h1>
<p dir="auto">--temp 0.85 --top_p 0.9 --top_k 24 --repeat_penalty 1.04 \</p>
<h1>服务配置（不动）</h1>
<p dir="auto">--metrics --jinja --seed 42 --cont-batching \</p>
<h1>思考模式（不动）</h1>
<p dir="auto">--reasoning-budget 768 --reasoning on --reasoning-format deepseek \</p>
<h1>Hermes 45分钟缓存保留（不动）</h1>
<p dir="auto">--max-slots 8 <br />
--slot-reclaim-timeout 2700 \</p>
<h1>GPU核心加速（不动）</h1>
<p dir="auto">-ngl 99 -fa on <br />
--memory-usage high <br />
--max-batch-size 8192 <br />
--low-vram off <br />
--no-penalty-off <br />
--prompt-cache-full <br />
--no-check-tensors <br />
--log_file /tmp/fastllm-llm.log<br />
四、优化后预期效果<br />
速度：从 38 → 40~42 token/s（回升 3~4 token，接近原 65k 上下文的速度）；<br />
上下文：完全保留 105000 最大上下文；<br />
硬件：GPU/MEM 依然满载重合，温度稳定 47℃（不升不降）；<br />
缓存：Hermes 本地请求 45 分钟自动续期，外部请求自动回收；<br />
显存：依旧稳定 20.4G，不爆显存。<br />
五、额外小贴士（针对你的硬件）<br />
温度 47℃无需优化3090 满载运行 47℃是顶级散热水平，强行降功耗 / 风扇转速，会直接导致 GPU 降频，速度掉到 35 以下，得不偿失。<br />
不要再提升 batch-size你已经设到 8192，是 3090 24G + 27B 模型的极限值，再大会爆显存 / 带宽溢出。<br />
若追求极致速度可把 ctx-size 从 105000 → 95000，速度能直接回到 43 token/s，上下文仅损失 10k，几乎无感知（这是 3090 24G + 27B 模型的终极甜点配置）。<br />
总结<br />
掉速是105k 上下文的显存带宽物理瓶颈，不是参数错误；<br />
仅改 3 个参数，保留最大上下文，速度拉回 40~42；<br />
47℃满载温度完美，不用做任何降温调整；<br />
脚本直接运行，就是 3090 24G + 27B 模型的最优均衡配置。   我直接按它的原样启动不墨迹。</p>
]]></description><link>https://lcz.me/post/1040</link><guid isPermaLink="true">https://lcz.me/post/1040</guid><dc:creator><![CDATA[Jame Huang]]></dc:creator><pubDate>Mon, 11 May 2026 14:47:30 GMT</pubDate></item></channel></rss>