目录

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.

get_world_size_and_rank

Function that gets the current world size (aka total number of ranks) and rank number of the current process in the default process group.

文档

访问 PyTorch 的全面开发人员文档

查看文档

教程

获取面向初学者和高级开发人员的深入教程

查看教程

资源

查找开发资源并解答您的问题

查看资源