Skip to content

Commit e6e7c75

Browse files
authoredJan 6, 2025··
server : fix extra BOS in infill endpoint (#11106)
* server : fix extra BOS in infill endpoing ggml-ci * server : update infill tests
1 parent 09186fa commit e6e7c75

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎examples/server/server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3797,7 +3797,7 @@ int main(int argc, char ** argv) {
37973797
data["input_extra"] = input_extra; // default to empty array if it's not exist
37983798

37993799
std::string prompt = json_value(data, "prompt", std::string());
3800-
std::vector<llama_tokens> tokenized_prompts = tokenize_input_prompts(ctx_server.ctx, prompt, true, true);
3800+
std::vector<llama_tokens> tokenized_prompts = tokenize_input_prompts(ctx_server.ctx, prompt, false, true);
38013801
SRV_DBG("creating infill tasks, n_prompts = %d\n", (int) tokenized_prompts.size());
38023802
data["prompt"] = format_infill(
38033803
ctx_server.ctx,

‎examples/server/tests/unit/test_infill.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_infill_without_input_extra():
1818
"input_suffix": "}\n",
1919
})
2020
assert res.status_code == 200
21-
assert match_regex("(Ann|small|shiny)+", res.body["content"])
21+
assert match_regex("(Ann|small|shiny|Daddy)+", res.body["content"])
2222

2323

2424
def test_infill_with_input_extra():

0 commit comments

Comments
 (0)
Please sign in to comment.