From 52fc24d1664bc701f43e2bff8b3faded795b929c Mon Sep 17 00:00:00 2001 From: hiyouga Date: Fri, 27 Oct 2023 22:15:25 +0800 Subject: [PATCH] fix vicuna template --- README.md | 4 ++-- README_zh.md | 4 ++-- src/llmtuner/extras/template.py | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 689e0742..b858d48e 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,8 @@ https://github.com/hiyouga/LLaMA-Factory/assets/16256802/6ba60acc-e2e2-4bec-b846 > **Default module** is used for the `--lora_target` argument, you can use `--lora_target all` to specify all the available modules. > > For the "base" models, the `--template` argument can be chosen from `default`, `alpaca`, `vicuna` etc. But make sure to use the **corresponding template** for the "chat" models. -> -> Please refer to [template.py](src/llmtuner/extras/template.py) for a full list of models we supported. + +Please refer to [template.py](src/llmtuner/extras/template.py) for a full list of models we supported. ## Supported Training Approaches diff --git a/README_zh.md b/README_zh.md index 13b160ce..ab277bd3 100644 --- a/README_zh.md +++ b/README_zh.md @@ -68,8 +68,8 @@ https://github.com/hiyouga/LLaMA-Factory/assets/16256802/6ba60acc-e2e2-4bec-b846 > **默认模块**应作为 `--lora_target` 参数的默认值,可使用 `--lora_target all` 参数指定全部模块。 > > 对于所有“基座”(Base)模型,`--template` 参数可以是 `default`, `alpaca`, `vicuna` 等任意值。但“对话”(Chat)模型请务必使用**对应的模板**。 -> -> 项目所支持模型的完整列表请参阅 [template.py](src/llmtuner/extras/template.py)。 + +项目所支持模型的完整列表请参阅 [template.py](src/llmtuner/extras/template.py)。 ## 训练方法 diff --git a/src/llmtuner/extras/template.py b/src/llmtuner/extras/template.py index ac054837..0b311541 100644 --- a/src/llmtuner/extras/template.py +++ b/src/llmtuner/extras/template.py @@ -336,7 +336,7 @@ register_template( "{{system}}" ], prompt=[ - "USER: {{query}} ASSISTANT: " + "USER: {{query}} ASSISTANT:" ], system=( "A chat between a curious user and an artificial intelligence assistant. " @@ -366,6 +366,7 @@ register_template( r""" Supports: https://huggingface.co/IDEA-CCNL/Ziya-LLaMA-13B-v1 + https://huggingface.co/IDEA-CCNL/Ziya-LLaMA-13B-v1.1 https://huggingface.co/IDEA-CCNL/Ziya2-13B-Chat """ register_template( @@ -397,7 +398,7 @@ register_template( "{{system}}" ], prompt=[ - "Human: {{query}}###Assistant: " + "Human: {{query}}###Assistant:" ], system=( "A chat between a curious human and an artificial intelligence assistant. "