Fix issue of missing words due to buffer overflow

This commit is contained in:
manasmagdum 2023-08-27 16:39:46 +05:30 committed by GitHub
parent 9ab49bc1d4
commit 4100bdec31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -445,7 +445,7 @@ class Llama:
"""
assert self.model is not None
output = b""
size = 8
size = 16
buffer = (ctypes.c_char * size)()
for token in tokens:
n = llama_cpp.llama_token_to_str_with_model(