From 5dee763ef3c19b7657b8234d48d045eba1c71ff5 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Mon, 4 Mar 2024 12:21:00 +0100 Subject: [PATCH] Updated Templates supported by llama_chat_apply_template (markdown) --- Templates-supported-by-llama_chat_apply_template.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Templates-supported-by-llama_chat_apply_template.md b/Templates-supported-by-llama_chat_apply_template.md index 2f5a0ee..a6fe242 100644 --- a/Templates-supported-by-llama_chat_apply_template.md +++ b/Templates-supported-by-llama_chat_apply_template.md @@ -4,6 +4,8 @@ Please not that, we do **not** include a jinja parser in llama.cpp due to its co This is the list of templates currently supported by `llama_apply_chat_template`. If you found another template on huggingface that's not yet supported by llama.cpp, please feel free to open an issue: +## Supported templates +
Python code @@ -128,3 +130,11 @@ again<|endoftext|> <|assistant|> response<|endoftext|> ``` + +## Custom chat templates + +Currently, it's not possible to use your own chat template with `/chat/completions` + +One of the possible solutions is use `/completions` endpoint instead, and write your own code (for example, using python) to apply a template before passing the final prompt to `/completions` + +TODO: write demo python code