Skip to content

Commit

Permalink
Update hf_models.py
Browse files Browse the repository at this point in the history
Added `sentence-transformers/paraphrase-multilingual-mpnet-base-v2`
  • Loading branch information
timpal0l authored Oct 23, 2023
1 parent 4cb3f7e commit c4d5886
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/seb/seb_models/hf_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ def create_multilingual_mini_lm_l12_v2() -> SebModel:
)


@models.register("sentence-transformers/paraphrase-multilingual-mpnet-base-v2")
def create_multilingual_mpnet_base_v2() -> SebModel:
hf_name = "sentence-transformers/paraphrase-multilingual-mpnet-base-v2"
meta = ModelMeta(
name=hf_name.split("/")[-1],
huggingface_name=hf_name,
reference=f"https://huggingface.co/{hf_name}",
languages=[],
)
return SebModel(
loader=partial(get_sentence_transformer, model_name=hf_name), # type: ignore
meta=meta,
)


@models.register("KBLab/sentence-bert-swedish-cased")
def create_sentence_swedish_cased() -> SebModel:
hf_name = "KBLab/sentence-bert-swedish-cased"
Expand Down

0 comments on commit c4d5886

Please sign in to comment.