From b875b029791b4b5a4b189822030f72705cde026c Mon Sep 17 00:00:00 2001 From: HanishKVC Date: Sun, 5 May 2024 15:44:39 +0530 Subject: [PATCH] ChatON:Initial go at vicuna chat template in meta.json Have looked at tokenizer_config.json, jinja file and default hardcoded template in llama.cpp. This is also one of the models where a Global BoS is needed. NOTE: Have taken the liberty to also add a SYSTEM: prefix wrt system message, even thou default vicuna doesnt seem to need, but vicuna-orca seems to need, so that both models can be driven from same chat template config. I am assuming the system prefix should not create any problem even in default vicuna, however if it does create a problem one can duplicate the existing vicuna block in chaton_meta.json and make the system prefix empty in it. --- examples/chaton_meta.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/examples/chaton_meta.json b/examples/chaton_meta.json index c1e3229f0..70c05359d 100644 --- a/examples/chaton_meta.json +++ b/examples/chaton_meta.json @@ -378,6 +378,35 @@ "systemuser-system-has-end": true, "systemuser-1st-user-has-begin": true, "systemuser-1st-user-has-prefix": true + }, + "vicuna": { + "global": { + "begin": "", + "end": "" + }, + "system": { + "begin": "", + "prefix": "SYSTEM: ", + "suffix": "\n\n", + "end": "" + }, + "user": { + "begin": "", + "prefix": "USER: ", + "suffix": "\n", + "end": "" + }, + "assistant": { + "begin": "", + "prefix": "ASSISTANT: ", + "suffix": "\n", + "end": "" + }, + "reverse-prompt": "", + "systemuser-system-has-suffix": true, + "systemuser-system-has-end": true, + "systemuser-1st-user-has-begin": true, + "systemuser-1st-user-has-prefix": true } }