Sentence Similarity
sentence-transformers
PyTorch
Safetensors
Transformers
Russian
bert
pretraining
russian
fill-mask
embeddings
masked-lm
tiny
feature-extraction
text-embeddings-inference
Instructions to use cointegrated/rubert-tiny2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use cointegrated/rubert-tiny2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("cointegrated/rubert-tiny2") 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] - Transformers
How to use cointegrated/rubert-tiny2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("cointegrated/rubert-tiny2") model = AutoModelForPreTraining.from_pretrained("cointegrated/rubert-tiny2") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit ·
dad72b8
1
Parent(s): 77a7ef3
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
---
|
| 2 |
-
language:
|
| 3 |
-
|
|
|
|
| 4 |
tags:
|
| 5 |
- russian
|
| 6 |
- fill-mask
|
|
@@ -12,10 +13,9 @@ tags:
|
|
| 12 |
- sentence-similarity
|
| 13 |
- sentence-transformers
|
| 14 |
- transformers
|
| 15 |
-
|
| 16 |
license: mit
|
| 17 |
widget:
|
| 18 |
-
- text:
|
| 19 |
---
|
| 20 |
This is an updated version of [cointegrated/rubert-tiny](https://huggingface.co/cointegrated/rubert-tiny): a small Russian BERT-based encoder with high-quality sentence embeddings. This [post in Russian](https://habr.com/ru/post/669674/) gives more details.
|
| 21 |
|
|
@@ -57,4 +57,4 @@ model = SentenceTransformer('cointegrated/rubert-tiny2')
|
|
| 57 |
sentences = ["привет мир", "hello world", "здравствуй вселенная"]
|
| 58 |
embeddings = model.encode(sentences)
|
| 59 |
print(embeddings)
|
| 60 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- ru
|
| 4 |
+
pipeline_tag: sentence-similarity
|
| 5 |
tags:
|
| 6 |
- russian
|
| 7 |
- fill-mask
|
|
|
|
| 13 |
- sentence-similarity
|
| 14 |
- sentence-transformers
|
| 15 |
- transformers
|
|
|
|
| 16 |
license: mit
|
| 17 |
widget:
|
| 18 |
+
- text: Миниатюрная модель для [MASK] разных задач.
|
| 19 |
---
|
| 20 |
This is an updated version of [cointegrated/rubert-tiny](https://huggingface.co/cointegrated/rubert-tiny): a small Russian BERT-based encoder with high-quality sentence embeddings. This [post in Russian](https://habr.com/ru/post/669674/) gives more details.
|
| 21 |
|
|
|
|
| 57 |
sentences = ["привет мир", "hello world", "здравствуй вселенная"]
|
| 58 |
embeddings = model.encode(sentences)
|
| 59 |
print(embeddings)
|
| 60 |
+
```
|