Skip to content

Commit de67255

Browse files
committed
On the other hand, this is probably safer
1 parent 4e58382 commit de67255

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
@@ -2800,7 +2800,7 @@ static common_chat_params common_chat_params_init_minimax_m2(
28002800
common_chat_params data;
28012801
data.prompt = apply(tmpl, params);
28022802
data.format = COMMON_CHAT_FORMAT_MINIMAX_M2;
2803-
if (string_ends_with(data.prompt, "<think>")) {
2803+
if (string_ends_with(data.prompt, "<think>\n")) { // Minimax adds a new line at the start of reasoning content
28042804
if (!inputs.enable_thinking) {
28052805
data.prompt += "</think>";
28062806
} 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)