diff --git a/vllm/nvfp4_cutedsl.py b/vllm/nvfp4_cutedsl.py index 32cfbc02..6c05e53e 100644 --- a/vllm/nvfp4_cutedsl.py +++ b/vllm/nvfp4_cutedsl.py @@ -186,7 +186,7 @@ class CuTeDSLMoERunner: total_rows = x_sf.shape[0] row_indices = torch.arange(total_rows, device=x_sf.device) expert_assign = torch.searchsorted( - expert_offsets[1:], row_indices, right=False + expert_offsets[1:], row_indices, right=True ).clamp(max=num_experts - 1) local_row = row_indices - expert_offsets[expert_assign] dst_rows = padded_expert_offsets[expert_assign] + local_row