llama-cpp-python
llama-cpp-python copied to clipboard
OSError: exception: access violation reading 0x0000000000000000
OS: Windows 10 x64 Python 3.11 x64 pandas 2.2.3 llama-cpp-python 0.3.6
import pandas as pd
from llama_cpp import Llama
Llama(model_path='models/user-bge-m3-q4_k_m.gguf')
OSError: exception: access violation reading 0x0000000000000000
Solution: Load pandas after llama_cpp:
from llama_cpp import Llama
import pandas as pd
Llama(model_path='models/user-bge-m3-q4_k_m.gguf')
hello i dont use pandas in my project it still occurs, is there any solution alternatively?
+1 Also encountering this error on Windows (10/11) since 0.3.8. As @guney45, I don't use pandas too and calls llama_cpp before any other package.
Edit : My bad ... After further investigations, I discovered that I indeed use pandas : llama_cpp is actually loaded first, but inside a module called after other packages that implicitly depends on pandas. Importing first llama_cpp in my main script works fine and solved the issue.
Thanks for the tip @andretisch !
At first, I also did not use Panda, and got the same situation. I have followed @andretisch's tip. But it is still not working.