Sentence Similarity
sentence-transformers
PyTorch
ONNX
Transformers
Transformers.js
English
nomic_bert
feature-extraction
mteb
custom_code
Eval Results (legacy)
text-embeddings-inference
Instructions to use nomic-ai/nomic-embed-text-v1-unsupervised with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use nomic-ai/nomic-embed-text-v1-unsupervised with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nomic-ai/nomic-embed-text-v1-unsupervised", trust_remote_code=True) 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 nomic-ai/nomic-embed-text-v1-unsupervised with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("nomic-ai/nomic-embed-text-v1-unsupervised", trust_remote_code=True) model = AutoModel.from_pretrained("nomic-ai/nomic-embed-text-v1-unsupervised", trust_remote_code=True, device_map="auto") - Transformers.js
How to use nomic-ai/nomic-embed-text-v1-unsupervised with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('feature-extraction', 'nomic-ai/nomic-embed-text-v1-unsupervised'); - Notebooks
- Google Colab
- Kaggle
Add Sentence Transformers support
#2
by tomaarsen HF Staff - opened
Hello!
This PR is a near mirror of https://huggingface.co/nomic-ai/nomic-embed-text-v1/discussions/1, except this model already has a tokenizer. I did update the tokenizer config (512 -> 8192 max model length) & beyond that the changes are pretty much the same as the previous PR.
- Tom Aarsen
zpn changed pull request status to open
I'm kind of a noob with the interface here, it says there's a conflict with the README. are you able to merge the changes from main into this branch?
zpn changed pull request status to merged