Sentence Similarity
sentence-transformers
ONNX
bert
mteb
Sentence Transformers
Eval Results (legacy)
text-embeddings-inference
Instructions to use MintplexLabs/multilingual-e5-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use MintplexLabs/multilingual-e5-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("MintplexLabs/multilingual-e5-small") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
| from huggingface_hub import HfApi | |
| import os | |
| REPO_ID = "MintplexLabs/multilingual-e5-small" | |
| LOCAL_PATH = "." # your local directory | |
| api = HfApi() | |
| # Get list of files in repo | |
| remote_files = {f for f in api.list_repo_files(repo_id=REPO_ID)} | |
| # Delete .DS_Store files if present in remote | |
| ds_store_files = {f for f in remote_files if f.endswith('.DS_Store')} | |
| for file in ds_store_files: | |
| print(f"Deleting {file} from repo...") | |
| api.delete_file(path_in_repo=file, repo_id=REPO_ID) | |
| # Get list of files locally (recursively) | |
| local_files = set() | |
| for root, _, files in os.walk(LOCAL_PATH): | |
| for file in files: | |
| full_path = os.path.join(root, file) | |
| relative_path = os.path.relpath(full_path, LOCAL_PATH) | |
| local_files.add(relative_path.replace("\\", "/")) | |
| # Find files that exist remotely but not locally | |
| files_to_delete = remote_files - local_files | |
| # Delete them | |
| for file in files_to_delete: | |
| print(f"Deleting {file} from repo...") | |
| api.delete_file(path_in_repo=file, repo_id=REPO_ID) | |
| # Now re-upload local files using the CLI | |
| print(f"huggingface-cli upload {REPO_ID} {LOCAL_PATH}") |