We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As discussed in this PR we would like to normalize the interfaces to allow for:
model.encode(sentences) model.encode(images) model.encode(documents) # can be image and text
The text was updated successfully, but these errors were encountered:
Adding to this comment, the encoder can then be something like:
class MultiModalEncoder: """ For MIEB, MOEB, etc. """ def __init__(self, device: str | None,**kwargs: Any): pass def encode( self, inputs: Sequence[str] | Sequence[Image.Image] | DataLoader | Sequence[Any], *, task_name: str, prompt_type: PromptType | None = None, **kwargs: Any, ) -> np.ndarray: """ inputs: Handles uni-modal or multi-modal inputs. For example: - text only: Sequence[str] - image and text: Sequence[Any] -> Sequence[tuple[Image.Image, str]] - image dataloader and text: Sequence[Any] -> tuple[DataLoader, list[str]] - images and text: Sequence[Any] -> Sequence[tuple[list[Image.Image], str]] This can potentially wrap existing get_fused_embedding methods as well. """ pass
@KennethEnevoldsen @gowitheflow-1998 wdyt?
Sorry, something went wrong.
No branches or pull requests
As discussed in this PR we would like to normalize the interfaces to allow for:
The text was updated successfully, but these errors were encountered: