File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,6 @@ struct templates_params {
147147 json extra_context;
148148 bool add_bos;
149149 bool add_eos;
150- bool is_inference = true ;
151150};
152151
153152common_chat_tool_choice common_chat_tool_choice_parse_oaicompat (const std::string & tool_choice) {
@@ -1337,17 +1336,6 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
13371336 common_chat_params data;
13381337 auto prompt = apply (tmpl, inputs);
13391338
1340- // Check if we need to replace the return token with end token during
1341- // inference and without generation prompt. For more details see:
1342- // https://github.com/ggml-org/llama.cpp/issues/15417
1343- if (inputs.is_inference && !inputs.add_generation_prompt ) {
1344- static constexpr std::string_view return_token = " <|return|>" ;
1345- static constexpr std::string_view end_token = " <|end|>" ;
1346- if (size_t pos = prompt.rfind (return_token); pos != std::string::npos) {
1347- prompt.replace (pos, return_token.length (), end_token);
1348- }
1349- }
1350-
13511339 data.prompt = prompt;
13521340 data.format = COMMON_CHAT_FORMAT_GPT_OSS;
13531341
You can’t perform that action at this time.
0 commit comments