Sentence Similarity
sentence-transformers
PyTorch
Safetensors
Transformers
Norwegian
bert
feature-extraction
text-embeddings-inference
Instructions to use NbAiLab/nb-sbert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use NbAiLab/nb-sbert-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("NbAiLab/nb-sbert-base") sentences = [ "This is a Norwegian boy", "Dette er en norsk gutt", "This is an English boy", "This is a dog" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use NbAiLab/nb-sbert-base with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("NbAiLab/nb-sbert-base") model = AutoModel.from_pretrained("NbAiLab/nb-sbert-base", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Download similarity_evaluation_sts-test_results.csv from NbAiLab/nb-sbert-base: direct link, hf CLI and curl.
- Browser
- Download file 298 Bytes
-
https://huggingface.co/NbAiLab/nb-sbert-base/resolve/main/similarity_evaluation_sts-test_results.csv
- Command line
-
hf download hf://NbAiLab/nb-sbert-base/similarity_evaluation_sts-test_results.csv
-
curl -L -o similarity_evaluation_sts-test_results.csv https://huggingface.co/NbAiLab/nb-sbert-base/resolve/main/similarity_evaluation_sts-test_results.csv
298 Bytes
| epoch,steps,cosine_pearson,cosine_spearman,euclidean_pearson,euclidean_spearman,manhattan_pearson,manhattan_spearman,dot_pearson,dot_spearman | |
| -1,-1,0.8275085075461329,0.82454653044575,0.8189631397786282,0.8179737003889682,0.8192793931752765,0.8181757117136191,0.8038510401130279,0.7950975162189595 | |