跳到正文
Hao AI Lab· @haoailab · X·· 2 小时前AI 评分42
AI 导读

vLLM 在混合模型开启细粒度前缀匹配时,会在缓存块尚未写入就标记为可复用,导致同一步内第二个请求过早复制到全零块并从零继续,错误块还会留在缓存中被后续请求复用,而响应看起来一切正常。在 GB200 上修复前 32 次试验中复制源全为零,修复后为 0 次。小修复将复制源未写入的请求推迟到下一个调度步,PR 见 vllm-project/vllm#67451。

正文 · 原文

(2/7) Silent wrong output: hybrid models can continue from an all-zero cache block, and then cache it.

This breaks prefix caching: a cache hit must give a request the same result that it would have computed itself.

On hybrid models with fine-grained prefix matching turned on, vLLM marks a cache block as reusable as soon as it plans the block, before the block is actually written. So when a second request in the same step reuses that block, it copies it too early and gets all zeros. The second request then continues from those zeros. Since the bad block stays in the cache, later requests can pick it up as well, while every response still looks normal.

On GB200, the copy source was all zeros in 32 of 32 trials before the fix, and 0 after. A small fix defers a request with an unwritten copy source to the next scheduler step, after the source is populated.

PR: github.com/vllm-project/vllm/…

来源:Hao AI Lab · x.com