Update README.md
Browse files
README.md
CHANGED
|
@@ -7,6 +7,8 @@ tags:
|
|
| 7 |
- retrieval
|
| 8 |
- search
|
| 9 |
- sparse
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# Splade-Index
|
|
@@ -32,20 +34,17 @@ pip install huggingface_hub
|
|
| 32 |
You can use the following code to load this SPLADE index from Hugging Face hub:
|
| 33 |
|
| 34 |
```python
|
| 35 |
-
import os
|
| 36 |
from sentence_transformers import SparseEncoder
|
| 37 |
from splade_index import SPLADE
|
| 38 |
|
| 39 |
# Download the SPLADE model that was used to create the index from the HuggingFace Hub
|
| 40 |
-
model_id = "
|
| 41 |
model = SparseEncoder(model_id)
|
| 42 |
|
| 43 |
-
# Set your huggingface token if repo is private
|
| 44 |
-
token = os.environ["HF_TOKEN"]
|
| 45 |
repo_id = "rasyosef/natural_questions_3m_splade_index"
|
| 46 |
|
| 47 |
# Load a SPLADE index from the Hugging Face model hub
|
| 48 |
-
retriever = SPLADE.load_from_hub(repo_id, model=model
|
| 49 |
```
|
| 50 |
|
| 51 |
## Stats
|
|
@@ -56,5 +55,4 @@ This dataset was created using the following data:
|
|
| 56 |
| --- | --- |
|
| 57 |
| Number of documents | 2681468 |
|
| 58 |
| Number of tokens | 464573223 |
|
| 59 |
-
| Average tokens per document | 173.25 |
|
| 60 |
-
|
|
|
|
| 7 |
- retrieval
|
| 8 |
- search
|
| 9 |
- sparse
|
| 10 |
+
datasets:
|
| 11 |
+
- mteb/nq
|
| 12 |
---
|
| 13 |
|
| 14 |
# Splade-Index
|
|
|
|
| 34 |
You can use the following code to load this SPLADE index from Hugging Face hub:
|
| 35 |
|
| 36 |
```python
|
|
|
|
| 37 |
from sentence_transformers import SparseEncoder
|
| 38 |
from splade_index import SPLADE
|
| 39 |
|
| 40 |
# Download the SPLADE model that was used to create the index from the HuggingFace Hub
|
| 41 |
+
model_id = "rasyosef/splade-tiny" # The splade model id
|
| 42 |
model = SparseEncoder(model_id)
|
| 43 |
|
|
|
|
|
|
|
| 44 |
repo_id = "rasyosef/natural_questions_3m_splade_index"
|
| 45 |
|
| 46 |
# Load a SPLADE index from the Hugging Face model hub
|
| 47 |
+
retriever = SPLADE.load_from_hub(repo_id, model=model)
|
| 48 |
```
|
| 49 |
|
| 50 |
## Stats
|
|
|
|
| 55 |
| --- | --- |
|
| 56 |
| Number of documents | 2681468 |
|
| 57 |
| Number of tokens | 464573223 |
|
| 58 |
+
| Average tokens per document | 173.25 |
|
|
|