Skip to content

Commit eda9e0f

Browse files
authored
tests : refactor test-backend-sampler (ggml-org#18753)
* tests : use "auto", use std::string * tests : refactor test-backend-sampler.cpp * cmake : remove redundant declarations * ci : use smaller model * tests : add struct test_params * tests : reduce logit bias 100.0f -> 10.0f
1 parent 88566d8 commit eda9e0f

3 files changed

Lines changed: 149 additions & 229 deletions

File tree

ci/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ function gg_sum_test_scripts {
297297
}
298298

299299
function gg_get_model {
300-
local gguf_0="$MNT/models/qwen3/0.6B/ggml-model-f16.gguf"
300+
#local gguf_0="$MNT/models/qwen3/0.6B/ggml-model-f16.gguf"
301+
local gguf_0="$MNT/models/qwen3/0.6B/ggml-model-q4_0.gguf"
301302
if [[ -s $gguf_0 ]]; then
302303
echo -n "$gguf_0"
303304
else

tests/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,6 @@ llama_build_and_test(test-model-load-cancel.cpp LABEL "model")
223223
llama_build_and_test(test-autorelease.cpp LABEL "model")
224224
llama_build_and_test(test-backend-sampler.cpp LABEL "model")
225225

226-
llama_test(test-backend-sampler NAME test-backend-sampler-greedy ARGS --test greedy)
227-
llama_test(test-backend-sampler NAME test-backend-sampler-temp ARGS --test temp)
228-
llama_test(test-backend-sampler NAME test-backend-sampler-top_k ARGS --test top_k)
229-
llama_test(test-backend-sampler NAME test-backend-sampler-dist ARGS --test dist)
230-
llama_test(test-backend-sampler NAME test-backend-sampler-dist-and-cpu ARGS --test dist_and_cpu)
231-
llama_test(test-backend-sampler NAME test-backend-sampler-logit-bias ARGS --test logit_bias)
232-
llama_test(test-backend-sampler NAME test-backend-sampler-mul_seq ARGS --test multi_sequence)
233-
llama_test(test-backend-sampler NAME test-backend-sampler-set-sampler ARGS --test set_sampler)
234-
235226
# Test for state restore with fragmented KV cache
236227
# Requires a model, uses same args pattern as test-thread-safety
237228
if (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "s390x")

0 commit comments

Comments
 (0)