From: Daniel Bevenius Date: Mon, 8 Dec 2025 16:13:08 +0000 (+0100) Subject: model-conversion : add token ids to prompt token output [no ci] (#17863) X-Git-Tag: upstream/0.0.7446~120 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2fa51c19b028180b35d316e9ed06f5f0f7ada2c1;p=pkg%2Fggml%2Fsources%2Fllama.cpp model-conversion : add token ids to prompt token output [no ci] (#17863) This commit adds the token ids to the printed prompt outputs. The motivation for this is that is can be useful to see the actual token ids alongside the token strings for debugging. --- diff --git a/examples/model-conversion/logits.cpp b/examples/model-conversion/logits.cpp index bbd095e6..5bcf0632 100644 --- a/examples/model-conversion/logits.cpp +++ b/examples/model-conversion/logits.cpp @@ -144,7 +144,7 @@ int main(int argc, char ** argv) { return 1; } std::string s(buf, n); - printf("%s", s.c_str()); + printf("%s (%d)", s.c_str(), id); } printf("\n");