Feature Extraction
Transformers
Safetensors
sentence-transformers
English
nvembed
mteb
custom_code
Eval Results (legacy)
Instructions to use nvidia/NV-Embed-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/NV-Embed-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="nvidia/NV-Embed-v2", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/NV-Embed-v2", trust_remote_code=True, dtype="auto") - sentence-transformers
How to use nvidia/NV-Embed-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nvidia/NV-Embed-v2", 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -2107,14 +2107,6 @@ scores = (query_embeddings @ passage_embeddings.T) * 100
|
|
| 2107 |
print(scores.tolist())
|
| 2108 |
```
|
| 2109 |
|
| 2110 |
-
### Usage (Infinity)
|
| 2111 |
-
|
| 2112 |
-
Usage via [Infinity, MIT License](https://github.com/michaelfeil/infinity).
|
| 2113 |
-
```bash
|
| 2114 |
-
docker run -it --gpus all -v ./data:/app/.cache -p 7997:7997 michaelf34/infinity:0.0.70 \
|
| 2115 |
-
v2 --model-id nvidia/NV-Embed-v2 --revision "refs/pr/23" --batch-size 8
|
| 2116 |
-
```
|
| 2117 |
-
|
| 2118 |
## License
|
| 2119 |
This model should not be used for any commercial purpose. Refer the [license](https://spdx.org/licenses/CC-BY-NC-4.0) for the detailed terms.
|
| 2120 |
|
|
|
|
| 2107 |
print(scores.tolist())
|
| 2108 |
```
|
| 2109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2110 |
## License
|
| 2111 |
This model should not be used for any commercial purpose. Refer the [license](https://spdx.org/licenses/CC-BY-NC-4.0) for the detailed terms.
|
| 2112 |
|