From 92c393dc2ae9fcc13d4c312e74d379b160354318 Mon Sep 17 00:00:00 2001 From: hiyouga Date: Tue, 18 Jul 2023 15:51:48 +0800 Subject: [PATCH] fix webUI, fix #171 #177 Former-commit-id: 6f9360c0bdc36ed2c6d0881136b191c96535ffc0 --- src/llmtuner/extras/template.py | 14 +++++++++++++- src/llmtuner/webui/locales.py | 8 ++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/llmtuner/extras/template.py b/src/llmtuner/extras/template.py index 49b20893..52f3f8a1 100644 --- a/src/llmtuner/extras/template.py +++ b/src/llmtuner/extras/template.py @@ -203,6 +203,18 @@ register_template( name="baichuan", prefix="", prompt="{query}", - sep="", + sep="", + use_history=True +) + + +r""" +Supports: https://huggingface.co/HuggingFaceH4/starchat-alpha + https://huggingface.co/HuggingFaceH4/starchat-beta +""" +register_template( + prefix="<|system|>\n", + prompt="<|user|>\n{query}<|end|>\n<|assistant|>\n", + sep="<|end|>\n", use_history=True ) diff --git a/src/llmtuner/webui/locales.py b/src/llmtuner/webui/locales.py index 817fd316..398f3c75 100644 --- a/src/llmtuner/webui/locales.py +++ b/src/llmtuner/webui/locales.py @@ -325,6 +325,14 @@ LOCALES = { "label": "最大长度" } }, + "max_new_tokens": { + "en": { + "label": "Maximum new tokens" + }, + "zh": { + "label": "最大生成长度" + } + }, "top_p": { "en": { "label": "Top-p"