You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer the following questions for yourself before submitting an issue.
13
+
14
+
-[ ] I am running the latest code. Development is very rapid so there are no tagged versions as of now.
15
+
-[ ] I carefully followed the [README.md](https://github.com/abetlen/llama-cpp-python/blob/main/README.md).
16
+
-[ ] I [searched using keywords relevant to my issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests) to make sure that I am creating a new issue that is not already open (or closed).
17
+
-[ ] I reviewed the [Discussions](https://github.com/abetlen/llama-cpp-python/discussions), and have a new bug or useful enhancement to share.
18
+
19
+
# Expected Behavior
20
+
21
+
Please provide a detailed written description of what you were trying to do, and what you expected `llama-cpp-python` to do.
22
+
23
+
# Current Behavior
24
+
25
+
Please provide a detailed written description of what `llama-cpp-python` did, instead.
26
+
27
+
# Environment and Context
28
+
29
+
Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.
30
+
31
+
* Physical (or virtual) hardware you are using, e.g. for Linux:
32
+
33
+
`$ lscpu`
34
+
35
+
* Operating System, e.g. for Linux:
36
+
37
+
`$ uname -a`
38
+
39
+
* SDK version, e.g. for Linux:
40
+
41
+
```
42
+
$ python3 --version
43
+
$ make --version
44
+
$ g++ --version
45
+
```
46
+
47
+
# Failure Information (for bugs)
48
+
49
+
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
50
+
51
+
# Steps to Reproduce
52
+
53
+
Please provide detailed steps for reproducing the issue. We are not sitting in front of your screen, so the more detail the better.
54
+
55
+
1. step 1
56
+
2. step 2
57
+
3. step 3
58
+
4. etc.
59
+
60
+
**Note: Many issues seem to be regarding performance issues / differences with `llama.cpp`. In these cases we need to confirm that you're comparing against the version of `llama.cpp` that was built with your python package, and which parameters you're passing to the context.**
61
+
62
+
# Failure Logs
63
+
64
+
Please include any relevant log snippets or files. If it works under one configuration but not under another, please provide logs for both configurations and their corresponding outputs so it is easy to see where behavior changes.
65
+
66
+
Also, please try to **avoid using screenshots** if at all possible. Instead, copy/paste the console output and use [Github's markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) to cleanly format your logs for easy readability.
67
+
68
+
Example environment info:
69
+
```
70
+
llama-cpp-python$ git log | head -1
71
+
commit 47b0aa6e957b93dbe2c29d53af16fbae2dd628f2
72
+
73
+
llama-cpp-python$ python3 --version
74
+
Python 3.10.10
75
+
76
+
llama-cpp-python$ pip list | egrep "uvicorn|fastapi|sse-starlette"
The low-level API is a direct `ctypes` binding to the C API provided by `llama.cpp`.
94
-
The entire API can be found in [llama_cpp/llama_cpp.py](https://github.com/abetlen/llama-cpp-python/blob/master/llama_cpp/llama_cpp.py) and should mirror [llama.h](https://github.com/ggerganov/llama.cpp/blob/master/llama.h).
110
+
The low-level API is a direct [`ctypes`](https://docs.python.org/3/library/ctypes.html) binding to the C API provided by `llama.cpp`.
111
+
The entire lowe-level API can be found in [llama_cpp/llama_cpp.py](https://github.com/abetlen/llama-cpp-python/blob/master/llama_cpp/llama_cpp.py) and directly mirrors the C API in [llama.h](https://github.com/ggerganov/llama.cpp/blob/master/llama.h).
112
+
113
+
Below is a short example demonstrating how to use the low-level API to tokenize a prompt:
0 commit comments