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 model spice #1884

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 2 additions & 0 deletions mteb/models/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
ru_sentence_models,
salesforce_models,
sentence_transformers_models,
spice_models,
stella_models,
text2vec_models,
uae_models,
Expand All @@ -72,6 +73,7 @@
gme_models,
ibm_granite_models,
inf_models,
spice_models,
jina_models,
lens_models,
linq_models,
Expand Down
32 changes: 32 additions & 0 deletions mteb/models/spice_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from __future__ import annotations

from functools import partial

from mteb.model_meta import ModelMeta, sentence_transformers_loader

model_prompts = {"query": "Represent this sentence for searching relevant passages: "}

spice = ModelMeta(
loader=partial( # type: ignore
sentence_transformers_loader,
model_name="iamgroot42/spice",
revision="1d0fdb2b5d7aed81bba960cd8c85671674d49bdc",
model_prompts=model_prompts,
),
name="iamgroot42/spice",
languages=["eng_Latn"],
open_weights=True,
revision="1d0fdb2b5d7aed81bba960cd8c85671674d49bdc",
release_date="2025-01-27", # initial commit of hf model.
n_parameters=24_000_000,
embed_dim=512,
license="mit",
max_tokens=512,
reference="https://huggingface.co/iamgroot42/spice",
similarity_fn_name="cosine",
framework=["Sentence Transformers", "PyTorch"],
use_instructions=True,
public_training_code=None,
public_training_data=None,
training_datasets=None,
)