Skip to content

Conversation

@Isotr0py
Copy link
Member

@Isotr0py Isotr0py commented Nov 5, 2025

Purpose

Test Plan

python examples/offline_inference/vision_language.py -m deepseek_ocr
python examples/offline_inference/basic/generate.py --model deepseek-ai/DeepSeek-V2-Lite-Chat

Test Result

Have confirmed CPU/XPU can run DeepSeek-COR now, and Deepseek-V2 isn't affected.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

jikunshang and others added 5 commits November 3, 2025 01:22
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
…deepseek-ocr-cpu

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@mergify mergify bot added the new-model Requests to new models label Nov 5, 2025
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@Isotr0py Isotr0py marked this pull request as ready for review November 5, 2025 15:22
@mergify
Copy link

mergify bot commented Nov 5, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @Isotr0py.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Nov 5, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

class DeepseekV2ForCausalLM(nn.Module, SupportsPP, MixtureOfExperts, SupportsLoRA):
packed_modules_mapping = {
"gate_up_proj": ["gate_proj", "up_proj"],
}
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
super().__init__()

P1 Badge Reintroduce qkv packed mapping for Deepseek LoRA modules

The old DeepseekForCausalLM exposed a packed_modules_mapping entry for "qkv_proj": ["q_proj", "k_proj", "v_proj"] so LoRA and quantization code could translate user‑facing module names to the packed QKVParallelLinear weights. After consolidating the Deepseek implementation into deepseek_v2.py, the new DeepseekForCausalLM simply inherits DeepseekV2ForCausalLM, whose mapping only includes gate_up_proj (and optionally fused_qkv_a_proj). As a result, LoRA loaders now have no mapping for q_proj, k_proj, or v_proj when targeting Deepseek MoE models (see vllm/lora/models.py for how these mappings are consumed), so adapters that previously worked will fail to register or load. Consider restoring the qkv_proj entry when self.use_mha is true so LoRA and packed quantization continue to work for the original Deepseek models.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@mergify mergify bot removed the needs-rebase label Nov 5, 2025
Copy link
Collaborator

@jikunshang jikunshang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thanks for refactoring!

@mergify
Copy link

mergify bot commented Nov 7, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @Isotr0py.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Nov 7, 2025
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@Isotr0py Isotr0py enabled auto-merge (squash) November 7, 2025 07:09
@mergify mergify bot removed the needs-rebase label Nov 7, 2025
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 7, 2025
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@mergify
Copy link

mergify bot commented Nov 8, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @Isotr0py.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Nov 8, 2025
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@mergify mergify bot removed the needs-rebase label Nov 8, 2025
@Isotr0py Isotr0py merged commit 934a9c3 into vllm-project:main Nov 8, 2025
55 checks passed
@Isotr0py Isotr0py deleted the deepseek-ocr-cpu branch November 8, 2025 05:53
@gcanlin
Copy link
Contributor

gcanlin commented Nov 10, 2025

LGTM. Thanks for the good work! I have validated Deepseek-OCR on Ascend NPU (910B) using the latest vllm-ascend main branch plus this PR, and the results are successful.

xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Nov 13, 2025
…m-project#28101)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
yma11 pushed a commit to yma11/vllm that referenced this pull request Nov 14, 2025
…pSeek-v2 (vllm-project#28101) (vllm-project#14)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Co-authored-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
@sixgod-666
Copy link

LGTM. Thanks for the good work! I have validated Deepseek-OCR on Ascend NPU (910B) using the latest vllm-ascend main branch plus this PR, and the results are successful.

How can I obtain a mirror environment that can successfully run DeepSeek-OCR? I tried the vllm-ascend-main image and found that its vllm version is v0.11.0.

@ywang96 ywang96 added this to the v0.11.1 milestone Nov 14, 2025
devpatelio pushed a commit to SumanthRH/vllm that referenced this pull request Nov 29, 2025
…m-project#28101)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek Related to DeepSeek models new-model Requests to new models ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Enable DeepSeek-OCR pluginization

5 participants