Spaces:
Runtime error
Runtime error: bitsandbytes cannot set up CUDA on the pinned 2023 stack — the pinned pair needs to move together
Startup currently fails while transformers imports the LLaMA model code:
RuntimeError: Failed to import transformers.models.llama.modeling_llama because of the following error: CUDA Setup failed despite GPU being available. Please run the following command to get more information: python -m bitsandbytes
requirements.txt pins the whole inference stack to mid-2023: torch==2.0.1, transformers==4.31.0, bitsandbytes==0.41.0, accelerate==0.21.0, peft==0.4.0. The failure is in bitsandbytes' CUDA setup, inside that pinned combination, on the GPU the platform now assigns — the app code itself is never reached.
What I could verify from outside: the traceback ends in bitsandbytes' setup, and every version in the chain is pinned, so no single line is the whole story. The decisive check is the one the error itself names: python -m bitsandbytes inside the Space's environment prints which CUDA library and compute capability it detected. If the pairing is the cause, as the pinned era suggests, the fix is to move the stack together (a current bitsandbytes with its matching torch), not to bump one pin at a time.
Check: after a stack bump, the same import should complete and startup should reach the gradio launch; the bitsandbytes diagnostic output is the evidence either way.