`torch.device`: The device on which the module is (assuming that all the module parameters are on the same device).
(self: "PreTrainedModel")
| 904 | |
| 905 | @property |
| 906 | def device(self: "PreTrainedModel") -> torch.device: |
| 907 | """ |
| 908 | `torch.device`: The device on which the module is (assuming that all the module parameters are on the same |
| 909 | device). |
| 910 | """ |
| 911 | return next(param.device for param in self.parameters()) |
| 912 | |
| 913 | @property |
| 914 | def dtype(self: "PreTrainedModel") -> torch.dtype: |
no outgoing calls