src/transformers/modeling_utils.py/ModuleUtilsMixin/device
class ModuleUtilsMixin:    def device(self) -> device:
        """
        :obj:`torch.device`: The device on which the module is (assuming that all the module parameters are on the same
        device).
        """
        return get_parameter_device(self)