Everything seems a real mess
I'm using linux and I have installed version 0.37 from pip and it is not compiled with gpu support. I tried every version of b&b and combination of cuda versions and I either get not compiled with gpu support error or AttributeError: module 'bitsandbytes.nn' has no attribute 'Linear8bitLt'
I can also find no version specifically compiled for cuda 12.0 or 11.8 but they are mentioned as having better cuda detection in the 0.37 release notes.
At this point I give up. Why is the versioning and compiled versions such a mess?
Can you please post the output of python -m bitsandbytes. This will help me to debug.
Might've just installed the og repo because you're in a docker image that's a bit out of date. Also, I'd try to avoid 12.0 for a few more months (weeks?), even though I'm sure NVIDIA would love for you to switch yesterday. Have you tried compiling+installing from this repo, specifically? Ignore pip for a moment.
Can you please post the output of
python -m bitsandbytes. This will help me to debug.
I'm getting the same issue
the output of python -m bitsandbytes is the following:
Traceback (most recent call last):
File "/home/yes/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/yes/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/yes/anaconda3/lib/python3.9/site-packages/bitsandbytes/main.py", line 30, in
I'm not sure what needs to be updated but I'm just trying to run alpaca-lora-30b-int4 and running into a ton of issue. Any help would be appreciated.
I have the same situation on linux, I installed using pip install bitsandbytes-cuda117 and python -m bitsandbytes yields :
==============================WARNING: DEPRECATED!==============================
WARNING! This version of bitsandbytes is deprecated. Please switch to `pip install bitsandbytes` and the new repo: https://github.com/TimDettmers/bitsandbytes
==============================WARNING: DEPRECATED!==============================
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ DEBUG INFORMATION +++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Traceback (most recent call last):
File "/home/jp/miniconda3/envs/lora/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/jp/miniconda3/envs/lora/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/jp/miniconda3/envs/lora/lib/python3.9/site-packages/bitsandbytes/__main__.py", line 30, in <module>
from . import COMPILED_WITH_CUDA, PACKAGE_GITHUB_URL
ImportError: cannot import name 'COMPILED_WITH_CUDA' from 'bitsandbytes' (/home/jp/miniconda3/envs/lora/lib/python3.9/site-packages/bitsandbytes/__init__.py)
same issue, not just linux, Wndows too. PS C:\Users\PC\Downloads\AI\LLM\gpt4all\nomic> python -m bitsandbytes ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++ DEBUG INFORMATION +++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\bitsandbytes_main.py", line 30, in
I having this issue too. Just ran python -m bitsandbytes this is what I got:
===================================BUG REPORT=================================== Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
CUDA SETUP: CUDA runtime path found: /home/gomesd/miniconda3/envs/alpaca3/lib/libcudart.so CUDA SETUP: Highest compute capability among GPUs detected: 7.0 CUDA SETUP: Detected CUDA version 117 /home/gomesd/miniconda3/envs/alpaca3/lib/python3.9/site-packages/bitsandbytes/cuda_setup/main.py:136: UserWarning: WARNING: Compute capability < 7.5 detected! Only slow 8-bit matmul is supported for your GPU! warn(msg) CUDA SETUP: Required library version not found: libbitsandbytes_cuda117_nocublaslt.so. Maybe you need to compile it from source? CUDA SETUP: Defaulting to libbitsandbytes_cpu.so...
================================================ERROR===================================== CUDA SETUP: CUDA detection failed! Possible reasons:
- CUDA driver not installed
- CUDA not installed
- You have multiple conflicting CUDA libraries
- Required library not pre-compiled for this bitsandbytes release!
CUDA SETUP: If you compiled from source, try again with
make CUDA_VERSION=DETECTED_CUDA_VERSIONfor example,make CUDA_VERSION=113. CUDA SETUP: The CUDA version for the compile might depend on your conda install. Inspect CUDA version viaconda list | grep cuda. ================================================================================
CUDA SETUP: Something unexpected happened. Please compile from source: git clone [email protected]:TimDettmers/bitsandbytes.git cd bitsandbytes CUDA_VERSION=117 make cuda11x_nomatmul python setup.py install CUDA SETUP: CUDA runtime path found: /home/gomesd/miniconda3/envs/alpaca3/lib/libcudart.so CUDA SETUP: Highest compute capability among GPUs detected: 7.0 CUDA SETUP: Detected CUDA version 117 CUDA SETUP: Required library version not found: libbitsandbytes_cuda117_nocublaslt.so. Maybe you need to compile it from source? CUDA SETUP: Defaulting to libbitsandbytes_cpu.so...
================================================ERROR===================================== CUDA SETUP: CUDA detection failed! Possible reasons:
- CUDA driver not installed
- CUDA not installed
- You have multiple conflicting CUDA libraries
- Required library not pre-compiled for this bitsandbytes release!
CUDA SETUP: If you compiled from source, try again with
make CUDA_VERSION=DETECTED_CUDA_VERSIONfor example,make CUDA_VERSION=113. CUDA SETUP: The CUDA version for the compile might depend on your conda install. Inspect CUDA version viaconda list | grep cuda. ================================================================================
CUDA SETUP: Something unexpected happened. Please compile from source: git clone [email protected]:TimDettmers/bitsandbytes.git cd bitsandbytes CUDA_VERSION=117 make cuda11x_nomatmul python setup.py install CUDA SETUP: Setup Failed! CUDA SETUP: CUDA runtime path found: /home/gomesd/miniconda3/envs/alpaca3/lib/libcudart.so CUDA SETUP: Highest compute capability among GPUs detected: 7.0 CUDA SETUP: Detected CUDA version 117 CUDA SETUP: Required library version not found: libbitsandbytes_cuda117_nocublaslt.so. Maybe you need to compile it from source? CUDA SETUP: Defaulting to libbitsandbytes_cpu.so...
================================================ERROR===================================== CUDA SETUP: CUDA detection failed! Possible reasons:
- CUDA driver not installed
- CUDA not installed
- You have multiple conflicting CUDA libraries
- Required library not pre-compiled for this bitsandbytes release!
CUDA SETUP: If you compiled from source, try again with
make CUDA_VERSION=DETECTED_CUDA_VERSIONfor example,make CUDA_VERSION=113. CUDA SETUP: The CUDA version for the compile might depend on your conda install. Inspect CUDA version viaconda list | grep cuda. ================================================================================
CUDA SETUP: Something unexpected happened. Please compile from source: git clone [email protected]:TimDettmers/bitsandbytes.git cd bitsandbytes CUDA_VERSION=117 make cuda11x_nomatmul python setup.py install CUDA SETUP: Setup Failed! CUDA SETUP: CUDA runtime path found: /home/gomesd/miniconda3/envs/alpaca3/lib/libcudart.so CUDA SETUP: Highest compute capability among GPUs detected: 7.0 CUDA SETUP: Detected CUDA version 117 CUDA SETUP: Required library version not found: libbitsandbytes_cuda117_nocublaslt.so. Maybe you need to compile it from source? CUDA SETUP: Defaulting to libbitsandbytes_cpu.so...
================================================ERROR===================================== CUDA SETUP: CUDA detection failed! Possible reasons:
- CUDA driver not installed
- CUDA not installed
- You have multiple conflicting CUDA libraries
- Required library not pre-compiled for this bitsandbytes release!
CUDA SETUP: If you compiled from source, try again with
make CUDA_VERSION=DETECTED_CUDA_VERSIONfor example,make CUDA_VERSION=113. CUDA SETUP: The CUDA version for the compile might depend on your conda install. Inspect CUDA version viaconda list | grep cuda. ================================================================================
CUDA SETUP: Something unexpected happened. Please compile from source:
git clone [email protected]:TimDettmers/bitsandbytes.git
cd bitsandbytes
CUDA_VERSION=117 make cuda11x_nomatmul
python setup.py install
CUDA SETUP: Setup Failed!
CUDA SETUP: Something unexpected happened. Please compile from source:
git clone [email protected]:TimDettmers/bitsandbytes.git
cd bitsandbytes
CUDA_VERSION=117 make cuda11x_nomatmul
python setup.py install
Traceback (most recent call last):
File "/home/gomesd/miniconda3/envs/alpaca3/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/home/gomesd/miniconda3/envs/alpaca3/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/home/gomesd/miniconda3/envs/alpaca3/lib/python3.9/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/home/gomesd/miniconda3/envs/alpaca3/lib/python3.9/site-packages/bitsandbytes/init.py", line 7, in
Any updates on this issue please?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++ DEBUG INFORMATION +++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Traceback (most recent call last):
File "
Any updates. Please help!
AttributeError: module 'bitsandbytes.nn' has no attribute 'Linear8bitLt'
I managed to get go forward with pip install bitsandbytes and installing
the cudatoolkit package with conda.
On Thu, Apr 6, 2023, 7:37 a.m. samarthsarin @.***> wrote:
Any updates. Please help!
— Reply to this email directly, view it on GitHub https://github.com/TimDettmers/bitsandbytes/issues/185#issuecomment-1498926860, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGTL26TWWLHZDT22MP6M63W72TJFANCNFSM6AAAAAAVUCMWSA . You are receiving this because you commented.Message ID: @.***>
I too get the error after installing cudatoolkit.
This worked for me:
pip uninstall bitsandbytes
pip install bitsandbytes
I have the same issue
I am also faced with this issue:
AttributeError: module 'bitsandbytes.nn' has no attribute 'Linear8bitLt'
Using:
WSL
11.8 Toolkit (nvcc -V)
pip install bitsandbytes
I have the same issue
I have resolved this problem. see the issue: https://github.com/TimDettmers/bitsandbytes/issues/305#issuecomment-1507841745
I have the same issue
I have resolved this problem.
see the issue: https://github.com/TimDettmers/bitsandbytes/issues/305#issuecomment-1507841745
No you haven't. The issue still persists.
Reinstalling cuda may have worked for you but you assume people are using conda, I am not.
I have worked around this issue but it still happens.
One of the problems is that the library does not look in all the right file paths for cuda, specifically on arch it looks on the wrong place.
So you need to set the environment variable to point to the right cuda path.
Super annoying, as the error messages are miss leading.
Any updates. Please help!
AttributeError: module 'bitsandbytes.nn' has no attribute 'Linear8bitLt'
I'm also facing the same issue. Any fix?
Any updates. Please help! AttributeError: module 'bitsandbytes.nn' has no attribute 'Linear8bitLt'
I'm also facing the same issue. Any fix?
Uninstall bitsandbytes and compile it from scratch (might be a bit elaborate, depending on your setup). This solved it for me though.
i am having the same issue after pip install bitsandbytes-cu117.
but perhaps @TimDettmers is not the one (at all) to blame for this "mess" :| various OS, cuda versions, hardwares.
Same issue here, tried everything you can imagine including compiling bitsandbytes from here, following your instructions. Cuda 117, WSL... Textgen UI complains it's not compiled with CUDA... Or it fails with attribute error (no linear8bit bla bla bla....
AttributeError: module 'bitsandbytes.nn' has no attribute 'Linear8bitLt'
Doing a wipe of nvidia-* and reinstalling fixed the issue for me. The below documentation is for WSL Linux but it should also work for most other distros; consider the following steps:
https://github.com/afogarty85/AzureDataEngineering-DeepLearning/blob/main/DeepLearning/LinuxCUDASetup.sh