Skip to content

feat: support DeepSeek-V4 in the Python model executor - #2238

Open
0moyi0-2024 wants to merge 8 commits into
xLLM-AI:mainfrom
0moyi0-2024:pr7_dsv4_rebased
Open

feat: support DeepSeek-V4 in the Python model executor#2238
0moyi0-2024 wants to merge 8 commits into
xLLM-AI:mainfrom
0moyi0-2024:pr7_dsv4_rebased

Conversation

@0moyi0-2024

Copy link
Copy Markdown

Summary

  • bridge DeepSeek-V4 cache and attention metadata into the Python executor
  • expose the NPU DSA, QLI, compressor, partial RoPE, hyper-connection, and grouped MoE operators to Python
  • add the DSA metadata builder and eager attention backend aligned with the native implementation
  • add the DeepSeek-V4 Python model, weight loading, MoE path, and registry integration
  • reuse native tensor-parallel and expert-parallel collectives instead of creating a second Python HCCL communicator

This PR intentionally covers the 8-card eager path only. ACL graph, graph double buffering, CP, PD disaggregation, and host offload are excluded from this change.

Validation

  • Python regression suite: 111 passed
  • Python syntax and git diff --check: passed
  • modified C++ translation units: compiled
  • full NPU build and link, including all_tests: passed
  • torch_npu_ops Triton build tests: 212 passed
  • 8-card HCCL startup with /mnt/sfs_turbo/models/DeepSeek-V4-Flash-w8a8-mtp: passed
  • real Python eager weight loading, KV-cache initialization, prefill, and decode request: passed
  • deterministic Python eager vs native eager comparison: generated token ids and per-token top-5 logprobs matched exactly for the validation request

Runtime configuration

  • model_impl=python
  • enable_graph=false
  • python_graph_backend=off
  • npu_kernel_backend=TORCH
  • ep_size=8, dp_size=1
  • prefix cache disabled for the baseline validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant