Skip to content

Commit fb51d2f

Browse files
committed
server : insert the extra context before the FIM prefix
1 parent a05f21b commit fb51d2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/server/server.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,8 @@ struct server_context {
19871987

19881988
SLT_DBG(slot, "extra: n_ctx = %d, n_extra_take = %d, n_extra = %d\n", slot.n_ctx, n_extra_take, (int) slot.extra_tokens.size());
19891989

1990-
embd_inp.insert(embd_inp.begin() + 1, slot.extra_tokens.end() - n_extra_take, slot.extra_tokens.end());
1990+
// put the extra context before the FIM prefix
1991+
embd_inp.insert(embd_inp.begin(), slot.extra_tokens.end() - n_extra_take, slot.extra_tokens.end());
19911992

19921993
embd_inp.insert(embd_inp.end(), embd_end.begin(), embd_end.end());
19931994
embd_inp.push_back(llama_token_fim_mid(model));

0 commit comments

Comments
 (0)