Skip to content

Misc. bug: --override-kv for add_bos_token on Gemma4 is ignored #21786

@personalmountains

Description

@personalmountains

Name and Version

Running llama-server with --override-kv tokenizer.ggml.add_bos_token=bool:false still gives a double bos warning. Looks like #21500 hardcodes add_bos to true, regardless of the command line overrides.

Operating systems

Windows

Which llama.cpp modules do you know to be affected?

llama-server

Command line

--override-kv tokenizer.ggml.add_bos_token=bool:false

Problem description & steps to reproduce

N/A

First Bad Commit

No response

Relevant log output

Logs
validate_override: Using metadata override ( bool) 'tokenizer.ggml.add_bos_token' = false
load: override 'tokenizer.ggml.add_bos_token' to 'true' for Gemma4
llm_tokenizer_bpe_session::check_double_bos_eos: Added a BOS token to the prompt as specified by the model but the prompt also starts with a BOS token. So now the final prompt starts with 2 BOS tokens. Are you sure this is what you want?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions