Skip to content

Sentence transformers and embedding output are different #9980

Answered by danbev
raulod asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not familiar with the SentenceTransformer but the llama-embedding example uses Euclidean/L2 normalization by default:

--embd-normalize N                      normalisation for embendings (default: 2) (-1=none, 0=max absolute
                                        int16, 1=taxicab, 2=euclidean, >2=p-norm)

Perhaps you can try to disable the normalization in llama-embedding like this:

./llama-embedding -m paraphrase-MiniLM-L6-23M-v2-F32.gguf -p "What is your age?" --embd-normalize -1 --verbose-prompt

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@raulod
Comment options

@danbev
Comment options

danbev Oct 22, 2024
Collaborator

Answer selected by raulod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants