Sentence Similarity
sentence-transformers
Safetensors
Transformers
Russian
bert
pretraining
russian
embeddings
tiny
feature-extraction
text-embeddings-inference
Run this model with HF Jobs
Run sergeyzh/rubert-tiny-sts on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/sergeyzh/rubert-tiny-sts. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/sergeyzh/rubert-tiny-sts on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use sergeyzh/rubert-tiny-sts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sergeyzh/rubert-tiny-sts with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sergeyzh/rubert-tiny-sts") sentences = [ "Это счастливый человек", "Это счастливая собака", "Это очень счастливый человек", "Сегодня солнечный день" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use sergeyzh/rubert-tiny-sts with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("sergeyzh/rubert-tiny-sts") model = AutoModelForPreTraining.from_pretrained("sergeyzh/rubert-tiny-sts", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files78 unmodified lines798081828384858687888990919278 unmodified lines## Быстродействие и размеры| Модель | CPU | GPU | size | dim | n_ctx | n_vocab ||:---------------------------------|----------:|----------:|----------:|----------:|----------:|----------:|| [intfloat/multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) | 149.026 | 15.629 | 2136 | 1024 | 514 | 250002 || [sergeyzh/LaBSE-ru-sts](https://huggingface.co/sergeyzh/LaBSE-ru-sts) | 42.835 | 8.561 | 490 | 768 | 512 | 55083 || **sergeyzh/rubert-tiny-sts** | **3.208** | **2.866** | **111** | **312** | **2048** | **83828** || [Tochka-AI/ruRoPEBert-e5-base-512](https://huggingface.co/Tochka-AI/ruRoPEBert-e5-base-512) | 43.314 | 9.338 | 530 | 768 | 512 | 69382 || [cointegrated/LaBSE-en-ru](https://huggingface.co/cointegrated/LaBSE-en-ru) | 42.867 | 8.549 | 490 | 768 | 512 | 55083 || [cointegrated/rubert-tiny2](https://huggingface.co/cointegrated/rubert-tiny2) | 3.212 | 2.850 | 111 | 312 | 2048 | 83828 |## Связанные ресурсы78 unmodified lines79808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611778 unmodified lines## Быстродействие и размерыНа бенчмарке [encodechka](https://github.com/avidale/encodechka):| Модель | CPU | GPU | size | dim | n_ctx | n_vocab ||:---------------------------------|----------:|----------:|----------:|----------:|----------:|----------:|| [intfloat/multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) | 149.026 | 15.629 | 2136 | 1024 | 514 | 250002 || [sergeyzh/LaBSE-ru-sts](https://huggingface.co/sergeyzh/LaBSE-ru-sts) | 42.835 | 8.561 | 490 | 768 | 512 | 55083 || **sergeyzh/rubert-tiny-sts** | **3.208** | **3.379** | **111** | **312** | **2048** | **83828** || [Tochka-AI/ruRoPEBert-e5-base-512](https://huggingface.co/Tochka-AI/ruRoPEBert-e5-base-512) | 43.314 | 9.338 | 532 | 768 | 512 | 69382 || [cointegrated/LaBSE-en-ru](https://huggingface.co/cointegrated/LaBSE-en-ru) | 42.867 | 8.549 | 490 | 768 | 512 | 55083 || [cointegrated/rubert-tiny2](https://huggingface.co/cointegrated/rubert-tiny2) | 3.212 | 3.384 | 111 | 312 | 2048 | 83828 |При использовании батчей с `sentence_transformers`:```pythonfrom sentence_transformers import SentenceTransformermodel_name = 'sergeyzh/rubert-tiny-sts'model = SentenceTransformer(model_name, device='cpu')sentences = ["Тест быстродействия на CPU Ryzen 7 3800X: batch = 1000"] * 1000%timeit -n 5 -r 3 model.encode(sentences)# 840 ms ± 8.08 ms per loop (mean ± std. dev. of 3 runs, 5 loops each)# 1000/0.840 = 1190 snt/smodel = SentenceTransformer(model_name, device='cuda')sentences = ["Тест быстродействия на GPU RTX 3060: batch = 8000"] * 8000%timeit -n 5 -r 3 model.encode(sentences)# 922 ms ± 29.5 ms per loop (mean ± std. dev. of 3 runs, 5 loops each)# 8000/0.922 = 8677 snt/s```## Связанные ресурсы
README.md+28-3