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: Update cohere embedding models #3704

Merged
merged 1 commit into from
Dec 16, 2022
Merged

feat: Update cohere embedding models #3704

merged 1 commit into from
Dec 16, 2022

Conversation

vblagoje
Copy link
Member

Related Issues

  • No related issue.
  • Cohere announced a new multilingual embedding model today, so we are adding it to Haystack. The new model should perform better than any other open-source embedder while projecting in 768 dimensions - excellent!
  • Enabling the use of finance-sentiment embedding model. This is not a baseline model but is listed and available as a "Cohere finetuned model"

Proposed Changes:

Adds a new model to cohere embedder. Use it by simply specifying it:

retriever = EmbeddingRetriever(
    document_store=document_store,
    embedding_model="multilingual-22-12", 
    batch_size = 16,
    api_key=my_cohere_api_key,
)

How did you test it?

I ran a Collab notebook to try it out. It worked as expected.

Notes for the reviewer

Try out the notebook yourself.

Checklist

@vblagoje vblagoje requested a review from a team as a code owner December 13, 2022 09:22
@vblagoje vblagoje requested review from masci and removed request for a team December 13, 2022 09:22
@masci masci added this to the 1.12.0 milestone Dec 13, 2022
Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the change seems safe enough I propose we ship this in 1.12

@vblagoje vblagoje merged commit 4292659 into deepset-ai:main Dec 16, 2022
@masci masci mentioned this pull request Dec 19, 2022
4 tasks
ZanSara pushed a commit that referenced this pull request Dec 20, 2022
@vblagoje vblagoje deleted the new_cohere_model branch February 28, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants