Skip to content

Commit 17304cb

Browse files
authored
server : fix img token logs (ggml-org#16595)
1 parent 3e3cb19 commit 17304cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/server/server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3839,14 +3839,14 @@ struct server_context {
38393839

38403840
{
38413841
const auto token = slot.prompt.tokens[i];
3842-
const auto piece = common_token_to_piece(ctx, token);
3842+
const auto piece = token != LLAMA_TOKEN_NULL ? common_token_to_piece(ctx, token) : "[mtmd]";
38433843
ss0 << piece;
38443844
st0 << std::setw(8) << token;
38453845
}
38463846

38473847
{
38483848
const auto token = slot.task->tokens[i];
3849-
const auto piece = common_token_to_piece(ctx, token);
3849+
const auto piece = token != LLAMA_TOKEN_NULL ? common_token_to_piece(ctx, token) : "[mtmd]";
38503850
ss1 << piece;
38513851
st1 << std::setw(8) << token;
38523852
}

0 commit comments

Comments
 (0)