Install pytorch with Cuda 12.1

I have a GPU Nvidia GTX 1650 with Cuda 12.1.
I want to install the pytorch with Cuda, but the latest version is Cuda 11.8 on the website.
Is it possible to install version 11.8 and I have 12.1?

Yes, the PyTorch binaries ship with their own CUDA runtime, cuDNN, NCCL etc. and will work with newer drivers. Your local CUDA toolkit will be used if you build PyTorch from source or a custom CUDA extension.