Google colab - Unsloth notebook error PyTorch 2.3.1+cu121 with CUDA 1201 (you have 2.4.0+cu121)
I bump into this error while running google colab notebook.
xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.4.0+cu124) Python 3.10.14 (you have 3.10.12)Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Obviously my pytorch is default to a new version which doesn't work well due to the built dependencies.
To resolve that, I force my torch to version 2.3.1 and then restart my session. Then proceed to run the rest of the code in the notebook.
!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
!pip install torch==2.3.1
!pip install --no-deps "xformers==0.0.27" "trl<0.9.0" peft accelerate bitsandbytes triton
Comments