Sentence Similarity
sentence-transformers
Safetensors
Transformers
Russian
English
bert
feature-extraction
russian
pretraining
embeddings
text-embeddings-inference
Instructions to use sergeyzh/BERTA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sergeyzh/BERTA with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sergeyzh/BERTA") sentences = [ "Это счастливый человек", "Это счастливая собака", "Это очень счастливый человек", "Сегодня солнечный день" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use sergeyzh/BERTA with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("sergeyzh/BERTA") model = AutoModel.from_pretrained("sergeyzh/BERTA", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
File size: 1,469 Bytes
914c8c8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | {
"__version__": {
"sentence_transformers": "2.7.0",
"transformers": "4.40.1",
"pytorch": "2.2.1+cu118"
},
"prompts": {
"query": "search_query: ",
"passage": "search_document: ",
"CEDRClassification": "categorize_sentiment: ",
"GeoreviewClassification": "categorize_sentiment: ",
"GeoreviewClusteringP2P": "categorize_topic: ",
"HeadlineClassification": "categorize_topic: ",
"InappropriatenessClassification": "categorize_topic: ",
"KinopoiskClassification": "categorize_sentiment: ",
"MassiveIntentClassification": "categorize: ",
"MassiveScenarioClassification": "paraphrase: ",
"RuReviewsClassification": "categorize_sentiment: ",
"RUParaPhraserSTS": "paraphrase: ",
"RuSTSBenchmarkSTS": "categorize: ",
"STS22": "paraphrase: ",
"RuSciBenchGRNTIClassification": "categorize_topic: ",
"RuSciBenchGRNTIClusteringP2P": "categorize_topic: ",
"RuSciBenchOECDClassification": "categorize_topic: ",
"RuSciBenchOECDClusteringP2P": "categorize_topic: ",
"SensitiveTopicsClassification": "categorize_topic: ",
"TERRa": "categorize_entailment: ",
"Classification": "categorize_entailment: ",
"MultilabelClassification": "categorize: ",
"Clustering": "categorize_topic: ",
"PairClassification": "categorize_entailment: ",
"STS": "paraphrase: "
},
"default_prompt_name": "Classification",
"similarity_fn_name": null
}
|