GPTQ-for-LLaMa
GPTQ-for-LLaMa copied to clipboard
Problem with setup_cuda.py install
Hi,
When running python setup_cuda.py install
I get the following error:
running install
running bdist_egg
running egg_info
writing quant_cuda.egg-info\PKG-INFO
writing dependency_links to quant_cuda.egg-info\dependency_links.txt
writing top-level names to quant_cuda.egg-info\top_level.txt
reading manifest file 'quant_cuda.egg-info\SOURCES.txt'
writing manifest file 'quant_cuda.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
error: [WinError 2] The system cannot find the file specified
I have no idea why this is happening. Any help would be appreciated.
I'm guessing you're missing VS build toolkit. https://github.com/qwopqwop200/GPTQ-for-LLaMa/issues/11#issuecomment-1462643016 - Need that for windows.
It's installed. Maybe something from it is not in path? I wouldn't know what though.
It's installed. Maybe something from it is not in path? I wouldn't know what though.
Open windows search by hitting Windows + S
and search native
. You should see x64 Native Tools Command Prompt for VS 2019
(make sure you do not select the wrong year if you already had another version installed like 2022). Also, since it's a cmd shell and not powershell you will need to run set DISTUTILS_USE_SDK=1
instead of $env:DISTUTILS_USE_SDK=1
.
That doesn't work either. I managed to run it in a docker image, but that's just a workaround. Unfortunately even that doesn't work for what I want to do.
That doesn't work either. I managed to run it in a docker image, but that's just a workaround. Unfortunately even that doesn't work for what I want to do.
same here. i am getting the exact same error, have tried everything and still getting this issue. i've also got VS 2019, i set DISTUTILS, i do everything and still no help.
I managed to find a workaround (It requires a bit of Linux knowledge). Install Ubuntu 22.04 from the Microsoft Store, then open it and follow the installation process for linux instead. I installed cuda in this linux too, but I'm not sure if it was necessary. If you do, just make sure that the cuda installed in your windows and linux are the same version, otherwise you'll run into errors.
I managed to find a workaround (It requires a bit of Linux knowledge). Install Ubuntu 22.04 from the Microsoft Store, then open it and follow the installation process for linux instead. I installed cuda in this linux too, but I'm not sure if it was necessary. If you do, just make sure that the cuda installed in your windows and linux are the same version, otherwise you'll run into errors.
can you speak to more detailed instructions? dying to run this.
like, where are the linux setup instructions? is it the same instructions once i have followed the WSL setup? how do i use the VSCode build tools in linux?
It's essentially the same thing, but you don't have to install build tools for it since linux comes with a C++ compiler.
ah yeah, it didn't work for me on linux, but it worked on python 3.10 with the alternate install workaround. it gave me a "CUDA extension not installed" message, but is currently loading the sharded checkpoints anyway.
If you are using conda try the following:
conda install cudatoolkit=11.7 -c conda-forge
conda install cuda -c nvidia/label/cuda-11.7.0
python setup_cuda.py install
ah yeah, it didn't work for me on linux, but it worked on python 3.10 with the alternate install workaround. it gave me a "CUDA extension not installed" message, but is currently loading the sharded checkpoints anyway.
Be aware: that wheel is an old (2 weeks, lmao) version and it may not work with the current patches.
For any lost souls who look for compiled kernels, it's probably best to use: https://github.com/jllllll/GPTQ-for-LLaMa-Wheels
currently using triton, so I don't think this problem will occur.
Yes of course, but not for windows users... I's a shame