Sentence Similarity
sentence-transformers
PyTorch
Transformers
bert
feature-extraction
text-embeddings-inference
Instructions to use crewdon/AICategoryMapping-multilingual-e5-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use crewdon/AICategoryMapping-multilingual-e5-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("crewdon/AICategoryMapping-multilingual-e5-small") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use crewdon/AICategoryMapping-multilingual-e5-small with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("crewdon/AICategoryMapping-multilingual-e5-small") model = AutoModel.from_pretrained("crewdon/AICategoryMapping-multilingual-e5-small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from crewdon/AICategoryMapping-multilingual-e5-small: direct link, hf CLI and curl.
- Browser
- Download file 669 Bytes
-
https://huggingface.co/crewdon/AICategoryMapping-multilingual-e5-small/resolve/main/config.json
- Command line
-
hf download hf://crewdon/AICategoryMapping-multilingual-e5-small/config.json
-
curl -L -o config.json https://huggingface.co/crewdon/AICategoryMapping-multilingual-e5-small/resolve/main/config.json
669 Bytes
| { | |
| "_name_or_path": "./sbert_test_mnr3/", | |
| "architectures": [ | |
| "BertModel" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "classifier_dropout": null, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 384, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1536, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "absolute", | |
| "tokenizer_class": "XLMRobertaTokenizer", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.32.1", | |
| "type_vocab_size": 2, | |
| "use_cache": true, | |
| "vocab_size": 250037 | |
| } | |