-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[Model] Upstream Deepseek-OCR model #27247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Documentation preview: https://vllm--27247.org.readthedocs.build/en/27247/ |
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
The model should work now, but we really need a full clean for commented debug codes from upstream codebase everywhere. 😅 |
I'll clean it up - thanks for your work! |
Signed-off-by: Roger Wang <[email protected]>
Signed-off-by: Roger Wang <[email protected]>
Signed-off-by: Roger Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
if self.text_config.topk_method == "noaux_tc": | ||
architectures = ["DeepseekV3ForCausalLM"] | ||
elif not self.text_config.use_mla: | ||
architectures = ["DeepseekForCausalLM"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we use DeepseekV2ForCausalLM
in non-mla scenario? Because DeepseekV2ForCausalLM
also supports non-mla:
vllm/vllm/model_executor/models/deepseek_v2.py
Line 1001 in 09a7e6f
if model_config.use_mla: |
Currently
DeepseekForCausalLM
is hard coded to use triton version of fused_experts
and fused_topk
with all_reduce path of MoE implementation, witch fails to utilize SharedFusedMoE
witch supports CustomOp
. So if there are reasons that DeepseekForCausalLM must be used, I suggest upgrade it to reuse SharedFusedMoE
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was needed back then when our DSv2 implementation didn't support non-mla (you can see the same code in dsvl2)
vllm/vllm/model_executor/models/deepseek_vl2.py
Lines 403 to 409 in ab3e800
if self.text_config.topk_method == "noaux_tc": | |
architectures = ["DeepseekV3ForCausalLM"] | |
elif not self.text_config.use_mla: | |
architectures = ["DeepseekForCausalLM"] | |
else: | |
architectures = ["DeepseekV2ForCausalLM"] | |
but you're right this should be no longer needed.
Great work! I have tested it. |
Purpose
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.