Installing the auto-gptq Python module
When switching LLMs to a GPTQ model, my program suddenly started to fail because it required some new modules (the joys of Python dependency management): importlib.metadata.PackageNotFoundError: No package metadata was found for auto-gptq So, I tried installing auto-gptq but that was having problems: Building cuda extension requires PyTorch (>=1.13.0) being installed, please install PyTorch first: No module named 'torch' Even though, I definitely had torch installed. Well, I had it installed in my venv using PDM , perhaps that's the problem. I recommend trying to install it globally, first deactivate your venv: deactivate Then install torch: pip install torch --upgrade Then try the auto-gptq install again. Another approach, if you don't need CUDA support, is to disable the building of the CUDA extension: export BUILD_CUDA_EXT=0 Then try installing auto-gptq again, that worked for me.