Skip to content

Commit

Permalink
add french embeddings (#149)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Clavié <[email protected]>
  • Loading branch information
mauryaland and bclavie authored Feb 23, 2024
1 parent d13d592 commit 3855b83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ragatouille/negative_miners/simpleminer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
class DenseModels(Enum):
en_small = "BAAI/bge-small-en-v1.5"
zh_small = "thenlper/gte-small-zh"
fr_small = "OrdalieTech/Solon-embeddings-base-0.1"
other_small = "intfloat/multilingual-e5-small"
en_base = "BAAI/bge-base-en-v1.5"
zh_base = "thenlper/gte-base-zh"
fr_base = "OrdalieTech/Solon-embeddings-base-0.1"
other_base = "intfloat/multilingual-e5-base"
en_large = "BAAI/bge-large-en-v1.5"
zh_large = "thenlper/gte-large-zh"
fr_large = "OrdalieTech/Solon-embeddings-large-0.1"
other_large = "intfloat/multilingual-e5-large"


Expand All @@ -36,7 +39,7 @@ def __init__(
self.n_gpu = torch.cuda.device_count()
self.target_language = language_code
self.model_size = model_size
if language_code not in ["en", "zh"]:
if language_code not in ["en", "zh", "fr"]:
language_code = "other"
self.model_name = f"{language_code}_{model_size}"
hub_model = DenseModels[self.model_name].value
Expand Down

0 comments on commit 3855b83

Please sign in to comment.