xLLM Notes
Engineering Knowledge Base

xLLM Notes

围绕 xLLM 推理框架的特性设计报告、PR 评审与知识沉淀。每篇为自包含 HTML,支持离线打开与打印导出。

设计报告 & PR 评审 reports/

围绕某个特性或 PR 的一次性快照:架构、工作流、接口、验证与风险。

Qwen3.5 Linear-State Prefix Cache

为 GDN linear-attention 模型引入 recurrent state 的前缀缓存:checkpoint 索引、chunk-strided 独立 hash 域、跨 leaf 复用与 worker 侧 restore。

PR #1839 2026-07-08 Feature Design

知识沉淀 notes/

跨 PR 的原理、踩坑与方法论,会随认识加深持续更新。

xLLM NPU 推理执行主干

一次 forward 从调度到采样穿过的四段流水线:step → prepare → forward → sample,外加 MTP 投机分支与 ACL Graph 的 capture/replay。

Note Runtime 2026-07-08
KV Cache Block 管理架构

从 BlockManagerPool 到 Block 句柄的分层地图:谁分配物理 block、谁只是引用计数句柄、prefix cache / composite / hierarchy / linear-state slot 各自的职责。

Note Memory 2026-07-08
Linear-State Prefix Cache 内部机制

GDN recurrent state 无法零拷贝共享:save 走 scheduler 零拷贝换手(promotion),restore 走 worker 侧真拷贝,加上四字段 scheduler↔worker 契约的字段必要性论证。

Note Linear State 2026-07-08