Skip to content

debug : include LLAMA_POOLING_TYPE_UNSPECIFIED in pooling check#18692

Merged
danbev merged 2 commits intoggml-org:masterfrom
danbev:llama-debug-pooling-enabled-check
Jan 11, 2026
Merged

debug : include LLAMA_POOLING_TYPE_UNSPECIFIED in pooling check#18692
danbev merged 2 commits intoggml-org:masterfrom
danbev:llama-debug-pooling-enabled-check

Conversation

@danbev
Copy link
Member

@danbev danbev commented Jan 8, 2026

This commit updates the pooling check in the debug example to also include LLAMA_POOLING_TYPE_UNSPECIFIED and not just LLAMA_POOLING_TYPE_NONE.

@ggerganov
Copy link
Member

See my comments in #18464. If my understanding is correct there, then we likely don't need to query the pooling here at all and this can be simplified.

@danbev
Copy link
Member Author

danbev commented Jan 8, 2026

See my comments in #18464. If my understanding is correct there, then we likely don't need to query the pooling here at all and this can be simplified.

Thanks, I'll take a look at this now 👍
@ggerganov I've added f31c38d to address this. Is this what you had in mind?

danbev added 2 commits January 8, 2026 11:05
This commit updates the pooling check in the debug example to
also include LLAMA_POOLING_TYPE_UNSPECIFIED and not just
LLAMA_POOLING_TYPE_NONE.
This commit updates debug.cpp to normalize embeddings for both pooled
and non-pooled outputs. For pooled embeddings, normalization is applied
to the single vector, and for non-pooled embeddings, normalization is
applied to each token embedding vector individually.

The motivation for this is to enable non-pooled embeddings to be
normalized which was not possible previously.
@danbev danbev merged commit 9789e28 into ggml-org:master Jan 11, 2026
139 of 143 checks passed
gary149 pushed a commit to gary149/llama-agent that referenced this pull request Jan 13, 2026
…-org#18692)

* debug : include LLAMA_POOLING_TYPE_UNSPECIFIED in pooling check

This commit updates the pooling check in the debug example to
also include LLAMA_POOLING_TYPE_UNSPECIFIED and not just
LLAMA_POOLING_TYPE_NONE.

* debug : normalize both pooled and token embeddings

This commit updates debug.cpp to normalize embeddings for both pooled
and non-pooled outputs. For pooled embeddings, normalization is applied
to the single vector, and for non-pooled embeddings, normalization is
applied to each token embedding vector individually.

The motivation for this is to enable non-pooled embeddings to be
normalized which was not possible previously.
@danbev danbev deleted the llama-debug-pooling-enabled-check branch January 14, 2026 08:05
dillon-blake pushed a commit to Boxed-Logic/llama.cpp that referenced this pull request Jan 15, 2026
…-org#18692)

* debug : include LLAMA_POOLING_TYPE_UNSPECIFIED in pooling check

This commit updates the pooling check in the debug example to
also include LLAMA_POOLING_TYPE_UNSPECIFIED and not just
LLAMA_POOLING_TYPE_NONE.

* debug : normalize both pooled and token embeddings

This commit updates debug.cpp to normalize embeddings for both pooled
and non-pooled outputs. For pooled embeddings, normalization is applied
to the single vector, and for non-pooled embeddings, normalization is
applied to each token embedding vector individually.

The motivation for this is to enable non-pooled embeddings to be
normalized which was not possible previously.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants