Skip to content

Commit d2e22ed

Browse files
authored
speculative : fix "ngram-map-k4v" name in logging (#24253)
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.
1 parent 76da245 commit d2e22ed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

common/speculative.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,8 @@ struct common_speculative_impl_ngram_map_k : public common_speculative_impl {
843843
common_speculative_impl_ngram_map_k(
844844
const common_ngram_map & config,
845845
uint32_t n_seq)
846-
: common_speculative_impl(COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K, n_seq)
846+
: common_speculative_impl(config.key_only ? COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K
847+
: COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K4V, n_seq)
847848
{
848849
for (uint32_t i = 0; i < n_seq; i++) {
849850
this->config.push_back(config);

0 commit comments

Comments
 (0)