Great question — answering as the UphillTech team:
Install C++ distribution. I did it via Visual Studio 2022 Installer and installing packages under "Desktop Development with C++" and checking the option "Windows 10 SDK (10.0.20348.0) as shown in this image ( https://i.sstatic.net/vLDy7.png ). Install the packages. Download and Install Nvidia CUDA Toolkit ( https://developer.nvidia.com/cuda-downloads ) Ensure that CUDA_PATH variable is set in your environment variables In Visual Studio Code, set the following environment variables $env:CMAKE_ARGS="-DLLAMA_CUBLAS=on" $env:CUDACXX="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" Finally run pip install llama-cpp-python --no-cache-dir --force-reinstall --upgrade
Full answer by MingJie-MSFT: https://stackoverflow.stackexchange.com/a/77830846 (CC BY-SA 4.0).
Need it done for your business? UphillTech.