Fix phi3 template matching vs zephyr
This commit is contained in:
parent
201cc11afa
commit
bde2e7605f
1 changed files with 1 additions and 1 deletions
|
@ -17628,7 +17628,7 @@ static int32_t llama_chat_apply_template_internal(
|
|||
}
|
||||
}
|
||||
// llama2 templates seem to not care about "add_generation_prompt"
|
||||
} else if (tmpl == "zephyr" || tmpl.find("<|user|>") != std::string::npos) {
|
||||
} else if (tmpl == "zephyr" || (tmpl.find("<|user|>") != std::string::npos && tmpl.find("<|end|>") == std::string::npos)) {
|
||||
// zephyr template
|
||||
for (auto message : chat) {
|
||||
ss << "<|" << message->role << "|>" << "\n" << message->content << "<|endoftext|>\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue