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

Add fastembed image models #613

Draft
wants to merge 30 commits into
base: dev
Choose a base branch
from
Draft

Add fastembed image models #613

wants to merge 30 commits into from

Conversation

joein
Copy link
Member

@joein joein commented Apr 26, 2024

No description provided.

@joein joein marked this pull request as draft April 26, 2024 16:15
@joein joein changed the base branch from onnx-providers to dev May 3, 2024 20:02
Copy link

netlify bot commented May 3, 2024

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit fc55294
🔍 Latest deploy log https://app.netlify.com/sites/poetic-froyo-8baba7/deploys/66427d67a291e30008194ed8
😎 Deploy Preview https://deploy-preview-613--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -10,5 +10,6 @@ class QueryResponse(BaseModel, extra="forbid"): # type: ignore
embedding: Optional[List[float]]
sparse_embedding: Optional[SparseVector] = Field(default=None)
metadata: Dict[str, Any]
document: str
document: Optional[str] = None
path: Optional[str] = None
Copy link
Member

Choose a reason for hiding this comment

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

image_path?

else {}
)

SUPPORTED_EMBEDDING_MODELS = {
Copy link
Member

Choose a reason for hiding this comment

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

I think we can remove this

@@ -37,13 +52,14 @@
class QdrantFastembedMixin(QdrantBase):
DEFAULT_EMBEDDING_MODEL = "BAAI/bge-small-en"

embedding_models: Dict[str, "TextEmbedding"] = {}
embedding_models: Dict[str, Union["ImageEmbedding", "TextEmbedding"]] = {}
Copy link
Member

Choose a reason for hiding this comment

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

let's separate into different fields

**kwargs: Any,
) -> "TextEmbedding":
) -> Union["ImageEmbedding", "TextEmbedding"]:
Copy link
Member

Choose a reason for hiding this comment

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

also, let's use different methods

metadata: Optional[Iterable[Dict[str, Any]]] = None,
ids: Optional[Iterable[models.ExtendedPointId]] = None,
batch_size: int = 32,
parallel: Optional[int] = None,
images: Optional[Iterable[Union[str, Path]]] = None,
Copy link
Member

Choose a reason for hiding this comment

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

let's move next to docs

@joein joein marked this pull request as ready for review May 13, 2024 21:07
@joein joein requested review from generall and I8dNLo May 15, 2024 11:58
@generall
Copy link
Member

Let's postpone this integration jet, I might have some different idea to consider

@joein joein marked this pull request as draft May 21, 2024 15:01
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