]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
speculative : fix "ngram-map-k4v" name in logging (#24253)
authorddh0 <redacted>
Wed, 10 Jun 2026 07:31:35 +0000 (02:31 -0500)
committerGitHub <redacted>
Wed, 10 Jun 2026 07:31:35 +0000 (09:31 +0200)
This is a non-functional change.

When using `--spec-type ngram-map-k4v`, the log messages at startup and
runtime say `ngram-map-k`. Added logic in the in the constructor of
`common_speculative_impl_ngram_map_k` to pass the correct
`COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K4V` when `config.key_only` is
`false`.

After this change, the log messages use the correct name.

common/speculative.cpp

index 86c1e6a42903b7a12bbd7bd63d7d2e0340e990e7..653f932c90b54a1e0043cb42266f51d855c5efef 100644 (file)
@@ -843,7 +843,8 @@ struct common_speculative_impl_ngram_map_k : public common_speculative_impl {
     common_speculative_impl_ngram_map_k(
             const common_ngram_map & config,
             uint32_t n_seq)
-        : common_speculative_impl(COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K, n_seq)
+        : common_speculative_impl(config.key_only ? COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K
+            : COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K4V, n_seq)
     {
         for (uint32_t i = 0; i < n_seq; i++) {
             this->config.push_back(config);