Skip to content

[Research] Kimi memory reuse and opt-in decode prefetch experiments - #925

Merged
lukealonso merged 13 commits into
dev/karmic-krakenfrom
draft/kk-kimi-memory-prefetch-performance
Sep 28, 2026
Merged

lukealonso merged 13 commits into
dev/karmic-krakenfrom
draft/kk-kimi-memory-prefetch-performance

Conversation

@lukealonso

@lukealonso lukealonso commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Research-only Kimi memory and decode experiments: bounded vision/projector execution, activation/residual storage reuse, auxiliary projection sharding, optional aligned decode GEMMs, dense-weight L2 prefetch and split KDA projection overlap.

Depends on #924 for shared projection and collective interfaces, and #857/#842 for correctness prerequisites. Integrated into dev/karmic-kraken; optional-path GPU and performance qualification remains incomplete and was accepted by the maintainer.

Validation: 168 CPU tests passed, 9 GPU cases deselected across test_eagle3.py, test_mm_preprocess.py, test_l2_prefetch.py, test_exl3.py, test_sequence_parallel.py, the MLA output-gate dispatch cases, and full/sliding-window cache capability merging. Relevant pre-commit hooks, including mypy, pass. Exact checkpoint-dimension validation from #857/#842 is included. The complete stack preserves the original optional implementations plus review fixes, with no circular dependency between these drafts.

GPU validation and performance qualification are pending. Before integration, measure each optional feature independently against the same checkpoint, topology, shapes, graph mode and baseline; require numerical correctness, changed-input graph replay, aliasing/compile compatibility and allocation stability. Storage-donation paths still require real torch.compile and graph coverage. No speedup or serving qualification is claimed.

The existing #592 targets dev/infernal-invocation and its older hook/API layout. This preserves the prepared Karmic implementation and memory changes extracted from #857 rather than adding another patch to that lineage. L2 prefetch and projection overlap remain opt-in.

AI assistance was used for separation, review fixes and validation.

Signed-off-by: Martin Vit <martin@voipmonitor.org>
Signed-off-by: Martin Vit <martin@voipmonitor.org>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 22a9a302-4001-4ab0-938d-e5165cbcce34

📥 Commits

Reviewing files that changed from the base of the PR and between d8cdca5 and 8751db7.

📒 Files selected for processing (52)
  • tests/distributed/test_b12x_pcie_all_reduce.py
  • tests/distributed/test_dcp_direct_a2a_lse_reduce.py
  • tests/model_executor/layers/test_shared_experts_stream.py
  • tests/model_executor/test_b12x_warmup.py
  • tests/models/kimi_k3/test_attn_res.py
  • tests/models/kimi_k3/test_eagle3.py
  • tests/models/kimi_k3/test_kda.py
  • tests/models/kimi_k3/test_l2_prefetch.py
  • tests/models/kimi_k3/test_latent_moe_tail.py
  • tests/models/kimi_k3/test_mla_prefill_context.py
  • tests/models/kimi_k3/test_mm_preprocess.py
  • tests/models/kimi_k3/test_sequence_parallel.py
  • tests/models/kimi_k3/test_vision_projector.py
  • tests/models/test_vision.py
  • tests/quantization/test_exl3.py
  • tests/v1/attention/test_mla_context_chunks.py
  • tests/v1/attention/test_mla_dcp_prefetch.py
  • tests/v1/attention/test_mla_noncausal.py
  • tests/v1/attention/test_mla_prefill_quant_output.py
  • tests/v1/executor/test_b12x_startup.py
  • tests/v1/worker/test_cp_utils.py
  • vllm/distributed/communication_op.py
  • vllm/distributed/device_communicators/b12x_dcp.py
  • vllm/distributed/device_communicators/b12x_pcie_all_reduce.py
  • vllm/distributed/device_communicators/cuda_communicator.py
  • vllm/distributed/parallel_state.py
  • vllm/envs.py
  • vllm/model_executor/layers/attention/attention.py
  • vllm/model_executor/layers/attention/mla_attention.py
  • vllm/model_executor/layers/fused_moe/runner/moe_runner.py
  • vllm/model_executor/layers/linear.py
  • vllm/model_executor/models/kimi_k25_vit.py
  • vllm/model_executor/models/vision.py
  • vllm/model_executor/warmup/b12x_prepare.py
  • vllm/models/glm5next/nvidia/l2_prefetch.py
  • vllm/models/kimi_k3/common/mm_preprocess.py
  • vllm/models/kimi_k3/nvidia/kda.py
  • vllm/models/kimi_k3/nvidia/l2_prefetch.py
  • vllm/models/kimi_k3/nvidia/latent_moe_runner.py
  • vllm/models/kimi_k3/nvidia/low_latency_gemm.py
  • vllm/models/kimi_k3/nvidia/mla.py
  • vllm/models/kimi_k3/nvidia/model.py
  • vllm/models/kimi_k3/nvidia/ops/attn_res.py
  • vllm/models/kimi_k3/nvidia/tp_projection.py
  • vllm/v1/attention/backend.py
  • vllm/v1/attention/backends/mla/prefill/b12x.py
  • vllm/v1/attention/backends/mla/prefill/registry.py
  • vllm/v1/attention/backends/mla/rocm_aiter_mla.py
  • vllm/v1/attention/ops/dcp.py
  • vllm/v1/attention/ops/dcp_prefetch.py
  • vllm/v1/attention/selector.py
  • vllm/v1/kv_cache_interface.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Martin Vit <martin@voipmonitor.org>
Signed-off-by: Martin Vit <martin@voipmonitor.org>
Signed-off-by: Martin Vit <martin@voipmonitor.org>
@lukealonso
lukealonso force-pushed the draft/kk-kimi-memory-prefetch-performance branch from 006cd27 to e307c85 Compare September 28, 2026 03:31
@lukealonso
lukealonso force-pushed the draft/kk-kimi-prepared-mla-performance branch from b2b9aa3 to 630c214 Compare September 28, 2026 03:31
…raft

Keep dense MLA dispatch and prepared prefill in the core branch while retaining optional context projection and DCP transport here. Select custom dense transport through the B12X backend name. Pre-commit checks pass; optional performance paths remain unqualified.

Signed-off-by: Martin Vit <martin@voipmonitor.org>
…e draft

Retain the optional memory and overlap changes on top of the prepared MLA performance branch. Dense attention selection uses B12X for prefill and decode. Optional performance qualification remains pending.

Signed-off-by: Martin Vit <martin@voipmonitor.org>
@lukealonso
lukealonso changed the base branch from draft/kk-kimi-prepared-mla-performance to dev/karmic-kraken September 28, 2026 04:14
@lukealonso
lukealonso marked this pull request as ready for review September 28, 2026 04:14
@lukealonso
lukealonso requested a review from mgoin as a code owner September 28, 2026 04:14
@lukealonso
lukealonso merged commit 502d6cb into dev/karmic-kraken Sep 28, 2026
9 checks passed
voipmonitor added a commit that referenced this pull request Sep 29, 2026
Brings #857, #842, #909, #924 and #925 (Kimi-K3 EXL3 serving and
opt-in MLA/DCP/memory options) into beta. One conflict in
b12x_pcie_all_reduce._plan_key: keep beta's storage-keyed fused RMSNorm
weight (MiMo fused norm sites) and canonical's singleton-stride
normalization. Adds a canonical-sync release fragment for #924/#925,
which carry none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants