From: Daniel Bevenius Date: Mon, 25 Aug 2025 13:00:43 +0000 (+0200) Subject: model-conversion : set pooling type to none in logits.cpp (#15564) X-Git-Tag: upstream/0.0.6527~256 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=dfd9b5f6c7586c88588f06a644c131bec071a0a1;p=pkg%2Fggml%2Fsources%2Fllama.cpp model-conversion : set pooling type to none in logits.cpp (#15564) This commit explicitly sets the pooling type to 'none' in the logits.cpp to support models that have a pooling type specified. The motivation for this is that some models may have a pooling type set in the model file (.gguf file) and for this specific case where we only want to extract logits, we need to ensure that no pooling is used to so that we are comparing raw logits and not pooled embeddings. --- diff --git a/examples/model-conversion/logits.cpp b/examples/model-conversion/logits.cpp index 2cac6a3b..ddc5e900 100644 --- a/examples/model-conversion/logits.cpp +++ b/examples/model-conversion/logits.cpp @@ -112,6 +112,7 @@ int main(int argc, char ** argv) { ctx_params.no_perf = false; if (embedding_mode) { ctx_params.embeddings = true; + ctx_params.pooling_type = LLAMA_POOLING_TYPE_NONE; ctx_params.n_ubatch = ctx_params.n_batch; }