You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. I have searched related issues but cannot get the expected help.
2. The bug has not been fixed in the latest version.
3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
Activity
grimoire commentedon Oct 4, 2025
感谢汇报
这确实算是一个 bug。ModelInputs.split 是用来处理超长 prefill 的分块计算的,max_kv_seqlen 的初始值应该是历史长度+当前轮 q_seqlen。不过从 self.history_lengths 可能涉及到一次 host-device 同步,不算最好的解决方案,从原本的 max_kv_seqlen 和 max_q_seqlen 进行换算会比较好。我们会尽快修复,或者如果你有这个意向的话也欢迎提 PR。
另外这个值目前主要的用处是 attention 的 grid 以及 kv cache 的一些资源分配,超量分配会造成少量的浪费,但是不会对精度和性能造成太多影响。
[Bugfix] Fix double-counted max_q_seqlen in decode delta kv_seqlens
[Bugfix] Fix double-counted max_q_seqlen in decode delta kv_seqlens
[Bugfix] Fix double-counted max_q_seqlen in decode delta kv_seqlens (#…