Repository navigation
[CI][Kimi-K3] Test prefix cache reuse with KV offload, P/D and DCP - #59229
Conversation
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
|
/ci run --allow-stale |
|
✅ Triggered Buildkite CI #92145 for commit
|
|
Hi @ZJY0516, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, |
1 similar comment
|
Hi @ZJY0516, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, |
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
|
/ci run --allow-stale |
|
✅ Triggered Buildkite CI #92163 for commit
|
CI selector (shadow): 10 test steps (23 jobs) instead of 10 (25 jobs)Shadow mode: this changes nothing about what CI runs. It shows what the evidence-based selector would pick for this PR, next to today's rules. How it works. Feedback welcome: reply here if it would skip a step this change needs, or runs something unrelated.
Selector would run (10)
Would skip (today's rules run them) (1)
Would add (today's rules do not run them) (1)
AMD mirrors: would skip (0)none AMD mirrors: would add (1)
2 changed files · base |
AndreasKaratzas
left a comment
There was a problem hiding this comment.
I know that kimi is fully supported by AMD and that we do have the necessary kernels. And since we are trying to close the parity gap in ci, could you add rocm support on this test?
|
sorry for being late. Overall great, one minor comment is how about we do PD TP2->DEP2? which is perhaps closer to the real use case. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
You can update it after I merge this |
|
/ci run --allow-stale |
|
✅ Triggered Buildkite CI #92584 for commit
|
…llm-project#59229) Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Purpose
Kimi-K3 has no end-to-end prefix-cache coverage. FlashKDA exports Mamba prefill checkpoints, a path the Qwen3.5-based
test_hybrid_prefix_cache_hit_rate.pynever takes, so regressions such as the dropped prompt-end checkpoint fixed by #59146 / #59175 reach users unnoticed. KV offload, P/D and DCP are not tested with K3 at all.This adds
tests/models/kimi_k3/test_prefix_cache.py. It servesriverclouds/Kimi-K3-8L-dummy(the official Kimi-K3 config with 8 layers and no weights) with--load-format dummy, and runs 3 turns where each turn extends the previous prompt. Each turn must:cached_tokens), andcache_salt(check_logprobs_close). This catches restored state that is wrong even though the hit count looks right.With offloading, GPU prefix caches are reset before each turn, so the hit has to come back from CPU.
Every deployment runs in 4 modes:
block: Mamba-block granularity.partial:--prefix-match-unit 128, i.e. partial hits.block-dsparkandpartial-dspark: the same, plus DSpark speculative decoding as in the recipe. The draft isriverclouds/Kimi-K3-DSpark-for-8L-dummy, which isInferact/Kimi-K3-DSparkwithtarget_layer_idsremapped to the 8-layer target and no weights. With EAGLE-style block drop, the expected hit is one unit lower.CI: a new
(4xB200) Kimi K3 Prefix Cache Shard %Nstep runs the file in 2 shards. It installs NIXL with.buildkite/scripts/install-kv-connectors.shfirst, because the CI image does not include it. It is triggered byvllm/v1/core/,vllm/v1/spec_decode/, the NIXL and SimpleCPUOffload connectors,vllm/model_executor/layers/mamba/andvllm/models/kimi_k3/. The existing 1xB200 Kimi K3 step ignores this file.Known failures (strict xfail)
dcp2-*-dspark,dcp2-offload-*-dspark: FlashInfer MLA DCP decode crashes on ragged spec-decode batches (causal_seqlens_kv_global must have shape (9,), got (2,)). This is fixed by [Bugfix][Attention] Fix FlashInfer MLA DCP decode on ragged spec-decode batches #59392.Not covered
P/D + DCP: NIXL with DCP sets
cp_kv_cache_interleave_sizeto the block size (vllm/config/vllm.py), but FlashInfer MLA native DCP requires 1, so the server fails to start. A P TP → D DCP case can be added once that is fixed.Depends on #59146 or #59175
On current
main, every block-granularity case fails at turn 1 withcached=0 expected=17280, which is the bug those PRs fix. Partial cases pass onmain. This PR stays a draft until one of them lands.Not a duplicate
There are no open PRs adding Kimi-K3 prefix-cache, offload, P/D or DCP tests. #59146 and #59175 fix the scheduler bug and add unit tests only.
Test Plan
On GB200 (SM100), with #59146 cherry-picked onto main (
379e9a1):Test Result
On main + #59146, one 4xGB200 node. The full run predates two changes:
pd-tp1-tp2was replaced bypd-tp2-dep2, andpd-dcp2was dropped. It ran 32 cases:24 passed, 4 failed, 4 xfailed in 5136.53s (1:25:36). The 4 failures are thedcp2*-dsparkcases, marked xfail after the run started. The 4 xfails werepd-dcp2. Thepd-tp2-dep2cases were run separately on this branch atc2a0aaa(merged with main):4 passed in 1138.28s (0:18:58).Each case prints its turns. For example,
dcp2-offload-partial, with GPU prefix caches reset before every turn:With DSpark (
pd-offload-partial-dspark), the expected hit drops by one 128-token unit:On main without the fix,
plain-blockfails at turn 1 (cached=0 expected=17280) andplain-partialpasses. Each server start takes about 70–90 s.With
OffloadingConnectorinstead, DCP2 hits CPU only when the prompt-end checkpoint lands on a multiple of the DCP-scaled MLA chunk. That connector is not in the recipe, so it is not covered here.No model outputs change (test and CI only), so no eval was run.
AI assistance (Claude Code) was used to write this test.
🤖 Generated with Claude Code