Update README.md
Browse files
README.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
| 1 |
-
---
|
| 2 |
-
language: en
|
| 3 |
-
library_name: splade-index
|
| 4 |
-
tags:
|
| 5 |
-
- splade
|
| 6 |
-
- splade-index
|
| 7 |
-
- retrieval
|
| 8 |
-
- search
|
| 9 |
-
- sparse
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
|
| 12 |
# Splade-Index
|
| 13 |
|
|
@@ -32,20 +34,16 @@ 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_108k_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 +54,4 @@ This dataset was created using the following data:
|
|
| 56 |
| --- | --- |
|
| 57 |
| Number of documents | 108593 |
|
| 58 |
| Number of tokens | 20265694 |
|
| 59 |
-
| Average tokens per document | 186.62 |
|
| 60 |
-
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
library_name: splade-index
|
| 4 |
+
tags:
|
| 5 |
+
- splade
|
| 6 |
+
- splade-index
|
| 7 |
+
- retrieval
|
| 8 |
+
- search
|
| 9 |
+
- sparse
|
| 10 |
+
datasets:
|
| 11 |
+
- yosefw/natural-questions-108k
|
| 12 |
+
---
|
| 13 |
|
| 14 |
# Splade-Index
|
| 15 |
|
|
|
|
| 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 = "naver/splade-v3-distilbert" # the SPLADE model id
|
| 42 |
model = SparseEncoder(model_id)
|
| 43 |
|
|
|
|
|
|
|
| 44 |
repo_id = "rasyosef/natural_questions_108k_splade_index"
|
|
|
|
| 45 |
# Load a SPLADE index from the Hugging Face model hub
|
| 46 |
+
retriever = SPLADE.load_from_hub(repo_id, model=model)
|
| 47 |
```
|
| 48 |
|
| 49 |
## Stats
|
|
|
|
| 54 |
| --- | --- |
|
| 55 |
| Number of documents | 108593 |
|
| 56 |
| Number of tokens | 20265694 |
|
| 57 |
+
| Average tokens per document | 186.62 |
|
|
|