Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
62 changes: 62 additions & 0 deletions mteb/models/hinvec_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
from __future__ import annotations

import logging
from functools import partial

from mteb.encoder_interface import PromptType
from mteb.model_meta import ModelMeta
from mteb.models.instruct_wrapper import sentence_transformers_loader
Comment thread
SaileshP97 marked this conversation as resolved.
Outdated

logger = logging.getLogger(__name__)


def instruction_template(
instruction: str, prompt_type: PromptType | None = None
) -> str:
return f"Instruct: {instruction}\nQuery: " if instruction else ""


hinvec_training_datasets = {

"MintakaRetrieval": ["train"],
"HindiDiscourseClassification": ["train"],
"SentimentAnalysisHindi": ["train"],
"MassiveScenarioClassification": ["train"],
"MTOPIntentClassification": ["train"],
"LinceMTBitextMining": ["train"],
"PhincBitextMining": ["train"],
"XNLI": ["train"],
"MLQARetrieval": ["validation"],
"FloresBitextMining": ["dev"],
"AmazonReviewsClassification": ["train"],
}

Hinvec_bidir = ModelMeta(
loader=partial( # type: ignore
sentence_transformers_loader,
model_name="Sailesh97/Hinvec",
revision="d4fc678720cc1b8c5d18599ce2d9a4d6090c8b6b",
instruction_template=instruction_template,
trust_remote_code=True,
max_seq_length=2048,
padding_side="left",
add_eos_token=True,
),
name="Sailesh97/Hinvec",
languages=["eng-Latn", "hin-Deva"],
open_weights=True,
revision="d4fc678720cc1b8c5d18599ce2d9a4d6090c8b6b",
release_date="2025-06-19",
n_parameters=939_591_680,
memory_usage_mb=3715,
embed_dim=2048,
license="cc-by-nc-4.0",
max_tokens=2048,
reference="https://huggingface.co/Sailesh97/Hinvec",
Comment thread
KennethEnevoldsen marked this conversation as resolved.
similarity_fn_name="cosine",
framework=["Sentence Transformers", "PyTorch"],
use_instructions=True,
training_datasets=hinvec_training_datasets,
public_training_code=None,
public_training_data=None,
Comment thread
KennethEnevoldsen marked this conversation as resolved.
)
2 changes: 2 additions & 0 deletions mteb/models/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
google_models,
gritlm_models,
gte_models,
hinvec_models,
hit_tmg_models,
ibm_granite_models,
inf_models,
Expand Down Expand Up @@ -123,6 +124,7 @@
google_models,
gritlm_models,
gte_models,
hinvec_models,
hit_tmg_models,
ibm_granite_models,
inf_models,
Expand Down
Loading