]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
model-conversion : add token ids to prompt token output [no ci] (#17863)
authorDaniel Bevenius <redacted>
Mon, 8 Dec 2025 16:13:08 +0000 (17:13 +0100)
committerGitHub <redacted>
Mon, 8 Dec 2025 16:13:08 +0000 (17:13 +0100)
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.

examples/model-conversion/logits.cpp

index bbd095e6034cc358839598fc3c2b1dbf4b06e5f2..5bcf0632677edbe1ac83d6bfc7a0feac3477a054 100644 (file)
@@ -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");