change deepseek-lite to deepseek2

This commit is contained in:
ngxson 2024-06-27 22:04:23 +02:00
parent 7d9117ab5a
commit 736c4948c0
2 changed files with 5 additions and 5 deletions

View file

@ -19614,8 +19614,8 @@ static int32_t llama_chat_apply_template_internal(
ss << trim(message->content); ss << trim(message->content);
} }
} }
} else if (tmpl == "deepseek-lite" || tmpl_contains("'Assistant: ' + message['content'] + eos_token")) { } else if (tmpl == "deepseek2" || tmpl_contains("'Assistant: ' + message['content'] + eos_token")) {
// DeepSeek-Coder-V2-Lite-Instruct-GGUF // DeepSeek-V2
std::string eos_token = u8"<end▁of▁sentence>"; std::string eos_token = u8"<end▁of▁sentence>";
for (auto message : chat) { for (auto message : chat) {
std::string role(message->role); std::string role(message->role);
@ -19628,7 +19628,7 @@ static int32_t llama_chat_apply_template_internal(
} }
} }
if (add_ass) { if (add_ass) {
ss << "Assistant: "; ss << "Assistant:";
} }
} else { } else {
// template not supported // template not supported

View file

@ -100,8 +100,8 @@ int main(void) {
"<|system|>\nYou are a helpful assistant<|end|>\n<|user|>\nHello<|end|>\n<|assistant|>\nHi there<|end|>\n<|user|>\nWho are you<|end|>\n<|assistant|>\n I am an assistant <|end|>\n<|user|>\nAnother question<|end|>\n<|assistant|>\n", "<|system|>\nYou are a helpful assistant<|end|>\n<|user|>\nHello<|end|>\n<|assistant|>\nHi there<|end|>\n<|user|>\nWho are you<|end|>\n<|assistant|>\n I am an assistant <|end|>\n<|user|>\nAnother question<|end|>\n<|assistant|>\n",
// MiniCPM-3B-OpenHermes-2.5-v2-GGUF // MiniCPM-3B-OpenHermes-2.5-v2-GGUF
u8"You are a helpful assistant<用户>Hello<AI>Hi there<用户>Who are you<AI>I am an assistant<用户>Another question<AI>", u8"You are a helpful assistant<用户>Hello<AI>Hi there<用户>Who are you<AI>I am an assistant<用户>Another question<AI>",
// DeepSeek-Coder-V2-Lite-Instruct-GGUF // DeepSeek-V2
u8"You are a helpful assistant\n\nUser: Hello\n\nAssistant: Hi there<end▁of▁sentence>User: Who are you\n\nAssistant: I am an assistant <end▁of▁sentence>User: Another question\n\nAssistant: ", u8"You are a helpful assistant\n\nUser: Hello\n\nAssistant: Hi there<end▁of▁sentence>User: Who are you\n\nAssistant: I am an assistant <end▁of▁sentence>User: Another question\n\nAssistant:",
}; };
std::vector<char> formatted_chat(1024); std::vector<char> formatted_chat(1024);
int32_t res; int32_t res;