This commit is contained in:
2026-05-14 18:40:15 +00:00
parent 1150e325bb
commit 072a1d4a0b
2 changed files with 12 additions and 5 deletions

View File

@@ -7,10 +7,16 @@ services:
- "8000:8000"
environment:
- OMP_NUM_THREADS=128
- CUDA_LAUNCH_BLOCKING=0
- TORCH_SHOW_CPP_STACKTRACES=0
- MEGA_MOE_DEBUG=0
- MEGA_MOE_STATIC=0
- NVFP4_DEBUG=0
- NVFP4_DEBUG_SYNC=0
- SKIP_ATTENTION=0
- MEGA_MOE_USE_CUTLASS=1
- DG_JIT_DEBUG=0
- DEEP_GEMM_JIT_DEBUG=0
command:
- /model
- --trust-remote-code

View File

@@ -1586,10 +1586,11 @@ class DeepseekV4Model(nn.Module):
try:
weight_loader(param, loaded_weight, shard_id)
except (AssertionError, ValueError, RuntimeError) as e:
print(f'[DEBUG-STACK] FAILED: name={name} shard_id={shard_id} '
f'param.shape={param.shape} param.dtype={param.data.dtype} '
f'loaded.shape={loaded_weight.shape} loaded.dtype={loaded_weight.dtype} err={e}')
raise
raise RuntimeError(
f'Weight load failed: name={name} shard_id={shard_id} '
f'param.shape={param.shape} param.dtype={param.data.dtype} '
f'loaded.shape={loaded_weight.shape} loaded.dtype={loaded_weight.dtype}'
) from e
loaded_params.add(name)
break
else:
@@ -1866,7 +1867,7 @@ class DeepseekV4Model(nn.Module):
total_fp8 = fp8_converted + fp8_from_bf16
total_bf16 = bf16_converted + compressor_converted
if total_fp8 > 0 or total_bf16 > 0:
if int(os.environ.get('NVFP4_DEBUG', '0')) and (total_fp8 > 0 or total_bf16 > 0):
print(f"NVFP4 post-load: {fp8_converted} NVFP4->FP8, "
f"{fp8_from_bf16} BF16->FP8, "
f"{bf16_converted} attn/shared->BF16, "