]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
tokenize : add --show-count (token) option (#8299)
authorDaniel Bevenius <redacted>
Thu, 4 Jul 2024 16:38:58 +0000 (18:38 +0200)
committerGitHub <redacted>
Thu, 4 Jul 2024 16:38:58 +0000 (19:38 +0300)
commit6f63d646c1a06a6e09f721009a2676864ae04e31
treea7c9e1044387673ffaf926bb5c12f2b8fd81c1a0
parent51d2ebadbbf365b894f3888361df42dbacb12b7a
tokenize : add --show-count (token) option (#8299)

This commit adds a new option to the tokenize example, --show-count.
When this is set the total number of tokens are printed to stdout.

This was added as an option as I was concerned that there might be
scripts that use the output from this program and it might be better to
not print this information by default.

The motivation for this is that can be useful to find out how many
tokens a file contains, for example when trying to determine prompt
input file sizes for testing.

Signed-off-by: Daniel Bevenius <redacted>
examples/tokenize/tokenize.cpp