From 9c3e7e0c771aca641fc21843d6af54e995f2436a Mon Sep 17 00:00:00 2001 From: Peter Nagymathe Date: Sat, 30 Dec 2023 02:57:23 +0000 Subject: [PATCH] apply custom stop tokens --- examples/server/server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index cebb2842d..fb6c2d1bd 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -2521,7 +2521,9 @@ json oaicompat_completion_params_parse( } // Ensure there is ChatML-specific end sequence among stop words - llama_params["stop"].push_back("<|im_end|>"); + for(auto& stop : formatter.stop_keys){ + llama_params["stop"].push_back(stop); + } return llama_params; }