fix(pd): recover paused decode requests without restarting generation - #1562
Draft
sufubao wants to merge 2 commits into
Draft
fix(pd): recover paused decode requests without restarting generation#1562sufubao wants to merge 2 commits into
sufubao wants to merge 2 commits into
Conversation
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.
PD Decode 显存不足时,旧实现会结束当前分段,由 Master 拼接已生成文本、重新分词并发起下一段请求。已经开始输出的回答因此再次经过资源接纳,可能被限流或超时中断。
本改动用原请求的暂停与 KV 恢复替换分段生成,取代已撤回的 #1561:
LIGHTLLM_PD_REQUEST_TIMEOUT_SECONDS默认 1800 秒,负值关闭;旧续跑资源等待配置不再控制该流程。需同步更新并重启 Master、P、D 及所有工作进程,不能混用旧版传输协议。该改动保留已有实际传输超时,不替代客户端/网关超时,也没有增加 SSE 心跳。
验证:
git diff --check通过。按用户要求未提交单元测试变更。test_pd_dynamic_split.py中 4 项断言仍要求容量不足时结束分段,与删除的行为绑定,执行时失败;未将它们计入通过项。在 8×H100 80GB、2P1D、MTP 的同配置服务上,完成 3189 请求的 timestamp 回放(20% session sample、相同 seed、1000 VU)。各行是独立单轮运行:
cd2edb908e5944def7eeab04当前版本回放期间每秒采集 D 指标,1920 条样本中暂停数均为 0。采样不能排除短暂暂停,但没有证据证明上述差异来自恢复优化;运行波动、物理节点和输出集合也可能影响结果。因此不声明此改动已解决整体性能问题。
专项 GPU 验证(同一
f7eeab04、8×H100、2P1D、Qwen3.5 hybrid attention + DSpark MTP):这些检查验证了该文本负载上的真实 GPU 恢复和取消,不保证过载时无停顿,也不是逐 token 数值/质量等价验证。日志轮询存在批次缺口,以上证据来自实际捕获记录,完整角色日志保存在 AFS。所有实验通过
exp归档。保持草稿:图片、音频等多模态资源在 GPU 恢复中的专项覆盖,以及更广泛的模型兼容性验证尚未完成。
基于最新
upstream/main(cd2edb90),已适配 #1559 的 hybrid checkpoint /att_state接口并重新验证。