How to fix - SoojungHong/Riding_LLaMA-and-Fine-Tuning GitHub Wiki

All errors were fixed by setting up correct Conda Environment.

Make sure PyCharm project environment with correct Conda Environment.

Then, install all python library in correct conda environment.


Error 1 :

AssertionError: Torch not compiled with CUDA enabled

Solution 1 :

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 Install pytorch via https://pytorch.org/


Error 2 :

torch.cuda.is_available() false

Solution 2 :

Your graphics card does not support CUDA 9.0.

https://stackoverflow.com/questions/60987997/why-torch-cuda-is-available-returns-false-even-after-installing-pytorch-with


Error 3 :

ImportError: /home/soojung/anaconda3/envs/conda_env/lib/python3.10/site-packages/_cffi_backend.cpython-310-x86_64-linux-gnu.so: symbol ffi_type_uint32 version LIBFFI_BASE_7.0 not defined in file libffi.so.7 with link time reference thread '' panicked at 'Python API call failed', /croot/cryptography_1702070282333/_build_env/.cargo.Linux/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.18.3/src/err/mod.rs:790:5 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Solution 3 :

I had the same problem, following this thread https://github.com/pyca/cryptography/issues/4403, I solved the problem by reinstalling and upgrading with the command:

pip install -U cffi


ERROR 4 : CUDA OUT of memory

Solution : https://github.com/huggingface/transformers/issues/26203

⚠️ **GitHub.com Fallback** ⚠️