Separate deepseek bos from system message

This commit is contained in:
Kai Zau 2024-04-01 19:34:31 +08:00
parent 9165380c52
commit 1eebfc9f0f

View file

@ -15738,8 +15738,11 @@ static int32_t llama_chat_apply_template_internal(
// Use of both U+ff5c and U+007c pipes is deliberate, based on the Jinja template
for (auto message : chat) {
std::string role(message->role);
if (message == chat.front()) {
ss << "<begin▁of▁sentence>";
}
if (role == "system") {
ss << "<begin▁of▁sentence>" << message->content;
ss << message->content;
} else if (role == "user") {
ss << "### Instruction:\n" << message->content << "\n";
} else if (role == "assistant") {