final scatter
This commit is contained in:
@@ -360,4 +360,8 @@ def nvfp4_mega_moe_full(
|
||||
|
||||
# Step 6: Final scatter — routing weights applied ONCE
|
||||
y.zero_()
|
||||
y.index_add_(0, slot_token, slot_weight[:, None] * l2_slots)
|
||||
y.index_add_(
|
||||
0,
|
||||
slot_token,
|
||||
l2_slots * slot_weight.to(l2_slots.dtype).unsqueeze(1),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user