Instructions to use nvidia/NV-Embed-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use nvidia/NV-Embed-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nvidia/NV-Embed-v1", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
nvidia/NV-Embed-v1 is not the path to a directory containing a file named config.json.
_raise_exceptions_for_gated_repo, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash, **deprecated_kwargs)
440 ):
441 return resolved_file
--> 442 raise EnvironmentError(
443 f"We couldn't connect to '{HUGGINGFACE_CO_RESOLVE_ENDPOINT}' to load this file, couldn't find it in the"
444 f" cached files and it looks like {path_or_repo_id} is not the path to a directory containing a file named"
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 nvidia/NV-Embed-v1 is not the path to a directory containing a file named config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
Unable to invoke model
first: Switch to your local model path,and open config.json
second: Change the value of _name_or_path and replace it with your local model path.
same issue
Thanks for reporting the issue. This case is updated in trouble shooting case in model card as below.
- Fixing "nvidia/NV-Embed-v1 is not the path to a directory containing a file named config.json"
Switch to your local model path,and open config.json and change the value of "_name_or_path" and replace it with your local model path.