Sentence Similarity
Transformers.js
ONNX
sentence-transformers
Russian
modernbert
feature-extraction
text-embeddings-inference
Instructions to use onnx-community/USER2-small-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/USER2-small-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'onnx-community/USER2-small-ONNX'); - sentence-transformers
How to use onnx-community/USER2-small-ONNX with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("onnx-community/USER2-small-ONNX") sentences = [ "Это счастливый человек", "Это счастливая собака", "Это очень счастливый человек", "Сегодня солнечный день" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!