Facing issue during Training of LLM in `Finetuning large language model`

This error is appearing during training of LLM on my Mac M2 pro:
Is because PyTorch is gpu,npu & xpu supported and will not run on metal supported Mac?

ImportError: Using the Trainer with PyTorch requires accelerate>=0.21.0: Please run pip install transformers[torch] or pip install accelerate -U

adding to this I tried installing libraries pip install transformers[torch] didn’t worked and after installing pip install accelerate -U I am getting same issue. This code I am running on local not on deep learning labs