Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added jina-embeddings-v2-base-code #301

Merged
merged 5 commits into from
Jul 18, 2024
Merged

Conversation

Anush008
Copy link
Member

Description

As the title goes.

I've verified the embeddings produced with sentence_transformers.SentenceTransformer.

@Anush008 Anush008 requested review from I8dNLo and joein and removed request for I8dNLo July 16, 2024 19:14
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Anush008
Copy link
Member Author

Anush008 commented Jul 17, 2024

I'm closing this for now. I'll look into the Jina models disparity.

from fastembed import TextEmbedding
from sentence_transformers import SentenceTransformer

s = SentenceTransformer("jinaai/jina-embeddings-v2-base-code", trust_remote_code=True)
f = TextEmbedding("jinaai/jina-embeddings-v2-base-code")

string = "hello world"

print("ST")
print(s.encode([string], normalize_embeddings=True)[:, :5])
print("FE")
print(next(f.embed(string))[:5])

@Anush008 Anush008 closed this Jul 17, 2024
@Anush008 Anush008 reopened this Jul 18, 2024
@Anush008 Anush008 requested a review from joein July 18, 2024 11:08
@Anush008 Anush008 merged commit 0e258ab into main Jul 18, 2024
17 checks passed
@Anush008 Anush008 deleted the jina-embeddings-v2-base-code branch July 18, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants