AISpot
所屬事件:llama.cpp 統一 KV 快取改用 kv_rows 切片並修復零行(1 個來源 · 2 則報導)

2026 年 11 月 2 日至 3 日,llama.cpp 合併兩項統一 KV 快取改動。11 月 2 日的 b12059 合併 #29510,把多序列統一 KV 快取從稠密 KQ mask 改為 kv_rows 切片,以提升 flash attention 效率:每個序列維護一份 cell 點陣圖,按置位順序生成… 看完整事件

llama.cpp 修復共享 KV cache 時 kv_rows 返回 0 的問題

llama.cpp releases版本更新地端推論開源

llama.cpp 發布 b12065,修復了共享 KV cache 的序列在還沒有任何 cell 時 get_n_kv_rows() 返回 0 的問題。這類 cache 會複用另一個 cache 的 cells(例如 gemma4 assistant),因此當服務預熱階段提前建置圖時,它會被誤判為不使用 kv_rows,從而回退到 dense KQ mask 並讓排程器重新規劃;此後建置掩碼更大的圖時,在 GGML_SCHED_DEBUG_REALLOC=1 下會中止。

原標題:b12065
閱讀原文

同一事件共有 2 則報導(1 個來源),看事件全貌

評分42 / 42(平均 42,門檻 60)
狀態未入選

原文

kv-cache : never return 0 kv_rows for sequences without cells ( #31570 ) A cache that shares the cells of another one (f.ex. the gemma4 assistant) can build a graph before its sequences have any cells, f.ex. at the server warmup. get_n_kv_rows() then returned 0, which means that kv_rows are not used, so the graph fell back to the dense KQ mask and the scheduler re-planned for it. Later graphs with larger masks then aborted with GGML_SCHED_DEBUG_REALLOC=1. Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/63009461 macOS/iOS: macOS Apple Silicon (arm64) macOS Apple Silicon (arm64, KleidiAI enabled) DISABLED macOS Intel (x64) iOS XCFramework Linux: Ubuntu x64 (CPU) Ubuntu arm64 (CPU) Ubuntu s390x (CPU) Ubuntu 26.04 s390x (CPU) Ubuntu 26.04 s390x (zDNN) Ubuntu x64 (Vulkan) Ubuntu arm64 (Vulkan) Ubuntu x64 (CUDA 12) - CUDA 12.8 libraries Ubuntu x64 (CUDA 13) - CUDA 13.4 libraries Ubuntu arm64 (CUDA 13) - CUDA 13.4 libraries Ubuntu x64 (ROCm 10.0) Ubuntu x64 (OpenVINO) Ubuntu x64 (SYCL FP32) Ubuntu x64 (SYCL FP16) Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Android: Android arm64 (CPU) Android arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Windows: Windows x64 (CPU) Windows arm64 (CPU) Windows arm64 (OpenCL Adreno) Windows x64 (CUDA 12) - CUDA 12.4 DLLs Windows x64 (CUDA 13) - CUDA 13.4 DLLs Windows arm64 (CUDA 13) - CUDA 13.4 DLLs Windows x64 (Vulkan) Windows arm64 (Vulkan) Windows x64 (OpenVINO) Windows x64 (SYCL) Windows x64 (ROCm 10.0) openEuler: DISABLED openEuler x86 (310p) openEuler x86 (910b, ACL Graph) openEuler aarch64 (310p) openEuler aarch64 (910b, ACL Graph) UI: UI

相關報導

llama.cpp releasesAI 評分48

llama.cpp 修復 k-pool 模型圖重分配導致的解碼中止

llama.cpp 發布 b11412,修復 k-pool 模型(qwen4exp、glm5-next)解碼時意外重新預留計算圖並中止的問題。原因是兩模型按 cache_safe、n_tokens 等 reserve 無法預知的狀態分支,解碼圖與預留圖節點數不一致(如 7564 對 7762),解碼時被迫按當前狀態重預留、丟掉最壞情況尺寸,在 GGML_SCHED_DEBUG_REALLOC=1 下直接 abort。

llama.cpp releasesAI 評分40

llama.cpp b11600 修復 T5 無快取注意力的 KQ 偏置填充

llama.cpp 發布建置 b11600,主要修復無快取注意力中 KQ 偏置未填充的問題:T5 會額外加入形狀為 [n_tokens, n_tokens] 的相對位置偏置,當 n_tokens 不能整除填充後的寬度時,與 KQ 相加會失敗,現在按 K、V 的做法用零把偏置填充到 mask 的 KV 維度。

llama.cpp releasesAI 評分47

llama.cpp b11411 修復 KV cache 旋轉後設資料不匹配問題

llama.cpp 發布 b11411,修復恢復 KV cache 時 rotation 後設資料不匹配的問題:現在會儲存精確的 rotation 後設資料,並拒絕恢復與之不匹配的快取。原先的 state rotation 測試被移入 test-save-load-state,納入儲存/載入測試矩陣,對所有受測模型執行,並探測模型支援的 KV cache 型別組合,不使用 attention rotation 的模型視為空通過。