Sentence Similarity
sentence-transformers
ONNX
Safetensors
Transformers
bert
feature-extraction
text-embeddings-inference
Instructions to use LazarusNLP/all-indo-e5-small-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use LazarusNLP/all-indo-e5-small-v4 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("LazarusNLP/all-indo-e5-small-v4") 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 LazarusNLP/all-indo-e5-small-v4 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("LazarusNLP/all-indo-e5-small-v4") model = AutoModel.from_pretrained("LazarusNLP/all-indo-e5-small-v4", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Download special_tokens_map.json from LazarusNLP/all-indo-e5-small-v4: direct link, hf CLI and curl.
- Browser
- Download file 965 Bytes
-
https://huggingface.co/LazarusNLP/all-indo-e5-small-v4/resolve/main/special_tokens_map.json
- Command line
-
hf download hf://LazarusNLP/all-indo-e5-small-v4/special_tokens_map.json
-
curl -L -o special_tokens_map.json https://huggingface.co/LazarusNLP/all-indo-e5-small-v4/resolve/main/special_tokens_map.json
965 Bytes
| { | |
| "bos_token": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "cls_token": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "mask_token": { | |
| "content": "<mask>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "pad_token": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "sep_token": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "unk_token": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |