]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
llama-context: only warn on pooling_type when user specified (#16674)
authortakuya kodama <redacted>
Mon, 20 Oct 2025 07:44:21 +0000 (15:44 +0800)
committerGitHub <redacted>
Mon, 20 Oct 2025 07:44:21 +0000 (10:44 +0300)
commit7062dd8460685d6700ed7621e50a22c6f3400ca3
tree7e065c8206431140ea6ffc2173ea35196f2148a6
parent0398752dd450dfabdd1b9e289f6364c2600f6ab5
llama-context: only warn on pooling_type when user specified (#16674)

The unexpeced pooling_type warning was incorrectly shown when users did not
specify the --pooling-type parameter. In this case, the parameter
defaults to `LLAMA_POOLING_TYPE_UNSPECIFIED (-1)`, and the code
automatically applies the model's default pooling type.

Example of spurious warning:
```
$ llama-embedding -hf ggml-org/bge-m3-Q8_0-GGUF -p "hello"
...
llama_init_from_model: model default pooling_type is [2], but [-1] was specified
...
```

This fix ensures the warning only appears when users explicitly specify
a pooling type that differs from the model's default (e.g., using
--pooling-type mean on a model that expects CLS pooling).
src/llama-context.cpp