do not activate -cnv for non-instruct models
This commit is contained in:
parent
dd221bdd6b
commit
73c4e77de8
1 changed files with 7 additions and 3 deletions
|
@ -208,9 +208,13 @@ int main(int argc, char ** argv) {
|
||||||
|
|
||||||
// auto enable conversation mode if chat template is available
|
// auto enable conversation mode if chat template is available
|
||||||
const bool has_chat_template = !common_get_builtin_chat_template(model).empty() || !params.chat_template.empty();
|
const bool has_chat_template = !common_get_builtin_chat_template(model).empty() || !params.chat_template.empty();
|
||||||
if (params.conversation_mode == COMMON_CONVERSATION_MODE_AUTO && has_chat_template) {
|
if (params.conversation_mode == COMMON_CONVERSATION_MODE_AUTO) {
|
||||||
|
if (has_chat_template) {
|
||||||
LOG_INF("%s: chat template is available, enabling conversation mode (disable it with -no-cnv)\n", __func__);
|
LOG_INF("%s: chat template is available, enabling conversation mode (disable it with -no-cnv)\n", __func__);
|
||||||
params.conversation_mode = COMMON_CONVERSATION_MODE_ENABLED;
|
params.conversation_mode = COMMON_CONVERSATION_MODE_ENABLED;
|
||||||
|
} else {
|
||||||
|
params.conversation_mode = COMMON_CONVERSATION_MODE_DISABLED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// in case user force-activate conversation mode (via -cnv) without proper chat template, we show a warning
|
// in case user force-activate conversation mode (via -cnv) without proper chat template, we show a warning
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue