]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
tokenize : align usage by using common args (#25516)
authorAdrien Gallouët <redacted>
Tue, 14 Jul 2026 13:20:53 +0000 (15:20 +0200)
committerGitHub <redacted>
Tue, 14 Jul 2026 13:20:53 +0000 (15:20 +0200)
commit8ff8c4299db80225ff075683b51b63274ba7ea9a
tree3b2ca4dd3f494af6bf2222160cb115cce8f2df55
parenta7312ae94f801fc9c6786dc56e38df57b964f697
tokenize : align usage by using common args (#25516)

Migrate the tokenize tool to common_params_parse, replacing its
hand-rolled argv parsing, Windows UTF-8 handling and file reading
with the shared common helpers.

Expose the model-sourcing flags (-m, -mu, -dr, -hf, -hff, --offline,
HF_TOKEN) to LLAMA_EXAMPLE_TOKENIZE, and register --ids, --stdin,
--no-bos, --no-parse-special and --show-count as common args.
parse_special defaults to true for TOKENIZE to preserve the old
behavior. Errors now go through LOG_ERR instead of fprintf(stderr).

Signed-off-by: Adrien Gallouët <redacted>
common/arg.cpp
common/common.h
tools/tokenize/tokenize.cpp