]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
common : fix double bos, use common_chat_templates for add_bos and add_eos (#15326)
authorDaniel Bevenius <redacted>
Fri, 15 Aug 2025 17:50:52 +0000 (19:50 +0200)
committerGitHub <redacted>
Fri, 15 Aug 2025 17:50:52 +0000 (19:50 +0200)
commit5e6229a8409ac786e62cb133d09f1679a9aec13e
tree221f7143ba9199eeeb7dc0ca9f3da82fed84b3eb
parente2c1bfff5305c661ac53e9d57cb732ff626a2242
common : fix double bos, use common_chat_templates for add_bos and add_eos (#15326)

This commit updates common_chat_templates_apply_jinja to use the
the add_bos and add_eos parameters from the chat template instead of
the inputs.

The motivation for this is that currently if the `add_bos` and `add_eos`
from the input parameters are used it is possible to there will be a
missmatch between the model and the chat template which can lead to the
the removal of duplicate BOS/EOS tokens in chat.cpp `apply` to not
happen leading to two BOS tokens being added to the template.
common/chat.cpp