Sentence Similarity
Transformers.js
ONNX
sentence-transformers
Transformers
English
bert
feature-extraction
mteb
Eval Results (legacy)
text-embeddings-inference
Instructions to use onnx-community/NoInstruct-small-Embedding-v0-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/NoInstruct-small-Embedding-v0-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'onnx-community/NoInstruct-small-Embedding-v0-ONNX'); - sentence-transformers
How to use onnx-community/NoInstruct-small-Embedding-v0-ONNX with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("onnx-community/NoInstruct-small-Embedding-v0-ONNX") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use onnx-community/NoInstruct-small-Embedding-v0-ONNX with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("onnx-community/NoInstruct-small-Embedding-v0-ONNX") model = AutoModel.from_pretrained("onnx-community/NoInstruct-small-Embedding-v0-ONNX") - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!