-
feat(kv_cache): enable asymmetric store/retrieve storages in PD backend (#2509)
发布于
2026-03-16 06:48:55 +00:00 - feat(kv_cache): enable asymmetric save/remote storage in PD backend
Remove the restriction that prevented using
save_decode_cacheand
remote_backendsimultaneously in Prefill-Decode (PD) separation scenarios.This change introduces
pd_retrieve_locationsandpd_store_location
parameters to decouple the KV cache retrieval and storage logic. This
enables an asymmetric cache flow:- Prefill nodes transmit KV cache to Decode nodes via the PDBackend.
- Decode nodes write back their generated KV cache to a remote backend
for subsequent prefill reuse. - In multi-turn dialogue scenarios, subsequent
prefill requests retrieve historical KV cache from the remote backend,
significantly increasing Prefix Cache hit rates and reducing TTFT
This decoupling provides greater flexibility for cross-instance cache
management and improves overall pipeline efficiency in distributed
inference.[ Compute Layer ]
+----------------------+ +------------------+
| Prefill Node | ===============>| Decode Node |
| (Hit-Remote & GenKV) | (1) PDBackend | (Hit-PD & GenKV) |
+-------^--------------+ +-------+----------+
| |: : [ Storage Layer ] (2) pd_store_location (3) pd_retrieve_locations (Decode -> Pool) (Pool -> Prefill) v +-------+--------------------------------------------+ Distributed Storage Pool [Node A] [Node B] [Node C] [Node D] <======= (Object Storage / NFS / DFS) =======> +----------------------------------------------------+ Workflow:
- Prefill -> Decode (PDBackend): Initial KV transfer for the current turn.
- Decode -> Remote (Store): Decode saves updated KV to NFS for persistence.
- Remote -> Prefill (Retrieve): Next-turn prefill pulls from Remote,
drastically increasing Prefix Cache hit rate for multi-turn dialogues.
Signed-off-by: Tony Lin tony.lin@intel.com
- small refactor
Signed-off-by: Tony Lin tony.lin@intel.com
- config examples for pd + remote backends
Signed-off-by: Tony Lin tony.lin@intel.com
- refactor: rename pd_retrieve_locations/pd_store_location to retrieve_locations/store_location
Remove the PD-specific prefix to make the retrieve/store locations
generic instead of being limited to PD only.This breaks the PD-only feature restriction and allows the mechanism
to be reused by other roles/components.Signed-off-by: Tony Lin tony.lin@intel.com
- move retrieve & store locations from storage manger to cache engine
Signed-off-by: Tony Lin tony.lin@intel.com
- add para validation check
Signed-off-by: Tony Lin tony.lin@intel.com
- config: replace hardcoded IP with placeholder in decoder remote configs
Signed-off-by: Tony Lin tony.lin@intel.com
- resolve conflicts and rebase to the latest
Signed-off-by: Tony Lin tony.lin@intel.com
- address review comments
Signed-off-by: Tony Lin tony.lin@intel.com
- add description in configurations.rst
Signed-off-by: Tony Lin tony.lin@intel.com
Signed-off-by: Tony Lin tony.lin@intel.com
Co-authored-by: deng451e 57919305+deng451e@users.noreply.github.com下载附件