Repository navigation
Conversation
jiangkuaixue123
left a comment
There was a problem hiding this comment.
Found a checkpoint-filtering failure in the text-only role split. Reviewed against pinned vLLM-Ascend bd42eea0; NPU construction and execution were not run.
| _DEFERRED_NAME_PREFIXES | ||
| ): | ||
| return _NO_ROLES | ||
|
|
There was a problem hiding this comment.
[P1] Normalize the optional model prefix before filtering non-text weights
The pinned Ascend implementation explicitly supports model.image_end in its text-only checkpoint path (see test_v41_text_only_load_skips_checkpoint_vision_weights). This check only drops unprefixed image_*, vision.*, and aligner.* names. For model.image_end, _weight_layer_path() returns None, so the tensor is sent to both AFD roles. Because this adapter subclasses the text LLM directly, it bypasses the native multimodal wrapper's prefix normalization, and the inherited _load_model_weights() reaches params_dict['model.image_end'], raising KeyError since neither role allocates that parameter. Normalize an optional model. prefix for non-text/deferred-weight classification, and cover prefixed checkpoint names as well as the unprefixed ones.
Add an Ascend NPU adapter for DeepSeek-V4.1 flash. The Attention role keeps the native source-shared DSA/HC/Engram forward and only replaces the FFN slot with a parameter-free remote proxy; the FFN role builds the native DeepseekV41MoE and serves it through compute_ffn_output. Engram tables, candidate-index buffers, shared attention state, and decoder replay stay on Attention, so the FFN role reports has_engram=False and drops every engram checkpoint path. The router shell, CAM exchange, shared-expert layout, and layered FFN extraction reuse the DeepSeek V4 implementation, widened only for the V4.1 already_sequence_parallel argument. The alias resolves only on Ascend NPU and model-config resolution rejects other device types before model loading. Signed-off-by: wangyao-i <iwangyao@outlook.com>
Signed-off-by: wangyao-i <iwangyao@outlook.com>
8de1250 to
42a893e
Compare
Purpose
Add an Ascend NPU AFD role split for DeepSeek-V4.1 Flash (
DeepseekV41ForCausalLM) on pinned vLLM5df63a7(0.32.0) and vLLM-Ascendbd42eea0.Current validated candidate:
42a893ec46454d398388fb13e5b9add125f3494d, rebased onto main127d8ec.Scope and implementation
DeepseekV41MoEand exposes routed-expert weights throughget_async_cam_layered_weights()to the async runner. Synchronous gate-on-FFN execution retainscompute_ffn_output(); the obsolete legacy gate-on-Attention helper is removed.has_engram=Falseand excludes Engram checkpoint tensors. Decoder replay is disabled on Attention.model.prefix before excluding vision/aligner/image/MTP tensors; original names passed to the native loader remain unchanged.already_sequence_parallelforward argument.Test plan and results
Local checks
tests/unit/model_executor/models/npu/test_deepseek_v41.py. It reads real production constants rather than duplicating them, covers six prefixed non-text regressions, preserves original loader names, and checks rejection of legacy async FFN execution.tests/unit/model_executor/models/test_model_utils.py; package tests exercise the external registration seam.Ascend server validation — reported for clean head
42a893eServer validation record, sections 10.4–10.6.
0.32.0+emptyat5df63a7; Ascendbd42eea0; torch_npu2.10.0.post7tests/unitsuite passed; numeric totals are not provided1+1and2+2The report identifies a clean checkout without the earlier server-local prefix patch. Exact current executor selection and per-run raw artifacts have not been independently inspected here; the old non-layered launch settings in section 9 are historical.
Reported benchmark values (
vllm bench serve, OpenAI chat, random inputs,--ignore-eos, concurrency 4):These values are reproduced from the server report. There is no native baseline or repeated-run statistical comparison, so no speedup or performance-regression conclusion is claimed.
GSM8K — bounded server evaluation
max_tokens=3072.Restrictions and remaining validation
Construction rejects non-NPU execution, multimodal execution without
--language-model-only, async CAM withoutcompute_gate_on_attention=true, sequence-parallel MoE without Attention-side gating, EPLB, PP/PCP/DCP sizes other than 1, speculative decoding, LoRA, SWA bounded replay, and Engram with DBO/microbatching.vector core exception(507035) caused an EngineCore crash during validation. Restart recovered service; its root cause remains undetermined.docs/design/module/model_integration.md; it still needs to point totests/unit/model_executor/models/npu/test_deepseek_v41.py.Docs impact
docs/design/module/model_integration.mddocuments role ownership, checkpoint filtering and support restrictions. Its hardware-validation wording predates the latest server report; this PR description and the linked record provide the current bounded results.