Update README.md
Browse files
README.md
CHANGED
@@ -10,19 +10,20 @@ task_categories:
|
|
10 |
viewer: false
|
11 |
---
|
12 |
|
13 |
-
#
|
14 |
|
15 |
## Description
|
16 |
|
17 |
-
|
18 |
|
19 |
## Usage
|
20 |
|
21 |
```python
|
22 |
-
# Load the artifact
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
26 |
```
|
27 |
|
28 |
## Benchmarks
|
@@ -32,7 +33,15 @@ artifact = pta.Artifact.from_hf('macavaney/vaswani.splade.cache')
|
|
32 |
## Reproduction
|
33 |
|
34 |
```python
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
```
|
37 |
|
38 |
## Metadata
|
|
|
10 |
viewer: false
|
11 |
---
|
12 |
|
13 |
+
# SPLADE vector cache for Vaswani
|
14 |
|
15 |
## Description
|
16 |
|
17 |
+
A SPLADE vector cache for the Vaswani dataset.
|
18 |
|
19 |
## Usage
|
20 |
|
21 |
```python
|
22 |
+
>>> # Load the artifact
|
23 |
+
>>> from pyterrier_caching import IndexerCache
|
24 |
+
>>> cache = IndexerCache.from_hf('macavaney/vaswani.splade.cache')
|
25 |
+
>>> len(cache)
|
26 |
+
11429
|
27 |
```
|
28 |
|
29 |
## Benchmarks
|
|
|
33 |
## Reproduction
|
34 |
|
35 |
```python
|
36 |
+
import pyterrier as pt
|
37 |
+
pt.init()
|
38 |
+
from pyterrier_caching import IndexerCache
|
39 |
+
from pyt_splade import Splade
|
40 |
+
splade = Splade()
|
41 |
+
cache = IndexerCache('vaswani.splade.cache')
|
42 |
+
dataset = pt.get_dataset('irds:vaswani')
|
43 |
+
pipeline = splade.doc_encoder() >> cache.indexer()
|
44 |
+
pipeline.index(dataset.get_corpus_iter())
|
45 |
```
|
46 |
|
47 |
## Metadata
|