Sentence Similarity
sentence-transformers
Safetensors
nomic_bert
feature-extraction
custom_code
text-embeddings-inference
Instructions to use nomic-ai/nomic-embed-text-v2-moe 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-v2-moe with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nomic-ai/nomic-embed-text-v2-moe", 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] - Notebooks
- Google Colab
- Kaggle
Issue with local_files_only=True
#7
by bzikst - opened
I'm trying to use this model offline with SentenceTransformer. When setting local_files_only=True flag I got error:
resolved_module_file = cached_file(
^^^^^^^^^^^^
File "/home/alexeym/.local/lib/python3.12/site-packages/transformers/utils/hub.py", line 446, in cached_file
raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like nomic-ai/nomic-bert-2048 is not the path to a directory containing a file named configuration_hf_nomic_bert.py.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
Files configuration_hf_nomic_bert.py and modeling_hf_nomic_bert.py is downloading with local_files_only=False. How I can get it pre-downloaded?
You need to download the other files I believe: https://huggingface.co/docs/transformers/installation#fetch-models-and-tokenizers-to-use-offline
zpn changed discussion status to closed
Can you please get a repo link where I can find this two files?
Oh.. thank you. Missed this.