nomic-ai / gpt4all

GPT4All: Run Local LLMs on Any Device. Open-source and available for commercial use.
https://nomic.ai/gpt4all
MIT License
69.11k stars 7.59k forks source link

[Feature] Supress libcudart.so.XX: cannot open shared object file: No such file or directory #2903

Open richard-hajek opened 3 weeks ago

richard-hajek commented 3 weeks ago

Suppress misleading errors

Hey,

I am currently running CUDA 12 and gpt4all CAN find it. However due to the fact that _pyllmodel.py#L64 tries to load many variations of the libcudart.so, it will always print at least some errors.

Is there any way to supress these when some valid library is found?

cebtenzzre commented 3 weeks ago

Could you provide some specific steps to reproduce this behavior? GPT4All already suppresses all DLL loading errors in that area of the code.

The common situation in which you will see a CUDA-related error that is not fatal is when you are not using the CUDA backend (device='cuda:...') but GPT4All tries to load the CUDA implementation anyway, which will print warnings to console about libcudart.so.11.0 or similar. These messages will appear if you have only CUDA 12 but are using the latest gpt4all package which requires CUDA 11, or if you do not have the NVIDIA driver (e.g. because you don't actually have an NVIDIA GPU).

richard-hajek commented 3 weeks ago

Hey,

I built a reproducible example

https://github.com/richard-hajek/repro-gpt4all/tree/main

Run docker build . --progress plain in this repo. It will reproduce the issue

image

richard-hajek commented 2 weeks ago

These messages will appear if you have only CUDA 12 but are using the latest gpt4all package which requires CUDA 11, or if you do not have the NVIDIA driver (e.g. because you don't actually have an NVIDIA GPU).

I have CUDA 12, no CUDA 11. But I'm not even using GPU and furthermore I've stepped in the debugger, it does manage to find the CUDA 12 so file