llama : default pooling last for qwen3#14028
Closed
ngxson wants to merge 1 commit intoggml-org:masterfrom
Closed
Conversation
CISC
reviewed
Jun 5, 2025
Comment on lines
822
to
+823
| ml.get_key(LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps); | ||
| hparams.pooling_type = LLAMA_POOLING_TYPE_LAST; // for embeddings model |
Member
There was a problem hiding this comment.
Suggested change
| ml.get_key(LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps); | |
| hparams.pooling_type = LLAMA_POOLING_TYPE_LAST; // for embeddings model | |
| hparams.pooling_type = LLAMA_POOLING_TYPE_LAST; // for embeddings model | |
| ml.get_key(LLM_KV_POOLING_TYPE, hparams.pooling_type, false); | |
| ml.get_key(LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps); |
Member
There was a problem hiding this comment.
Perhaps use metadata if it exists, and add the pooling check to conversion (do they use 1_Pooling)? Ah, the check is already there, guess they don't.
Contributor
Author
There was a problem hiding this comment.
For rerank model, there is be a KV metadata to switch the pooling to "rank"
So yes, it's better to do as you suggested
Contributor
Author
|
superseded by the other PR |
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.
Maybe too late to fix upstream model (one of the GGUF already set to public), so I think we can do a quick patch in llama.cpp
CC @yuhao318 do you have any visibility about why only one GGUF is public?