docs(project): add README and MIT license
Document xpool’s resource-disaggregated multi-model architecture, developer setup, configuration, SGLang integration, and validation workflow. Publish the README and MIT license through the package metadata.
Co-authored-by: Codex codex@openai.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
xpool
xpool develops the control and data-plane infrastructure for resource-disaggregated multi-model serving. It integrates SGLang with an xpool-owned control plane, CUDA IPC transport, and an NVSHMEM Fabric for coordinating specialized GPU roles.
Introduction
Multi-model serving brings GPU memory objects with different lifetimes into the same system. Model weights are stable and model-defined, while KV-cache is transient and follows request demand. Treating both as one monolithic allocation couples static model placement to the dynamic memory available for active requests, reducing aggregate resource flexibility.
CrossPool’s central design idea is to manage these resources through separate GPU roles: keep attention and its KV-cache together, organize model-side resources in a pooled execution tier, and exchange hidden states over a low-latency interconnect. xpool provides the control and data-plane infrastructure for this separation.
xpool uses SGLang as its serving engine. SGLang continues to own request scheduling, attention, KV-cache management, CUDA graph selection, and output postprocessing. xpool supplies the model adapters, process lifecycle, rank-local transport, Fabric coordination, and graph-compatible tensor boundary used to connect the GPU roles.
Highlights
System Architecture
xpool has four process roles:
A model-layer request moves through the system as follows:
xpool.ops.ffn_shim.External readiness is reported only after the configured processes are live, Transport arenas are eligible, the Fabric generation is executable, every Instance has crossed its initialization barrier, and the external CUDA MPS controller is responsive.
Requirements
The native extension is built through uv and scikit-build-core. CUDA, Torch, SGLang, FlashInfer, and the NVIDIA NVSHMEM runtime are project dependencies.
Quick Start
Clone the repository and create machine-local configuration files:
Edit
configs/dev.local.tomlto select the model root, model IDs, and CUDA devices. Edit.envsoXPOOL_CONFIGpoints to that file and configure host-uniqueCUDA_MPS_PIPE_DIRECTORYandCUDA_MPS_LOG_DIRECTORYpaths. Both files are ignored by Git.Install the complete development environment and rebuild the native extension:
Create the MPS directories configured in
.env, then start the controller with every GPU visible to PyTorch clients. The following path is an example; keep it identical to the values in.env.Run the development validation layers:
Stop all SGLang and xpool processes before stopping the MPS controller:
Configuration
Runtime configuration is resolved in this order:
XPOOL_CONFIGThe main configuration boundaries are:
XPOOL_CONFIGSGLANG_PLUGINS=xpoolvendor.model_base_urimodels[].id/models[].pathdevices.atn_cuda_devicesdevices.ffn_cuda_devicesscheduler.*Model paths are resolved by
XpoolConfig.model_path_of(model_id). Start fromconfigs/xpool.example.tomland.env.example; keep host-specific paths in an ignored*.local.tomlfile.SGLang Integration
Adapters are selected from the model architecture declared in
config.json. Model IDs provide configuration identity and path resolution rather than acting as an adapter allowlist.(TP, DP)DeepseekV2ForCausalLM(1, 1),(2, 1),(1, 2)Qwen3ForCausalLM(1, 1),(2, 1)Glm4MoeLiteForCausalLM(1, 1),(2, 1),(1, 2)Qwen3MoeForCausalLM(1, 1),(2, 1),(1, 2)The adapter and shim integration matrix exercises eager and Decode full CUDA graph paths across the listed placements. Prefill piecewise CUDA graph coverage applies when attention DP is one.
Validation and Development
python -m testsis the canonical composition root. It runs native CTest, Unit, Integration, and E2E stages in their accepted order, schedules GPU work against explicit resource requirements, and retains artifacts under.xpool-cache/test-runs/.See tests/README.md for suite placement, requirements, and commands, and tests/harness/README.md for process, GPU lease, endpoint, and artifact ownership.
Repository Guide
PLAN.mdis the canonical architecture and implementation plan.src/xpool/contains configuration, runtime roles, the daemon, SGLang integration, and Python/native boundaries.src/cext-include/xpool/andsrc/cext/contain the C++/CUDA Transport and Fabric data plane.tests/contains the native, Unit, Integration, and E2E validation layers and their reusable harnesses.docs/code-style.mddefines repository-wide coding conventions.License
xpool is available under the MIT License.