add llama_get_pooling_type function#6862
Merged
ggerganov merged 2 commits intoggml-org:masterfrom Apr 24, 2024
Merged
Conversation
ggerganov
approved these changes
Apr 24, 2024
| LLAMA_API enum llama_rope_type llama_rope_type (const struct llama_model * model); | ||
| LLAMA_API enum llama_vocab_type llama_vocab_type (const struct llama_model * model); | ||
| LLAMA_API enum llama_rope_type llama_rope_type (const struct llama_model * model); | ||
| LLAMA_API enum llama_pooling_type llama_pooling_type(const struct llama_context * model); |
Member
There was a problem hiding this comment.
Move up next to the other llama_context functions
Suggested change
| LLAMA_API enum llama_pooling_type llama_pooling_type(const struct llama_context * model); | |
| LLAMA_API enum llama_pooling_type llama_pooling_type(const struct llama_context * ctx); |
Collaborator
Author
There was a problem hiding this comment.
Fixed the argument name. Moved up higher, but didn't seem like aligning signature was worth it.
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* add llama_get_pooling_type function * fix argument name, move with ctx funcs
phuongncn
pushed a commit
to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4
that referenced
this pull request
Apr 28, 2026
* add llama_get_pooling_type function * fix argument name, move with ctx funcs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows the user to inspect the realized value of the context's
pooling_type. In cases whereUNSPECIFIEDis passed as the context parameter, this helps identify the default pooling type coming from the model. This is useful because, depending on the pooling type, different values forlogitsin the batch may need to be passed and the embeddings outputs are of different size (and require different functions to access).