Feature Extraction
sentence-transformers
Safetensors
English
modernvbert
sparse-retrieval
splade
visual-document-retrieval
multimodal
information-retrieval
inference-free
sparse-encoder
custom_code
Instructions to use naver/v-splade-efficient with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use naver/v-splade-efficient with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("naver/v-splade-efficient", 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
README: library_name -> sentence-transformers; human-readable tokens in decode snippet
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ tags:
|
|
| 11 |
- inference-free
|
| 12 |
- sentence-transformers
|
| 13 |
pipeline_tag: feature-extraction
|
| 14 |
-
library_name: transformers
|
| 15 |
---
|
| 16 |
|
| 17 |
<p align="center">
|
|
@@ -98,8 +98,8 @@ print(similarities)
|
|
| 98 |
|
| 99 |
# Inspect the top activated tokens of the page image
|
| 100 |
decoded = model.decode(document_embeddings[0], top_k=5)
|
| 101 |
-
print([(token, round(weight, 3)) for token, weight in decoded])
|
| 102 |
-
# [('
|
| 103 |
```
|
| 104 |
|
| 105 |
Images can be passed as PIL images, local paths, URLs (as above), or together with text as `{"image": ..., "text": ...}`. Plain text documents are also supported: `model.encode_document(["some passage text"])`. The model runs in bfloat16 by default. You can pass `model_kwargs={"torch_dtype": "float32"}` for full precision.
|
|
|
|
| 11 |
- inference-free
|
| 12 |
- sentence-transformers
|
| 13 |
pipeline_tag: feature-extraction
|
| 14 |
+
library_name: sentence-transformers
|
| 15 |
---
|
| 16 |
|
| 17 |
<p align="center">
|
|
|
|
| 98 |
|
| 99 |
# Inspect the top activated tokens of the page image
|
| 100 |
decoded = model.decode(document_embeddings[0], top_k=5)
|
| 101 |
+
print([(token.replace("Ġ", " ").strip(), round(weight, 3)) for token, weight in decoded])
|
| 102 |
+
# [('dog', 1.664), ('Records', 1.5), ('puppy', 1.469), ('Bennett', 1.414), ('dogs', 1.398)]
|
| 103 |
```
|
| 104 |
|
| 105 |
Images can be passed as PIL images, local paths, URLs (as above), or together with text as `{"image": ..., "text": ...}`. Plain text documents are also supported: `model.encode_document(["some passage text"])`. The model runs in bfloat16 by default. You can pass `model_kwargs={"torch_dtype": "float32"}` for full precision.
|