Repository navigation
Conversation
sufubao
marked this pull request as ready for review
October 13, 2026 05:45
sufubao
requested review from
hiworldwzj and
shihaobai
and removed request for
shihaobai
October 13, 2026 05:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为 GDN 和 GLM-5.3-FLASH KDA 增加可选的
compact/replay状态存储,减少 MTP 的逐 token SSM 快照;默认保持native。同时提供显式启用的 GDN MTP 并行求解路径,在相同 MTP 配置与资源容量下提升 Qwen3.5-27B 的端到端吞吐。实现
compact保存当前轮输入并合并接受前缀,要求启用 MTP;replay保留一个 checkpoint 和有界历史,溢出前 fold。GDN/KDA 共用启动校验在native、compact、replay三种模式下统一要求mtp_step <= 15,与接受提交算子的最大 verify 宽度 16 对齐;replay 的缓存容量另行校验,扩大cache_len不会放宽 MTP 宽度上限。接入 prefill、普通 decode、固定/动态 MTP、CPU checkpoint 和 PD 生命周期,保留 GLM indexer tail。--ssm_state_mode native|compact|replay和 replay 专用的--ssm_replay_configJSON 对象,字段为cache_len、compute_mode、fold_method,默认分别为16、inline、raw。拒绝未知字段、非法组合及非 replay 模式的非空配置。--ssm_state_mode replay --ssm_replay_config '{"compute_mode":"parallel","fold_method":"derived"}'启用 BF16 GDN MTP、128×128 heads 的 Tensor Core 三角求解,并复用 FP32 历史 keys/deltas 进行矩阵 fold。仅设置"compute_mode":"parallel"时仍使用默认rawfold。sglang-kernel 0.4.5中新增的默认参数,修复多模态 P 节点初始化失败;回归测试直接覆盖 FA3,避免自动回退到 Triton 掩盖接口错误。H200 端到端复测
对照提交
3af33c2f47f1738e17eb70a3c1e8f42e25ed65ed。同一 H200 GPU5、Qwen3.5-27B、TP1、MTP4、BF16 SSM、L16、264 请求容量和 65536 KV-token 容量。候选启用parallel + derived,其余计算配置一致。两边均使用正常 API 入口,各预热 2 轮、正式测量 12 轮;并发 128、每请求固定输出 384 token、greedy、关闭 thinking、禁用 prompt-cache 查询。吞吐提升 23.01%,独立 bootstrap 95% 区间 [21.26%, 24.52%]。两臂各 1536 个正式请求,全部 1179648 个输出 token 的 logprob 有限,无 prompt-cache 命中,无 HW/SW 热降频。每 verify step 输出 token 数为 3.1833 / 3.1773。
这是同卡先基线、后候选的顺序独立运行,不是交替配对;区间不覆盖阶段间系统漂移。该提升仅对应本次主场景,不能外推至所有负载。扩展图会改变实际显存占用,相同容量不表示显存逐字节相同。此前原 PR 的 GLM TP8 实际服务实验收益接近噪声范围,不据此声明普遍加速。
精度与验证
Replay 与 native BF16 的舍入边界不同;parallel 投影和 derived fold 进一步改变求值顺序,不能保证生成 token 逐项一致。此前全量 GSM8K 1319 题,正常入口候选 1278/1319、历史原 PR 1279/1319(截断 8/6),准确率差 −0.0758 个百分点,配对 bootstrap 95% 区间 [−0.3791,+0.2274] 个百分点;不构成严格无损证明。本次清理后仅重测吞吐,未重跑 GSM8K。
logits_row_stride失败;补齐后 autotune/采样 74 项复测全部通过,无遗留失败。计数有复测重叠,不相加。git diff --check。