Repository navigation
[Perf][Model Loader] DeepSeek V4.1 Flash mixed RunAI loading - #61715
SherifWaly wants to merge 4 commits into
Conversation
Consolidate streamed VL loading, distributed ordinary weights, single-reader shared CPU Engram loading, tensor lifetime handling, and DSpark S3 source inheritance with checkpoint-index selection. Port VL streaming and its regression/CI wiring from vLLM PR vllm-project#58857. Adapt the model-owned selection approach discussed in vllm-project#60759. The DSpark URI fix addresses the related source-loss problem described in vllm-project#48023. Document the experimental flags, separate streamer dependency and scope. Generic configuration and final serving validation remain draft work. Co-authored-by: git bisector <gitbisector@gmail.com> Assisted-by: AI assistant Signed-off-by: Sherif Waly <sherif.waly@mistral.ai>
|
Documentation preview: https://vllm--61715.org.readthedocs.build/en/61715/ |
Align Python extras, Docker defaults and runtime/test dependencies with the streamer version used for DeepSeek loading validation. Regenerate test locks and target manylinux_2_31 to accept its manylinux_2_30 wheels. Assisted-by: AI assistant Signed-off-by: Sherif Waly <sherif.waly@mistral.ai>
|
This pull request has merge conflicts that must be resolved before it can be |
Assisted-by: AI assistant Signed-off-by: Sherif Waly <sherif.waly@mistral.ai>
Use the ordinary reader group for normal loads and None for the single shared Engram reader. Remove duplicate parameter coverage. Assisted-by: AI assistant Signed-off-by: Sherif Waly <sherif.waly@mistral.ai>
|
Tested on GB10 (torch 2.14) against base
Until the SDK API is released, could Separately, #252 also needs
|
Overview
Consolidate the DeepSeek V4.1 Flash RunAI loading stack: stream the VL wrapper, keep ordinary weights distributed, read shared CPU Engram tables once, and preserve/select the DSpark S3 weight source. This draft includes ported prior work and the experimental integration measured on eight H200s.
Claims
None. Independent readers retain shared filesystem queue sizing.runai-model-streamer>=0.17.0in the Python extra and Docker default, with matching 0.17.0 CI requirements and cloud adapters. Released Linux wheels require glibc 2.30; CUDA/CPU/ROCm lock generation targets 2.31, the lowest compatible target supported by the pinneduv. XPU already targets 2.39.Validation
Real DeepSeek V4.1 Flash revision
5254448, eight H200s, TP1/DP8/EP8, Engram CPU offload and shared DP storage, DSpark5, RunAI 0.17.0,spans, plus the separate streamer rank-discovery fix model-streamer #252. Ordinary staging remained 4 GiB/rank (32 GiB node total under 0.17.0); oversized CPU staging remained 100 GiB.This is the combined stack/configuration result, not the isolated effect of this PR: released 0.17.0 already supplies native read coalescing/ring improvements, and different nodes were used. One full model run per integration configuration; no repeated same-node A/B startup campaign is claimed.
The patched integration reached Ready with zero restarts. Full vLLM model loading, including approximately 150 s of host-table initialization, took 291 s. Cold container-to-Ready took approximately 15m28s, including regression preflight, setup and kernel/graph warmup. The two-minute payload time is not a two-minute server startup claim. Cached NFS/page-cache default-loader controls took 110–113 s for target weights and 265–279 s for full model loading; this does not claim a speedup over cached filesystem loading.
os.posix_fadvise/os.POSIX_FADV_DONTNEEDerrors; equivalent Linux-target checks passed.uv 0.11.1;prek run --filespassed all applicable hooks, including the four dependency resolvers and Docker version consistency. Existing unrelated pins were retained; regeneration also restored theopenai-harmony==0.0.8transitive entry required by the already-pinnedgpt-osspackage.The updated process-group tests ran on an isolated CPU-only Linux pod with the released native core 0.17.0 and the modified Python SDK from model-streamer #252, now at 0e0ebbb. This revision requires that matching Python SDK; the released 0.17.0 Python API does not yet accept
process_group. The final dependency version must be set after the companion API is released. These tests do not establish a new model-loading or NFS performance result, and no revised serving deployment was validated.Latest integration reproduction with that matching SDK installed:
.venv/bin/python -m pytest -q -s \ tests/model_executor/model_loader/runai_streamer_loader/test_weight_utils.py \ -k 'not test_runai_model_loader'Focused reproduction in a CUDA vLLM environment:
VLLM_RUNAI_BORROWED_WEIGHTS=0 .venv/bin/python -m pytest \ tests/models/test_deepseek_v4_vl_stream_weights.py \ tests/model_executor/model_loader/runai_streamer_loader/test_weight_utils.py \ tests/model_executor/model_loader/runai_streamer_loader/test_runai_model_streamer_loader.py \ tests/v1/worker/test_dspark_utils.py \ -q -k 'streams_language_model_group or clones_reused_buffers or explicit_cpu_shards or index_selection or inherits_only_shared_checkpoint_uri'The hardware results came from the original integration on
fe4df3df0(PyTorch 2.13.0/CUDA 13). This branch is rebased on main; a complete model rerun on the rebased head, HTTP text/image/tool checks, draft acceptance and quality evaluation remain pending. No output-quality equivalence is claimed. The new wrapper test is ported with its Buildkite entry; existing model-executor/worker jobs cover the extended suites. Full-model CI additionally needs the checkpoint, eight GPUs and sufficient host memory.Details
The reproduction example explicitly selects the Python API frontend with
VLLM_USE_RUST_FRONTEND=0. It supports an explicit local tokenizer metadata path for S3 deployment. This is independent of RunAI tensor loading. A separate eight-B200 canary using preserved image digeste5c9e6bb82f645e8fca04e4d395743ee5ed473a62b98942d65f83c35d0c69301and the cached filesystem loader reached Ready with zero restarts and passed 16 serving checks: health/model discovery, text, SSE streaming, image input, forced/automatic tool calls, concurrent requests directed to DP ranks 0–7, and per-engine metric deltas of exactly one request per rank. It validates the existing Python frontend and DP header routing; it does not validate this PR's loading changes or its rebased head. The H200 Python/S3 canary remains unvalidated because BAR's requested SUNK QoS has reached its 80-GPU quota.Included prior work and attribution:
method=dspark, notmethod=mtp. This branch fixes the observed DSpark config-only-cache failure in its loader using a shallow copy of the resolved config; it does not cherry-pick the older generic speculative-config patch.These pieces are deliberately included in one reviewable draft alongside the CPU Engram integration. Refreshed duplicate checks found the existing PRs above; their overlap is explicit. #61303 optimizes pinned GPU staging and #57195/#61553 change shared-storage inference/topology support; they do not implement this mixed RunAI single-reader path.
The current loader's sorted VL input retains the stream; the GPU streamer cannot safely stage the oversized CPU tables on an H200. Splitting GPU/CPU phases addresses that destination mismatch. Shared followers receive meta placeholders so the existing single-writer weight loaders retain equal call counts/barriers; non-shared tensors are broadcast as raw bytes. The streamer dependency scopes reader discovery before metadata: ordinary readers supply their process group, while the lone CPU reader passes
Noneto avoid discovery collectives.Before merge:
All experiment switches default off. The documented initial scope is one eight-H200 DP/EP server. See
docs/models/extensions/runai_model_streamer.mdfor the exact environment and staging configuration. This draft adds loader-time synchronization, not steady-state inference synchronization, and remains experimental until the items above are resolved.Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Initial integration is measured; generic metadata/configuration and compatibility review remain pending.
Testing and Validation: Regressions, eight-rank toy loading and real-model startup recorded; final-head request/acceptance/eval validation remains pending.
Code Quality and Style: Applicable checks completed, docs and ported CI wiring included; platform limitation documented.
Pull Request Contents: Scope, port attribution, dependencies, measurements, root causes and draft limitations are explicit.
BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing