]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server : fix img token logs (#16595)
authorGeorgi Gerganov <redacted>
Wed, 15 Oct 2025 13:53:12 +0000 (16:53 +0300)
committerGitHub <redacted>
Wed, 15 Oct 2025 13:53:12 +0000 (16:53 +0300)
tools/server/server.cpp

index 36dc32fe3d17ecb933841b3aa543b74f47e6d454..8737fba124d50ffd7d24439a535c960e299c1528 100644 (file)
@@ -3839,14 +3839,14 @@ struct server_context {
 
                                         {
                                             const auto token = slot.prompt.tokens[i];
-                                            const auto piece = common_token_to_piece(ctx, token);
+                                            const auto piece = token != LLAMA_TOKEN_NULL ? common_token_to_piece(ctx, token) : "[mtmd]";
                                             ss0 << piece;
                                             st0 << std::setw(8) << token;
                                         }
 
                                         {
                                             const auto token = slot.task->tokens[i];
-                                            const auto piece = common_token_to_piece(ctx, token);
+                                            const auto piece = token != LLAMA_TOKEN_NULL ? common_token_to_piece(ctx, token) : "[mtmd]";
                                             ss1 << piece;
                                             st1 << std::setw(8) << token;
                                         }