Fix: use 1-dim tensors for gate_ws2 and gate_input_scale
This commit is contained in:
@@ -723,8 +723,8 @@ def main():
|
||||
router.load_nvfp4_fused_gate(
|
||||
gate_weight=gw_fp4,
|
||||
gate_weight_scale=gw_sf,
|
||||
gate_ws2=torch.tensor(gw_gs, device=dev), # gsb = weight global scale
|
||||
gate_input_scale=torch.tensor(1.0 / (6.0 * 448.0), device=dev), # gsa = activation global scale
|
||||
gate_ws2=torch.tensor([gw_gs], device=dev, dtype=torch.float32), # gsb = weight global scale
|
||||
gate_input_scale=torch.tensor([1.0 / (6.0 * 448.0)], device=dev, dtype=torch.float32), # gsa = activation global scale
|
||||
)
|
||||
else:
|
||||
router.load_weights(e_bias=eb.to(dev, torch.float32))
|
||||
|
||||
Reference in New Issue
Block a user