@@ -6,11 +6,23 @@ BUILD_TARGETS = \
6
6
7
7
# Binaries only useful for tests
8
8
TEST_TARGETS = \
9
- tests/test-llama-grammar tests/test-grammar-parser tests/test-double-float tests/test-grad0 tests/test-opt \
10
- tests/test-quantize-fns tests/test-quantize-perf tests/test-sampling tests/test-tokenizer-0-llama \
11
- tests/test-tokenizer-0-falcon tests/test-tokenizer-1-llama tests/test-tokenizer-1-bpe tests/test-rope \
12
- tests/test-backend-ops tests/test-model-load-cancel tests/test-autorelease \
13
- tests/test-json-schema-to-grammar tests/test-grammar-integration
9
+ tests/test-autorelease \
10
+ tests/test-backend-ops \
11
+ tests/test-double-float \
12
+ tests/test-grad0 \
13
+ tests/test-grammar-integration \
14
+ tests/test-grammar-parser \
15
+ tests/test-json-schema-to-grammar \
16
+ tests/test-llama-grammar \
17
+ tests/test-model-load-cancel \
18
+ tests/test-opt \
19
+ tests/test-quantize-fns \
20
+ tests/test-quantize-perf \
21
+ tests/test-rope \
22
+ tests/test-sampling \
23
+ tests/test-tokenizer-0 \
24
+ tests/test-tokenizer-1-bpe \
25
+ tests/test-tokenizer-1-spm
14
26
15
27
# Code coverage output files
16
28
COV_TARGETS = *.gcno tests/*.gcno *.gcda tests/*.gcda *.gcov tests/*.gcov lcov-report gcovr-report
@@ -60,11 +72,17 @@ default: $(BUILD_TARGETS)
60
72
test : $(TEST_TARGETS )
61
73
@failures=0; \
62
74
for test_target in $( TEST_TARGETS) ; do \
63
- if [ " $$ test_target" = " tests/test-tokenizer-0-llama" ]; then \
64
- ./$$ test_target $(CURDIR ) /models/ggml-vocab-llama.gguf; \
65
- elif [ " $$ test_target" = " tests/test-tokenizer-0-falcon" ]; then \
75
+ if [ " $$ test_target" = " tests/test-tokenizer-0" ]; then \
76
+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-llama-spm.gguf; \
77
+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-llama-bpe.gguf; \
78
+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-phi-3.gguf; \
66
79
./$$ test_target $(CURDIR ) /models/ggml-vocab-falcon.gguf; \
67
- elif [ " $$ test_target" = " tests/test-tokenizer-1-llama" ]; then \
80
+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-deepseek-coder.gguf; \
81
+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-deepseek-llm.gguf; \
82
+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-bert-bge.gguf; \
83
+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-starcoder.gguf; \
84
+ ./$$ test_target $(CURDIR ) /models/ggml-vocab-gpt-2.gguf; \
85
+ elif [ " $$ test_target" = " tests/test-tokenizer-1-spm" ]; then \
68
86
continue ; \
69
87
elif [ " $$ test_target" = " tests/test-tokenizer-1-bpe" ]; then \
70
88
continue ; \
@@ -982,19 +1000,15 @@ tests/test-sampling: tests/test-sampling.cpp ggml.o llama.o $(OBJS)
982
1000
$(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
983
1001
$(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
984
1002
985
- tests/test-tokenizer-0-falcon : tests/test-tokenizer-0-falcon.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
986
- $(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
987
- $(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
988
-
989
- tests/test-tokenizer-0-llama : tests/test-tokenizer-0-llama.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
1003
+ tests/test-tokenizer-0 : tests/test-tokenizer-0.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
990
1004
$(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
991
1005
$(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
992
1006
993
1007
tests/test-tokenizer-1-bpe : tests/test-tokenizer-1-bpe.cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
994
1008
$(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
995
1009
$(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
996
1010
997
- tests/test-tokenizer-1-llama : tests/test-tokenizer-1-llama .cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
1011
+ tests/test-tokenizer-1-spm : tests/test-tokenizer-1-spm .cpp ggml.o llama.o $(COMMON_DEPS ) console.o $(OBJS )
998
1012
$(CXX ) $(CXXFLAGS ) -c $< -o $(call GET_OBJ_FILE, $< )
999
1013
$(CXX ) $(CXXFLAGS ) $(filter-out % .h $< ,$^ ) $(call GET_OBJ_FILE, $< ) -o $@ $(LDFLAGS )
1000
1014
0 commit comments