fix: the fp32-over-bf16 warning says it runs slowly

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
digital-garbage
2026-10-17 03:21:20 +03:00
co-authored by Claude Sonnet 5.5
parent ad6d6b54e6
commit eeaf72ba31
+1 -1
View File
@@ -53,7 +53,7 @@ def fp32_over_bf16(weight_dtype, compute_dtype, stored=None):
"""Why fp32 compute over bf16 weights is noisy, or None. It runs, but the activations go fp32 while the norm layers keep
their bf16 weights, so torch warns "Mismatch dtype between input and weight". Allowed, but said."""
if compute_dtype == "fp32" and (weight_dtype == "bf16" or (weight_dtype == "default" and stored == "bf16")):
return "bf16 weights dtype with fp32 precision is a bad combo for H3. Don't expect miracles."
return "bf16 weights dtype with fp32 precision is a bad combo for H3. Don't expect miracles: it runs, but slowly."
_SHORT = {"bfloat16": "bf16", "float16": "fp16", "float32": "fp32"}