debug: add shape/dtype logging to finalize_weights
This commit is contained in:
@@ -625,6 +625,14 @@ class DeepseekV4MegaMoEExperts(nn.Module):
|
||||
self._check_runtime_supported()
|
||||
from deep_gemm.mega import transform_nvfp4_weights_for_mega_moe
|
||||
|
||||
# Debug: log shapes/dtypes before transform
|
||||
print(f"[NVFP4-MoE] w13_weight: shape={self.w13_weight.shape} dtype={self.w13_weight.dtype}")
|
||||
print(f"[NVFP4-MoE] w13_weight_scale: shape={self.w13_weight_scale.shape} dtype={self.w13_weight_scale.dtype}")
|
||||
print(f"[NVFP4-MoE] w13_weight_scale_2: shape={self.w13_weight_scale_2.shape} dtype={self.w13_weight_scale_2.dtype}")
|
||||
print(f"[NVFP4-MoE] w2_weight: shape={self.w2_weight.shape} dtype={self.w2_weight.dtype}")
|
||||
print(f"[NVFP4-MoE] w2_weight_scale: shape={self.w2_weight_scale.shape} dtype={self.w2_weight_scale.dtype}")
|
||||
print(f"[NVFP4-MoE] w2_weight_scale_2: shape={self.w2_weight_scale_2.shape} dtype={self.w2_weight_scale_2.dtype}")
|
||||
|
||||
# === Native NVFP4 path ===
|
||||
# The DeepGEMM nvfp4 mega_moe kernel consumes NVFP4 directly:
|
||||
# - E2M1 packed uint8 (same as checkpoint)
|
||||
|
||||
Reference in New Issue
Block a user