We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 327be31 commit 18c93d8Copy full SHA for 18c93d8
src/PyLlama.cpp
@@ -2,7 +2,7 @@
2
#include "llama.h"
3
#include "utils.h"
4
#include <pybind11/pybind11.h>
5
-
+#include <pybind11/stl.h>
6
7
namespace py = pybind11;
8
@@ -147,6 +147,7 @@ PYBIND11_MODULE(llamacpp, m) {
147
148
py::class_<PyLLAMA>(m, "PyLLAMA")
149
.def(py::init<gpt_params>())
150
+ .def("tokenize", &PyLLAMA::tokenize, "Tokenize text")
151
.def("prepare_context", &PyLLAMA::prepare_context, "Prepare the LLaMA context")
152
.def("add_bos", &PyLLAMA::add_bos, "Add a BOS token to the input")
153
.def("update_input", &PyLLAMA::update_input, "Update input as text")
0 commit comments