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

Integration of dense embedding model Snowflake arctic-embed-m-v1.5 #2001

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Stefan824
Copy link
Contributor

@Stefan824 Stefan824 commented Oct 1, 2024

This update integrates the Snowflake arctic-embed-m-v1.5 dense embedding model into the Pyserini toolkit. A new class was developed to support the entire snowflake-series of models, offering a scalable foundation for future expansions, such as additional Snowflake embedding model integrations. This modification is intended to lay the groundwork for smoother integration of future models from the Snowflake series

@Stefan824
Copy link
Contributor Author

Stefan824 commented Oct 1, 2024

This is linked to resolving issue #1959

@@ -362,6 +364,43 @@ def encode(self, query: str, **kwargs):
return self.get_embedding(inputs)
else:
return super().encode(query)


class ArcticQueryEncoder(QueryEncoder):
Copy link
Member

Choose a reason for hiding this comment

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

Why are there two different ArcticQueryEncoder classes? Here and in encode._artic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that is how the current version of pyserini does for all query encoders. Shivani and I were talking about this too. Maybe we could make a separate issue on this matter?

Copy link
Member

Choose a reason for hiding this comment

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

@MXueguang ping on this?

@@ -413,6 +452,14 @@ def encode(self, query: str):
return embeddings.flatten()
else:
return super().encode(query)

Copy link
Member

Choose a reason for hiding this comment

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

remove blank lines?

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