nemo_automodel.shared.utils#
Module Contents#
Functions#
Translate a str val of a dtype into the corresponding torch.dtype |
API#
- nemo_automodel.shared.utils.dtype_from_str(val, default=torch.bfloat16)#
Translate a str val of a dtype into the corresponding torch.dtype
- Parameters:
val (str) – the dotted path of the dtype (e.g., “torch.bfloat16”).
- Returns:
the actual dtype (e.g., torch.bfloat16)
- Return type:
torch.dtype