Separate deepseek bos from system message
This commit is contained in:
parent
9165380c52
commit
1eebfc9f0f
1 changed files with 4 additions and 1 deletions
|
@ -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
|
// Use of both U+ff5c and U+007c pipes is deliberate, based on the Jinja template
|
||||||
for (auto message : chat) {
|
for (auto message : chat) {
|
||||||
std::string role(message->role);
|
std::string role(message->role);
|
||||||
|
if (message == chat.front()) {
|
||||||
|
ss << "<|begin▁of▁sentence|>";
|
||||||
|
}
|
||||||
if (role == "system") {
|
if (role == "system") {
|
||||||
ss << "<|begin▁of▁sentence|>" << message->content;
|
ss << message->content;
|
||||||
} else if (role == "user") {
|
} else if (role == "user") {
|
||||||
ss << "### Instruction:\n" << message->content << "\n";
|
ss << "### Instruction:\n" << message->content << "\n";
|
||||||
} else if (role == "assistant") {
|
} else if (role == "assistant") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue