johnsmith0031 / alpaca_lora_4bit

MIT License
533 stars 84 forks source link

Met Cuda version mismatch error when trying to install via `pip install -r requirements.txt` #72

Open jiayhuang opened 1 year ago

jiayhuang commented 1 year ago

I met some pip installation errors of

RuntimeError:
      The detected CUDA version (12.1) mismatches the version that was used to compile
      PyTorch (11.7). Please make sure to use the same CUDA versions.

when I am following the instruction to install the project.

From some stackoverflow searches, looks like we need to compile Pytorch for CUDA 12 in order to fix it. Not quite sure if there is an easier way to fix the issue here :)

johnsmith0031 commented 1 year ago

Maybe your pytorch version mismatch your cuda version?

andybarry commented 1 year ago

This can happen when you have installed CUDA yourself at 12.1 and you are getting pytorch from pip. Pip is giving you a binary of pytorch which was built with CUDA 11.7. You need to downgrade CUDA to 11.7 or use the docker image which has CUDA 11.7.