summaryrefslogtreecommitdiff
path: root/llama.h
diff options
context:
space:
mode:
authorKerfuffle <44031344+KerfuffleV2@users.noreply.github.com>2023-11-16 19:14:37 -0700
committerGitHub <noreply@github.com>2023-11-16 19:14:37 -0700
commit91f6499393d2d999331fbfdba47a7f8b9f913f0d (patch)
tree27caf3ad0b9cec979bb5ed3317b5334bdcd9470c /llama.h
parent8da46278e1a57107591653275f8e03a281de94f0 (diff)
Respect tokenizer.ggml.add_bos_token value when tokenizing (#4040)
* gguf-py: gguf-dump: Respect --no-tensor flag in JSON mode. * Respect add_bos_token GGUF metadata value * gguf-py: Try to fix SpecialVocab giving up too easily for the Nth time
Diffstat (limited to 'llama.h')
-rw-r--r--llama.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llama.h b/llama.h
index e8dc04bb..0a5d6c60 100644
--- a/llama.h
+++ b/llama.h
@@ -517,6 +517,12 @@ extern "C" {
LLAMA_API llama_token llama_token_eos(const struct llama_model * model); // end-of-sentence
LLAMA_API llama_token llama_token_nl (const struct llama_model * model); // next-line
+ // Returns -1 if unknown, 1 for true or 0 for false.
+ LLAMA_API int llama_add_bos_token(const struct llama_model * model);
+
+ // Returns -1 if unknown, 1 for true or 0 for false.
+ LLAMA_API int llama_add_eos_token(const struct llama_model * model);
+
// codellama infill tokens
LLAMA_API llama_token llama_token_prefix(const struct llama_model * model); // Beginning of infill prefix
LLAMA_API llama_token llama_token_middle(const struct llama_model * model); // Beginning of infill middle