Update README to reflect new dataset structure with train/ and test/ directories
Browse files
README.md
CHANGED
|
@@ -1,23 +1,20 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
num_examples: 256
|
| 19 |
-
download_size: 28699669151
|
| 20 |
-
dataset_size: 52899390680
|
| 21 |
configs:
|
| 22 |
- config_name: default
|
| 23 |
data_files:
|
|
@@ -27,48 +24,80 @@ configs:
|
|
| 27 |
path: test/*.parquet
|
| 28 |
---
|
| 29 |
|
| 30 |
-
# Wikipedia
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
## Dataset
|
| 35 |
-
|
| 36 |
-
The dataset is organized into two splits:
|
| 37 |
-
|
| 38 |
-
### Train Split
|
| 39 |
-
- **Location**: `train/` directory
|
| 40 |
-
- **Files**: 7 parquet files (`train-00000-of-00007.parquet` through `train-00006-of-00007.parquet`)
|
| 41 |
-
- **Size**: 6,406,711 documents
|
| 42 |
-
- **Content**: Wikipedia articles with precomputed embeddings
|
| 43 |
|
| 44 |
-
|
| 45 |
-
- **
|
| 46 |
-
- **
|
| 47 |
-
- **
|
| 48 |
-
- **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
##
|
| 51 |
|
| 52 |
-
|
| 53 |
-
- `doc_id`: Unique document identifier
|
| 54 |
-
- `title`: Article title
|
| 55 |
-
- `text`: Full article text
|
| 56 |
-
- `emb`: Precomputed embeddings (SPLADE sparse + BGE dense)
|
| 57 |
-
|
| 58 |
-
## Usage
|
| 59 |
|
| 60 |
```python
|
| 61 |
from datasets import load_dataset
|
| 62 |
|
| 63 |
-
#
|
| 64 |
-
dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge")
|
| 65 |
|
| 66 |
# Load specific splits
|
| 67 |
train_dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge", split="train")
|
| 68 |
test_dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge", split="test")
|
| 69 |
|
| 70 |
-
#
|
| 71 |
-
dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
```
|
| 73 |
|
| 74 |
## File Organization
|
|
@@ -76,30 +105,17 @@ dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge", streaming=True)
|
|
| 76 |
```
|
| 77 |
.
|
| 78 |
├── train/
|
| 79 |
-
│ ├── train-00000-of-00007.parquet
|
| 80 |
-
│ ├── train-00001-of-00007.parquet
|
| 81 |
│ ├── train-00002-of-00007.parquet
|
| 82 |
│ ├── train-00003-of-00007.parquet
|
| 83 |
│ ├── train-00004-of-00007.parquet
|
| 84 |
│ ├── train-00005-of-00007.parquet
|
| 85 |
-
│ └── train-00006-of-00007.parquet
|
| 86 |
└── test/
|
| 87 |
-
└── test-00000-of-00001.parquet
|
| 88 |
```
|
| 89 |
|
| 90 |
## License
|
| 91 |
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
## Citation
|
| 95 |
-
|
| 96 |
-
If you use this dataset, please cite:
|
| 97 |
-
|
| 98 |
-
```bibtex
|
| 99 |
-
@dataset{wikipedia_splade_bge,
|
| 100 |
-
title={Wikipedia EN with SPLADE and BGE Embeddings},
|
| 101 |
-
author={Sicheng-Chroma},
|
| 102 |
-
year={2024},
|
| 103 |
-
publisher={Hugging Face}
|
| 104 |
-
}
|
| 105 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
license: cc-by-sa-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-retrieval
|
| 5 |
+
- sentence-similarity
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- wikipedia
|
| 10 |
+
- embeddings
|
| 11 |
+
- splade
|
| 12 |
+
- bge-m3
|
| 13 |
+
- dense-retrieval
|
| 14 |
+
- sparse-retrieval
|
| 15 |
+
- hybrid-search
|
| 16 |
+
size_categories:
|
| 17 |
+
- 1M<n<10M
|
|
|
|
|
|
|
|
|
|
| 18 |
configs:
|
| 19 |
- config_name: default
|
| 20 |
data_files:
|
|
|
|
| 24 |
path: test/*.parquet
|
| 25 |
---
|
| 26 |
|
| 27 |
+
# Wikipedia English with SPLADE and BGE-M3
|
| 28 |
|
| 29 |
+
Pre-computed SPLADE sparse and BGE-M3 dense embeddings for 6.4M English Wikipedia articles.
|
| 30 |
|
| 31 |
+
## Dataset Description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
- **Source**: [HuggingFaceFW/clean-wikipedia](https://huggingface.co/datasets/HuggingFaceFW/clean-wikipedia) (English)
|
| 34 |
+
- **Size**:
|
| 35 |
+
- **Train**: 6,406,711 documents
|
| 36 |
+
- **Test**: 256 queries
|
| 37 |
+
- **Format**:
|
| 38 |
+
- **Train**: 7 Parquet files (~1M records each) in `train/` directory
|
| 39 |
+
- **Test**: 1 Parquet file in `test/` directory
|
| 40 |
+
- **Embeddings**:
|
| 41 |
+
- **Sparse**: [SPLADE PP](https://huggingface.co/prithivida/Splade_PP_en_v1) - ~265 non-zero dims
|
| 42 |
+
- **Dense**: [BGE-M3](https://huggingface.co/BAAI/bge-m3) - 1024 dimensions
|
| 43 |
|
| 44 |
+
## Direct Usage
|
| 45 |
|
| 46 |
+
HuggingFace automatically discovers parquet files. You can load this dataset directly:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
```python
|
| 49 |
from datasets import load_dataset
|
| 50 |
|
| 51 |
+
# Stream the entire dataset (recommended for large dataset)
|
| 52 |
+
dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge", streaming=True)
|
| 53 |
|
| 54 |
# Load specific splits
|
| 55 |
train_dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge", split="train")
|
| 56 |
test_dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge", split="test")
|
| 57 |
|
| 58 |
+
# Load specific chunk
|
| 59 |
+
dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge",
|
| 60 |
+
data_files="train/train-00000-of-00007.parquet")
|
| 61 |
+
|
| 62 |
+
# Load multiple chunks
|
| 63 |
+
dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge",
|
| 64 |
+
data_files=["train/train-00000-of-00007.parquet", "train/train-00001-of-00007.parquet"])
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
## Dataset Structure
|
| 68 |
+
|
| 69 |
+
Each row contains:
|
| 70 |
+
|
| 71 |
+
| Field | Type | Description |
|
| 72 |
+
|-------|------|-------------|
|
| 73 |
+
| `text` | string | Full Wikipedia article text |
|
| 74 |
+
| `title` | string | Article title |
|
| 75 |
+
| `url` | string | Wikipedia URL |
|
| 76 |
+
| `sparse_embedding_indices` | list[int32] | SPLADE indices (non-zero positions) |
|
| 77 |
+
| `sparse_embedding_values` | list[float32] | SPLADE values (weights) |
|
| 78 |
+
| `dense_embedding` | list[float32] | BGE-M3 1024-dim dense vector |
|
| 79 |
+
|
| 80 |
+
## Example Usage
|
| 81 |
+
|
| 82 |
+
```python
|
| 83 |
+
from datasets import load_dataset
|
| 84 |
+
|
| 85 |
+
# Load the dataset (streaming recommended for large dataset)
|
| 86 |
+
ds = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge", streaming=True)
|
| 87 |
+
|
| 88 |
+
# Iterate through articles
|
| 89 |
+
for article in ds['train']:
|
| 90 |
+
print(f"Title: {article['title']}")
|
| 91 |
+
print(f"URL: {article['url']}")
|
| 92 |
+
print(f"Text preview: {article['text'][:200]}...")
|
| 93 |
+
print(f"Sparse embedding: {len(article['sparse_embedding_indices'])} non-zero dims")
|
| 94 |
+
print(f"Dense embedding: {len(article['dense_embedding'])} dims")
|
| 95 |
+
break
|
| 96 |
+
|
| 97 |
+
# Load into memory (for smaller chunks)
|
| 98 |
+
dataset = load_dataset("Sicheng-Chroma/wikipedia-en-splade-bge",
|
| 99 |
+
data_files="train/train-00000-of-00007.parquet")
|
| 100 |
+
print(f"Loaded {len(dataset['train'])} articles")
|
| 101 |
```
|
| 102 |
|
| 103 |
## File Organization
|
|
|
|
| 105 |
```
|
| 106 |
.
|
| 107 |
├── train/
|
| 108 |
+
│ ├── train-00000-of-00007.parquet - First 1M articles
|
| 109 |
+
│ ├── train-00001-of-00007.parquet - Next 1M articles
|
| 110 |
│ ├── train-00002-of-00007.parquet
|
| 111 |
│ ├── train-00003-of-00007.parquet
|
| 112 |
│ ├── train-00004-of-00007.parquet
|
| 113 |
│ ├── train-00005-of-00007.parquet
|
| 114 |
+
│ └── train-00006-of-00007.parquet - Final ~400K articles
|
| 115 |
└── test/
|
| 116 |
+
└── test-00000-of-00001.parquet - 256 test queries
|
| 117 |
```
|
| 118 |
|
| 119 |
## License
|
| 120 |
|
| 121 |
+
CC BY-SA 4.0 (inherited from Wikipedia)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|