Skip to content

Commit aecb57d

Browse files
committed
Fix HF model dtype fallback in forward_pass_logit_checker
1 parent 7538cd4 commit aecb57d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/utils/forward_pass_logit_checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def main(config, test_args): # pylint: disable=W0621
428428
}
429429

430430
# Default to bfloat16 if dtype is unrecognized
431-
torch_dtype = dtype_mapping.get(config.dtype.name, torch.bfloat16)
431+
torch_dtype = dtype_mapping.get(config.dtype.name.lower(), torch.bfloat16)
432432
max_logging.log(f"Loading HF model with dtype: {torch_dtype} (derived from config.dtype: {config.dtype})")
433433

434434
hf_model = AutoModelForCausalLM.from_pretrained(

0 commit comments

Comments
 (0)