model: add bos token if configured

This commit is contained in:
Michael Yang
2025-02-26 11:20:51 -08:00
parent e185c08ad9
commit 53d2990d9b
5 changed files with 32 additions and 2 deletions

View File

@@ -33,7 +33,9 @@ func New(c ml.Config) (model.Model, error) {
Types: c.Uints("tokenizer.ggml.token_type"),
Merges: c.Strings("tokenizer.ggml.merges"),
BOS: int32(c.Uint("tokenizer.ggml.bos_token_id")),
AddBOS: c.Bool("tokenizer.ggml.add_bos_token", true),
EOS: int32(c.Uint("tokenizer.ggml.eos_token_id")),
AddEOS: c.Bool("tokenizer.ggml.add_eos_token", false),
},
),
ImageProcessor: newImageProcessor(c),