]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
main : add `--in-prefix-bos` to prefix BOS to user inputs; keep EOS (#2304)
authorXiao-Yong Jin <redacted>
Tue, 25 Jul 2023 12:19:11 +0000 (07:19 -0500)
committerGitHub <redacted>
Tue, 25 Jul 2023 12:19:11 +0000 (15:19 +0300)
commit0c06204fb39aa5560e883e0ae74be9518c57d88e
treeb2b218adf5dfe353d744d8b46d9f20f7c40d66a6
parent1fed755b1fb9babb6dbc1b4023e492950cd5a5be
main : add `--in-prefix-bos` to prefix BOS to user inputs; keep EOS (#2304)

* add `--in-prefix-bos` to prefix BOS to user inputs; keep EOS

The BOS precedes the string specified by `--in-prefix`.
Model generated EOS is now kept in the context.

It provides a way to strictly following the prompt format used in
Llama-2-chat.

The EOS handling also benefits some existing finetunes that uses
EOS to mark the end of turn.

* examples/common: move input_prefix_bos to other bools
examples/common.cpp
examples/common.h
examples/main/main.cpp