mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-17 20:31:47 +02:00
chat : add message delimiters to the DeepSeek V3.2/V4 parser (#29008)
* chat : add message delimiters to the DeepSeek V3.2/V4 parser Assisted-by: Claude Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
This commit is contained in:
co-authored by
Sigbjørn Skjæret
parent
81aeaeb74b
commit
7f6f0c2a9d
@@ -104,6 +104,12 @@ common_chat_params common_chat_params_init_deepseek_v3_2(const common_chat_templ
|
|||||||
const std::string GEN_PROMPT = "<|Assistant|>";
|
const std::string GEN_PROMPT = "<|Assistant|>";
|
||||||
const std::string TC_SEPARATOR = "\n\n";
|
const std::string TC_SEPARATOR = "\n\n";
|
||||||
|
|
||||||
|
// lets the server find user turns in the prompt and place context checkpoints there
|
||||||
|
data.message_delimiters = {
|
||||||
|
{ COMMON_CHAT_ROLE_ASSISTANT, GEN_PROMPT },
|
||||||
|
{ COMMON_CHAT_ROLE_USER, "<|User|>" },
|
||||||
|
};
|
||||||
|
|
||||||
data.prompt = common_chat_template_direct_apply_impl(
|
data.prompt = common_chat_template_direct_apply_impl(
|
||||||
tmpl, inputs, adjusted_messages, std::nullopt, additional_context);
|
tmpl, inputs, adjusted_messages, std::nullopt, additional_context);
|
||||||
data.generation_prompt = common_chat_template_generation_prompt_impl(
|
data.generation_prompt = common_chat_template_generation_prompt_impl(
|
||||||
|
|||||||
Reference in New Issue
Block a user