mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-31 00:36:20 +08:00
Stacked on #197 (pd_server.py / pd_transfer.py), which moves the prefilled KV blocks and SWA state PE -> CE as pinned host buffers over TCP. --kv-transport mooncake keeps that flow and control socket, and replaces the data plane with a Mooncake TransferEngine: - deepinfer/hicache/pd_mooncake.py: GpuArena (one registered device buffer per rank, first-fit regions; cuMemAlloc like the KV pools, since expandable_segments memory has no cudaIpc handle) and MooncakeLink (TransferEngine with P2PHANDSHAKE metadata, register_memory, transfer_sync_write). - PDTransfer.export_into / admit accept device buffers: the PE exports a sequence straight into an arena region (state included, no extra staging) and the CE admits from its arena. - pd_server.py: MC_MAGIC header -> CE reserves an arena region and replies {addr, segment} (or busy -> retry) -> one contiguous write -> go/ok. Writes are retried, then the region is sent over the TCP path, so a failing peer cannot strand a request. TCP is unchanged and is also the fallback when the PE arena is full. - --mooncake-protocol nvlink_intra (default, one host) or rdma/efa across hosts. - serve/README.md: usage; containers must share IPC and PID namespaces (--pid=host). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| _C | ||
| distributed | ||
| engine | ||
| entrypoints | ||
| hicache | ||
| hugging_face | ||
| model_executor | ||
| npu_ops | ||
| structure_output | ||
| ve | ||
| worker | ||
| __init__.py | ||
| attrdict.py | ||
| config.py | ||
| environ.py | ||
| load_class.py | ||
| logger.py | ||
| model_config_loader.py | ||
| multimodal_tokens.py | ||
| platform.py | ||
| py.typed | ||
| sampling_params.py | ||
| sequence.py | ||
| shared_memory.py | ||
| testing.py | ||
| timer.py | ||
| utils.py | ||