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") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit ·
06f163f
1
Parent(s): fc0e05a
Librarian Bot: Update dataset YAML metadata for model
Browse filesThis is a pull request to add a dataset, [`NbAiLab/mnli-norwegian`](https://huggingface.co/datasets/NbAiLab/mnli-norwegian), to the metadata for your model (defined in the `YAML` block of your model's `README.md`).
The pull request was made by [librarian-bot](https://huggingface.co/librarian-bot) and used a combination of rules and/or machine learning to suggest this additional metadata.
If this suggestion is incorrect, feel free to close this pull request.
Librarian Bot was made by [@davanstrien](https://huggingface.co/davanstrien); feel free to get in touch with feedback.
README.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
| 1 |
---
|
| 2 |
-
pipeline_tag: sentence-similarity
|
| 3 |
tags:
|
| 4 |
- sentence-transformers
|
| 5 |
- feature-extraction
|
| 6 |
- sentence-similarity
|
| 7 |
- transformers
|
|
|
|
|
|
|
| 8 |
widget:
|
| 9 |
-
- source_sentence:
|
| 10 |
sentences:
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
example_title:
|
| 15 |
-
- source_sentence:
|
| 16 |
sentences:
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
example_title:
|
| 21 |
-
- source_sentence:
|
| 22 |
sentences:
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
example_title:
|
| 27 |
-
|
| 28 |
---
|
| 29 |
|
| 30 |
# NB-SBERT-BASE
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
tags:
|
| 3 |
- sentence-transformers
|
| 4 |
- feature-extraction
|
| 5 |
- sentence-similarity
|
| 6 |
- transformers
|
| 7 |
+
datasets: NbAiLab/mnli-norwegian
|
| 8 |
+
pipeline_tag: sentence-similarity
|
| 9 |
widget:
|
| 10 |
+
- source_sentence: This is a Norwegian boy
|
| 11 |
sentences:
|
| 12 |
+
- Dette er en norsk gutt
|
| 13 |
+
- This is an English boy
|
| 14 |
+
- This is a dog
|
| 15 |
+
example_title: Cross Language
|
| 16 |
+
- source_sentence: Det er noen dyr utenfor vinduet
|
| 17 |
sentences:
|
| 18 |
+
- På utsiden kan jeg høre noen hunder
|
| 19 |
+
- Noen mennesker prater utenfor vinduet
|
| 20 |
+
- Alle burde ha kjæledyr
|
| 21 |
+
example_title: Paraphrases
|
| 22 |
+
- source_sentence: En kvinne sitter i en stol
|
| 23 |
sentences:
|
| 24 |
+
- A woman is sitting in a chair
|
| 25 |
+
- Hun slapper av og leser i en bok
|
| 26 |
+
- Hun løper maraton
|
| 27 |
+
example_title: Paraphrases across language
|
|
|
|
| 28 |
---
|
| 29 |
|
| 30 |
# NB-SBERT-BASE
|