abetlen / abetlen/llama-cpp-python

UnsupportedOperation: fileno in Llava15ChatHandler

Open
#1,041 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
10.6k
Forks
1.4k
PR merge metrics
PR metrics pending

Description

llama-cpp-python version 0.2.25 | build with cublas -> Nvidia T4

Tested with llava model: https://huggingface.co/mys/ggml_llava-v1.5-13b

```python
chat_handler = Llava15ChatHandler(clip_model_path = "./llava-ggml-model-mmproj-model.gguf")
```
```console
UnsupportedOperation Traceback (most recent call last)
in
----> 1 chat_handler = Llava15ChatHandler(clip_model_path = "./llava-ggml-model-mmproj-model.gguf")

/opt/conda/lib/python3.8/site-packages/llama_cpp/llama_chat_format.py in __init__(self, clip_model_path, verbose)
1069 self._clip_free = self._llava_cpp._libllava.clip_free # type: ignore
1070
-> 1071 with suppress_stdout_stderr(disable=self.verbose):
1072 self.clip_ctx = self._llava_cpp.clip_model_load(
1073 self.clip_model_path.encode(), 0

/opt/conda/lib/python3.8/site-packages/llama_cpp/_utils.py in __enter__(self)
25 self.errnull_file = self.open(self.os.devnull, "w")
26
---> 27 self.old_stdout_fileno_undup = self.sys.stdout.fileno()
28 self.old_stderr_fileno_undup = self.sys.stderr.fileno()
29

UnsupportedOperation: fileno
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.