Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem accessing libctransformers.so #211

Open
Ajayvenki opened this issue Jul 26, 2024 · 1 comment
Open

Problem accessing libctransformers.so #211

Ajayvenki opened this issue Jul 26, 2024 · 1 comment

Comments

@Ajayvenki
Copy link

I am trying to dockerize a LLM (Mistral) on my local laptop using Ctransformers. For some reason I am noticing a weird error below. However, the same is not happening If I run the model locally in my laptop. Could you let me know if there is any compatibility issues with mistral LLM and ctransformers. I am using python version 3.12 and I tried with all other version. Nothing is working. Your help will be much appreciated.

Traceback (most recent call last):
File "/usr/src/app/app.py", line 9, in
llm = CTransformers(
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pydantic/v1/main.py", line 339, in init
values, fields_set, validation_error = validate_model(pydantic_self.class, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pydantic/v1/main.py", line 1100, in validate_model
values = validator(cls_, values)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/langchain_community/llms/ctransformers.py", line 72, in validate_environment
values["client"] = AutoModelForCausalLM.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ctransformers/hub.py", line 173, in from_pretrained
return LLM(
^^^^
File "/usr/local/lib/python3.12/site-packages/ctransformers/llm.py", line 237, in init
self._lib = load_library(lib, cuda=config.gpu_layers > 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ctransformers/llm.py", line 124, in load_library
lib = CDLL(path)
^^^^^^^^^^
File "/usr/local/lib/python3.12/ctypes/init.py", line 379, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /usr/local/lib/python3.12/site-packages/ctransformers/lib/basic/libctransformers.so: cannot open shared object file: No such file or directory

Solution i have tried:
I have tried this after a research and it dint work as well - #9 (comment)

I gave a latest comment in the JIRA, could u help

@Ajayvenki
Copy link
Author

@marella

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant