fix-normalization-after-truncate

#53
by jupyterjazz - opened

We had a bug in the encode function, doing Matryoshka embedding truncation after normalization, resulting in non-normalized truncated embeddings:
https://huggingface.co/jinaai/jina-embeddings-v3/discussions/60

This PR fixes the issue by moving normalization after truncation

jupyterjazz changed pull request status to open
Jina AI org

The changes look good ๐Ÿš€ thanks for making the fix!

jupyterjazz changed pull request status to merged

Sign up or log in to comment