Run performance and compatibility tests
mainTo verify TokenDagger against TikToken or run benchmarks, you can use the provided test scripts. You must have the original tiktoken installed for comparison tests. Use the --tokenizer flag to specify the tokenizer type (e.g., llama or mistral).
# Build the project
make clean && make
# Install tiktoken for comparison
pip3 install tiktoken
# Run compatibility tests
python3 tests/test_tokendagger_vs_tiktoken.py --tokenizer llama
python3 tests/test_tokendagger_vs_tiktoken.py --tokenizer mistral
# Run performance benchmarks
python3 tests/performance_benchmark.py --tokenizer llama
python3 tests/performance_benchmark.py --tokenizer mistral
# Run code-specific performance benchmarks
python3 tests/code_performance_benchmark.py --tokenizer llama