Skip to content

Commit f5d92f8

Browse files
danbevMinh141120
authored andcommitted
model-conversion : set pooling type to none in logits.cpp (ggml-org#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.
1 parent 4e00fca commit f5d92f8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/model-conversion/logits.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ int main(int argc, char ** argv) {
112112
ctx_params.no_perf = false;
113113
if (embedding_mode) {
114114
ctx_params.embeddings = true;
115+
ctx_params.pooling_type = LLAMA_POOLING_TYPE_NONE;
115116
ctx_params.n_ubatch = ctx_params.n_batch;
116117
}
117118

0 commit comments

Comments
 (0)