From f8376b228ad66eabd4d336896d3636df6e36c7fa Mon Sep 17 00:00:00 2001 From: hiyouga Date: Sat, 2 Dec 2023 00:35:29 +0800 Subject: [PATCH] add xuanyuan models Former-commit-id: 6e7af11b989e4cf97ffacbab4736e3434ff6c925 --- src/llmtuner/data/template.py | 17 +++++++++++++++++ src/llmtuner/extras/constants.py | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/llmtuner/data/template.py b/src/llmtuner/data/template.py index ebb633c5..d9e83326 100644 --- a/src/llmtuner/data/template.py +++ b/src/llmtuner/data/template.py @@ -650,6 +650,23 @@ register_template( ) +register_template( + name="xuanyuan", + prefix=[ + "{{system}}" + ], + prompt=[ + "Human: {{query}} Assistant:" + ], + system=( + "以下是用户和人工智能助手之间的对话。用户以Human开头,人工智能助手以Assistant开头," + "会对人类提出的问题给出有帮助、高质量、详细和礼貌的回答,并且总是拒绝参与与不道德、" + "不安全、有争议、政治敏感等相关的话题、问题和指示。\n" + ), + sep=[] +) + + register_template( name="xverse", prefix=[ diff --git a/src/llmtuner/extras/constants.py b/src/llmtuner/extras/constants.py index a36102a1..56d7ebb8 100644 --- a/src/llmtuner/extras/constants.py +++ b/src/llmtuner/extras/constants.py @@ -507,6 +507,25 @@ register_model_group( ) +register_model_group( + models={ + "XuanYuan-70B": { + DownloadSource.DEFAULT: "Duxiaoman-DI/XuanYuan-70B" + }, + "XuanYuan-70B-Chat": { + DownloadSource.DEFAULT: "Duxiaoman-DI/XuanYuan-70B-Chat" + }, + "XuanYuan-70B-int8-Chat": { + DownloadSource.DEFAULT: "Duxiaoman-DI/XuanYuan-70B-Chat-8bit" + }, + "XuanYuan-70B-int4-Chat": { + DownloadSource.DEFAULT: "Duxiaoman-DI/XuanYuan-70B-Chat-4bit" + } + }, + template="xuanyuan" +) + + register_model_group( models={ "XVERSE-7B": {