返回全部动态

llama.cpp b11936:k-pool 稀疏选择与 kq_mask 形状解耦

原标题:b11936

llama.cpp Releases一手来源开源质量 69

AI 摘要

llama.cpp 发布 b11936 版本,核心改动是将 k-pool 稀疏选择(sparse selection)的构建与 kq_mask 的形状解耦:qwen4exp(QSA)和 glm5-next 按索引选取缓存单元,不再读取 kq_mask 值,选择张量改为基于缓存单元的 [n_kv, n_tokens] 布局,并在注意力计算前拆分为 K 视图的流。该改动使稠密 mask 可以改变布局(如按序列的行列表)而不影响稀疏层,同时清理了未使用的 build_fused_top_k_mask 参数。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

<details open> llama : build the k-pool sparse selection independently of the kq_mask shape (#31243) * llama : build the k-pool sparse selection independently of the kq_mask shape qwen4exp (QSA) and glm5-next pick cache cells by index and no longer read the kq_mask values, but they still shaped the selection like the dense kq_mask. Build the selection as [n_kv, n_tokens] over the cache cells instead, and split it into the streams of the K view right before the attention. This lets the dense


发布时间:2026-10-28 04:11
抓取时间:2026-10-28 04:47
来源机构:ggml-org
阅读原文github.com