[bugfix] Fix deepseek-v4 fp8#133
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the Compressor and CSAIndexer modules to customize FP8 initialization for DeepSeek-V4 and integrates them into the transformer layer specification. Feedback on the changes highlights a missing import for DSv4HybridMLP that will cause a runtime NameError, unsafe getattr calls that could raise AttributeError when configuring attention submodules, and potential TypeError exceptions in compressor.py if the base classes fallback to object upon import failure.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces FP8 support for DeepSeek-V4 within the mcore_bridge package. Key changes include the integration of transformer_engine's GroupedLinear for grouped output projections, the addition of custom Compressor and CSAIndexer modules to handle FP8 initialization, and compatibility updates for RoPE. The review feedback highlights critical issues regarding tensor parallel training (where tp_size > 1). Specifically, te.GroupedLinear must be initialized with the local number of groups (self.o_local_groups) rather than the global count to prevent runtime crashes, and the state dict conversion logic in _set_o_group_proj_grouped needs to be updated to correctly slice and gather weights across tensor parallel ranks.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.