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

fix: fix jina v1, 2 models #1872

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mteb/models/gme_models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import logging
from functools import partial

from mteb.model_meta import ModelMeta

Expand Down
24 changes: 24 additions & 0 deletions mteb/models/jina_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ def encode(


jina_embeddings_v2_base_en = ModelMeta(
loader=partial(
SentenceTransformerWrapper,
model_name="jinaai/jina-embeddings-v2-base-en",
revision="6e85f575bc273f1fd840a658067d0157933c83f0",
trust_remote_code=True,
),
name="jinaai/jina-embeddings-v2-base-en",
languages=["eng-Latn"],
open_weights=True,
Expand All @@ -266,6 +272,12 @@ def encode(
)

jina_embeddings_v2_small_en = ModelMeta(
loader=partial(
SentenceTransformerWrapper,
model_name="jinaai/jina-embeddings-v2-small-en",
revision="796cff318cdd4e5fbe8b7303a1ef8cbec36996ef",
trust_remote_code=True,
),
name="jinaai/jina-embeddings-v2-small-en",
languages=["eng-Latn"],
open_weights=True,
Expand All @@ -287,6 +299,12 @@ def encode(
)

jina_embedding_b_en_v1 = ModelMeta(
loader=partial(
SentenceTransformerWrapper,
model_name="jinaai/jina-embedding-b-en-v1",
revision="aa0645035294a8c0607ce5bb700aba982cdff32c",
trust_remote_code=True,
),
name="jinaai/jina-embedding-b-en-v1",
languages=["eng-Latn"],
open_weights=True,
Expand All @@ -308,6 +326,12 @@ def encode(
)

jina_embedding_s_en_v1 = ModelMeta(
loader=partial(
SentenceTransformerWrapper,
model_name="jinaai/jina-embedding-s-en-v1",
revision="c1fed70aa4823a640f1a7150a276e4d3b08dce08",
trust_remote_code=True,
),
name="jinaai/jina-embedding-s-en-v1",
languages=["eng-Latn"],
open_weights=True,
Expand Down
8 changes: 1 addition & 7 deletions mteb/models/lens_models.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
from __future__ import annotations

from functools import partial

import torch

from mteb.encoder_interface import PromptType
from mteb.model_meta import ModelMeta, sentence_transformers_loader
from mteb.models.instruct_wrapper import instruct_wrapper
Comment on lines -3 to -9
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ruff removed these lines

from mteb.model_meta import ModelMeta

from .bge_models import bge_full_data

Expand Down
Loading