fix vicuna template

This commit is contained in:
hiyouga 2023-10-27 22:15:25 +08:00
parent 4117f38827
commit 52fc24d166
3 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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)。
## 训练方法

View File

@ -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. "