返回全部动态

llama.cpp 新增 Granite-Switch 架构,支持逐 token LoRA 切换

原标题:b10342

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

AI 摘要

llama.cpp 新增 Granite-Switch 架构后端,支持带多个 LoRA 适配器的模型,通过控制 token 实现逐 token 切换。该实现采用路由注意力机制在图中恢复适配器索引,解决了并发序列隔离问题,但存在单序列内无法回退的已知限制。目前支持 CPU 和 Mac (Metal) 构建,并已通过相关测试。

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

正文节选

<details open> model : Granite-Switch Architecture (#25107) * granite-switch: add llama.cpp backend (POC, CPU) New "granite-switch" architecture: a dense, all-attention Granite-4.1 model with N embedded LoRA adapters selected per-token by control tokens. - gguf-py schema (arch, KV keys, stacked LoRA tensor names) + writer helpers - conversion/granite.py: GraniteSwitchModel converter (stacks N adapters + zero base slot into per-projection A/B tensors; emits switch metadata) - C++ arch regis


发布时间:2026-08-10 20:47
抓取时间:2026-08-10 21:06
来源机构:ggml-org
阅读原文github.com