返回全部动态

llama.cpp b11227:修复 causal_attn 切换导致的调度器重复预留

原标题:b11227

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

AI 摘要

llama.cpp 发布 b11227 版本,核心改动是修复 llama_context::set_causal_attn() 在切换 causal_attn 标志时每次都触发调度器完整重新预留(sched_reserve)的问题。由于 Gemma 模型处理视觉输入时每个非因果图像块会两次翻转该标志,导致每张图片产生两次昂贵的重新预留,多图或视频输入尤为缓慢。修复后 H200 与 RTX 4090 上多图场景延迟最高分别降低约 3.4 倍和 7.6 倍,生成输出保持不变。

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

正文节选

<details open> context : do not re-reserve the scheduler when toggling causal_attn (#28751) * context : do not re-reserve the scheduler when toggling causal_attn `llama_context::set_causal_attn()` marks the scheduler to do a full re-reserve on every change of the flag. For vision inputs, this flag is flipped twice around each non-causal image chunk for Gemma models, resulting in two expensive `sched_reserve()` passes per image. This is especially slow for multi-image or video inputs. The cos


发布时间:2026-09-28 17:29
抓取时间:2026-09-28 17:39
来源机构:ggml-org
阅读原文github.com