Skip to content

Commit 5e00b5d

Browse files
committed
On the other hand, this is probably safer
1 parent b59d29d commit 5e00b5d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common/chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2785,7 +2785,7 @@ static common_chat_params common_chat_params_init_minimax_m2(
27852785
common_chat_params data;
27862786
data.prompt = apply(tmpl, params);
27872787
data.format = COMMON_CHAT_FORMAT_MINIMAX_M2;
2788-
if (string_ends_with(data.prompt, "<think>")) {
2788+
if (string_ends_with(data.prompt, "<think>\n")) { // Minimax adds a new line at the start of reasoning content
27892789
if (!inputs.enable_thinking) {
27902790
data.prompt += "</think>";
27912791
} else {

models/templates/MiniMax-M2.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,5 @@
149149
{%- endfor -%}
150150
{#- Generation prompt -#}
151151
{%- if add_generation_prompt -%}
152-
{{- ']~b]ai' ~ '\n' ~ '<think>' }}
152+
{{- ']~b]ai' ~ '\n' ~ '<think>' ~ '\n' }}
153153
{%- endif -%}

0 commit comments

Comments
 (0)