rasyosef commited on
Commit
19b91e2
·
verified ·
1 Parent(s): 626e357

Update Splade Index

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ corpus.jsonl filter=lfs diff=lfs merge=lfs -text
37
+ corpus.mmindex.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
14
+ This is an index created with the [splade-index](https://github.com/rasyosef/splade-index) library (version `0.2.0`)
15
+
16
+ ## Installation
17
+
18
+ You can install the `splade-index` library with `pip`:
19
+
20
+ ```bash
21
+ pip install "splade-index==0.2.0"
22
+
23
+ # Include extra dependencies like stemmer
24
+ pip install "splade-index[full]==0.2.0"
25
+
26
+ # For huggingface hub usage
27
+ pip install huggingface_hub
28
+ ```
29
+
30
+ ## Load this Index
31
+
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 = "the-splade-model-id" # Enter the splade 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, token=token)
49
+ ```
50
+
51
+ ## Stats
52
+
53
+ This dataset was created using the following data:
54
+
55
+ | Statistic | Value |
56
+ | --- | --- |
57
+ | Number of documents | 2681468 |
58
+ | Number of tokens | 464573223 |
59
+ | Average tokens per document | 173.25 |
60
+
corpus.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8538ecb90cb39efe5c714fffc7f33fccc9c0a2cfa26fefe78719984b817b0f7
3
+ size 1352178313
corpus.mmindex.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc815836a535e07102b65018672d4a39cd5bfe4ce2f2f582b1eea86ea1fc64cb
3
+ size 27329599
csc.index.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f38dd48ccdd3178d991ba25d6f8c57ec2d6fe7b912825b2db7066469d1ea160
3
+ size 2517313766
params.index.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "dtype": "float32",
3
+ "int_dtype": "int32",
4
+ "num_docs": 2681468,
5
+ "version": "0.2.0",
6
+ "backend": "numpy"
7
+ }
vocab.index.json ADDED
The diff for this file is too large to render. See raw diff