Shortcuts

torchtune.utils

Miscellaneous

batch_to_device

Function that takes a dictionary (or nested dictionary) of tensors and sets them all to the same device.

get_device

Function that takes an optional device string, verifies it's correct and available given the machine and distributed settings, and returns a device().

get_logger

Get a logger with a stream handler.

torch_version_ge

Check if torch version is greater than or equal to the given version.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources