Skip to content

Fix: nvbugs/5222698 variable not defined #3630

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

Merged
merged 2 commits into from
Apr 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tensorrt_llm/_torch/models/modeling_deepseekv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,9 @@ def forward(
using_prev_fusion = self.deepseek_allreduce_disabled or hidden_states.size(
0) > 128

min_latency_mode = True if hidden_states.size(
min_latency_mode = hidden_states.size(
0
) <= 128 and self.fusion_config.POST_MOE_FUSION and self.is_nvfp4 else False
) <= 128 and self.fusion_config.POST_MOE_FUSION and self.is_nvfp4 and not using_prev_fusion

if residual is None:
residual = hidden_states
Expand All @@ -509,6 +509,7 @@ def forward(
**kwargs,
)

hidden_states_fp4 = None
if self.fusion_config.PRE_MOE_FUSION:
# Custom AR Fusion for DeepseekV3
if using_prev_fusion:
Expand Down