[V32/GLM5] Change default setting of V32 nvfp4 on TP4#20086
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical compatibility issue arising from a recent FlashMLA rebase that broke DeepSeekV32 fp4+tp4 configurations. It achieves this by intelligently adjusting the default KV cache data type and switching the prefill and decode backends for specific hardware setups, particularly on Blackwell devices without data parallel attention. This ensures the DeepSeekV32 models remain functional and stable while allowing for future FlashMLA upgrades. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
/tag-and-rerun-ci |
There was a problem hiding this comment.
Code Review
This pull request modifies the default server arguments for DeepSeek V3.2 models on newer GPUs (Blackwell, SM >= 10) to address an incompatibility with the flashmla decode kernel when data parallelism is not used. Specifically, when dp_size is 1, the default kv_cache_dtype is now set to bfloat16, and the attention backends are adjusted accordingly. The changes also include a fallback mechanism that switches to trtllm backends and warns the user if fp8_e4m3 KV cache is manually configured in this unsupported scenario. The logic appears correct and effectively resolves the described issue.
Note: Security Review did not run due to the size of the PR.
Motivation
After the flashmla is rebased to latest version, DeepSeekV32 fp4+tp4 will break on flashmla decode kernel, since the latest code doesn't support q_head=32
error log: https://github.com/sgl-project/sglang/actions/runs/22779139862/job/66096508676?pr=18902
To unblock the upgrade of flashmla, we change the default setting of DeepSeekV32 fp4+tp4 to bf16 kv_cache_dtype, flashmla sparse prefill kernel, and trtllm decode kernel. For DP4, fp8 kv cache + flashmla decode kernel can still be used.
Modifications
Accuracy Tests
Before this PR, V32 FP4 will break on TP4 with default setting.
With this PR, it can be correctly launched.
Result of gsm8k 20 shots:
On
send_onebenchmark, it's even faster than the prior one, which was ~90 tok/s.Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci