GoForum › 🌐 V2EX
lama.cpp 目前有重大性能 bug: checkpoint 的巡回逻辑对于混合模型(比如 qwen3.6-27B)无效,从而导致大概率每次对话都要 prefill 全文,严重拖慢速度
sentinelK ·
2026-06-12 09:33 ·
0 次点赞 · 9 条回复
在昨天研究 qwen3.6-27B 的优化时,看到了这个问题:server: fix context checkpoint restore for hybrid/recurrent models (DeltaNet/Mamba)
大概意思就是,因为 llama.cpp 的缓存巡回逻辑有问题,导致你 n 次调用大模型( n>1 )时,大概率 llama.cpp 找不到之前的对话,会从头再次 prefill 你的对话全文。
翻译成大白话讲,就是你对一个人,每多说一句话,就要从第一句开始重复一遍。
更为悲惨的是: 在 5 月份,llama.cpp 制作组引入了另外一个 checkpoint 逻辑,使得缓存巡回性能再次下降:Commit e98cb51
经过此帖中大神实测,NVIDIA RTX PRO 6000 Blackwell 在运行 qwen3.6-27B Q8 时,上下文 50K 的长度下,每次请求 LLM 都会浪费 40 秒:
3 consecutive full re-processings logged:
┌───────────┬────────────────────┬───────┐
│ Turn │ Tokens reprocessed │ Time │
├───────────┼────────────────────┼───────┤
│ Task 2795 │ 67,608 │ 38.4s │
├───────────┼────────────────────┼───────┤
│ Task 3241 │ 71,211 │ 41.0s │
├───────────┼────────────────────┼───────┤
│ Task 3401 │ 71,105 │ 41.4s │
└───────────┴────────────────────┴───────┘
Root cause visible in logs: The new prompt is ~19k tokens, but all checkpoints sit at positions 39k–71k (from previous longer requests). Every checkpoint
is checked against 19340 and rejected because they're all beyond the new prompt length. Result: 0 usable checkpoints → full reprocess from BOS.
结论是,目前的 llama.cpp+qwen3.6-27B 这个组合,在 Agent 工具这个场景下,性能不可用。
目前此 issues 还是 open 状态,待修复。
9 条回复
@zzutmebwd 本人用 vllm 运行 nvfp4 ,不知为何总是启动的时候直接拉崩整个 wsl……日志能看到的都是 OOM ,不清楚 vLLm 到底在干什么……
@sentinelK 你都跑 ai 了,还用 windows 吗? hhh ,不是强词夺理哈,确实是很奇怪的选择。
@zzutmebwd 肯定不是性能最优解,只是 all in one 的一个玩具妥协产物,不过确实如此,用 windows+wsl 掣肘太多。
@sentinelK 是的,我的配置和你是一样的,我是主机 ubuntu 跑 ai 和服务,虚拟机 windows ,windows 直通 cpu 核显平时用用,也很流畅。
@zzutmebwd 不错的思路,反过来确实听上去也合理,回头尝试下
添加回复
你还需要 登录
后发表回复
都用 NVIDIA RTX PRO 6000 Blackwell 了,还用什么 llama.cpp… 个人认为 llama.cpp 就是跑在洋垃圾显卡的聊天工具…跑 agent 什么的老老实实 vllm