> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# nemo_automodel.shared.utils

## Module Contents

### Functions

| Name                                                            | Description                                                       |
| --------------------------------------------------------------- | ----------------------------------------------------------------- |
| [`dtype_from_str`](#nemo_automodel-shared-utils-dtype_from_str) | Translate a str val of a dtype into the corresponding torch.dtype |

### API

```python
nemo_automodel.shared.utils.dtype_from_str(
    val,
    default = torch.bfloat16
)
```

Translate a str val of a dtype into the corresponding torch.dtype
Args:
val (str): the dotted path of the dtype (e.g., "torch.bfloat16").

**Returns:**

torch.dtype: the actual dtype (e.g., torch.bfloat16)