mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #380] [RFC][Store]Provide BatchPut() and BatchGet() interfaces for fine-grained KV Slices #135
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zhaoyongke on GitHub (May 20, 2025).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/380
Mooncake Store provides put()/get() interfaces with single key for now, it's ok for a couple of tokens' KV save/load.
While in vLLM and SGLang, an optimization is transfering KVs layer-by-layer for better compute-communication overlapping.
vllm offloading
sglang cache controller
However, when KVs split into layers, the value size will decreased sharply, and the number of requests increased accordingly.
To reduce the overhead of single key put()/get, we may provide batched python interfaces as:
To add batch_put(), batch_get() interfaces, some considerations are needed:
Welcome to codesign & review & contribue & PR!
@stmatengss commented on GitHub (May 20, 2025):
Layer-wise KVCache has the potential to reduce TTFT as the transfer operations can be pipelined with prefill. However, careful consideration of batch size is required: processing all layers in a single batch would revert to a block-based put/get interface pattern. As an extension, is it feasible to implement cross-request layer batching (i.e., grouping layers from different requests into batches)?
@zhaoyongke commented on GitHub (May 20, 2025):
At the first step, inference engines will choose a dynamic batch size as it needed, auto-batching in the mooncake store is preferred in the next step.
@zhaoyongke commented on GitHub (May 21, 2025):
@xinranwang17
@xinranwang17 commented on GitHub (May 21, 2025):
I'd like to take this one.