How do I run PyTorch and Huggingface models on Apple Silicon (M1) GPU? This traditional way doesn’t seem to work
import torch
device = torch.cuda.current_device() if torch.cuda.is_available() else 'cpu'
print(f"device: {device}")
How do I run PyTorch and Huggingface models on Apple Silicon (M1) GPU? This traditional way doesn’t seem to work
import torch
device = torch.cuda.current_device() if torch.cuda.is_available() else 'cpu'
print(f"device: {device}")