Add comprehensive dataset README
Browse files
README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Vector Database Dataset
|
| 2 |
+
|
| 3 |
+
Generated embeddings dataset for vector database training and evaluation with multiple format support.
|
| 4 |
+
|
| 5 |
+
## Dataset Structure
|
| 6 |
+
- **Base dataset**: 1,000,000 samples with embeddings
|
| 7 |
+
- **Query dataset**: 100,000 query samples
|
| 8 |
+
- **Embedding dimension**: 1024
|
| 9 |
+
|
| 10 |
+
## Repository Structure
|
| 11 |
+
|
| 12 |
+
### 📁 parquet/
|
| 13 |
+
Contains parquet files compatible with HuggingFace dataset viewer:
|
| 14 |
+
- `base.parquet` - Main dataset with text and embeddings
|
| 15 |
+
- `queries.parquet` - Query subset for evaluation
|
| 16 |
+
|
| 17 |
+
### 📁 fvecs/
|
| 18 |
+
Contains .fvecs files for DiskANN compatibility:
|
| 19 |
+
- `base.fvecs` - Base vectors in fvecs format
|
| 20 |
+
- `queries.fvecs` - Query vectors in fvecs format
|
| 21 |
+
|
| 22 |
+
### 📁 diskann/
|
| 23 |
+
Contains pre-built DiskANN index files:
|
| 24 |
+
- `gt_*.fbin` - Ground truth file
|
| 25 |
+
- `index_*.index` - DiskANN index files
|
| 26 |
+
- Additional index metadata files
|
| 27 |
+
|
| 28 |
+
## Usage
|
| 29 |
+
|
| 30 |
+
### Loading with HuggingFace Datasets
|
| 31 |
+
```python
|
| 32 |
+
from datasets import load_dataset
|
| 33 |
+
|
| 34 |
+
# Load the dataset (uses parquet files automatically)
|
| 35 |
+
dataset = load_dataset("maknee/wikipedia_stella")
|
| 36 |
+
base_data = dataset['base']
|
| 37 |
+
query_data = dataset['queries']
|
| 38 |
+
|
| 39 |
+
# Access embeddings and texts
|
| 40 |
+
import numpy as np
|
| 41 |
+
embeddings = np.array(base_data['embedding'])
|
| 42 |
+
texts = base_data['text']
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
### Using .fvecs files with DiskANN
|
| 46 |
+
```python
|
| 47 |
+
# Download and use .fvecs files
|
| 48 |
+
from huggingface_hub import hf_hub_download
|
| 49 |
+
|
| 50 |
+
base_fvecs = hf_hub_download(repo_id="{repo_name}", filename="fvecs/base.fvecs")
|
| 51 |
+
query_fvecs = hf_hub_download(repo_id="{repo_name}", filename="fvecs/queries.fvecs")
|
| 52 |
+
|
| 53 |
+
# Load with your DiskANN pipeline
|
| 54 |
+
# (Implementation depends on your DiskANN setup)
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
### Using Pre-built DiskANN Index
|
| 58 |
+
```python
|
| 59 |
+
# Download index files
|
| 60 |
+
from huggingface_hub import hf_hub_download
|
| 61 |
+
import os
|
| 62 |
+
|
| 63 |
+
# Create local directory for index
|
| 64 |
+
os.makedirs("diskann_index", exist_ok=True)
|
| 65 |
+
|
| 66 |
+
# Download all index files (adjust filenames as needed)
|
| 67 |
+
index_files = ["gt_100.fbin", "index_64_100_256_disk.index"] # Example names
|
| 68 |
+
for filename in index_files:
|
| 69 |
+
hf_hub_download(
|
| 70 |
+
repo_id="{repo_name}",
|
| 71 |
+
filename=f"diskann/{filename}",
|
| 72 |
+
local_dir="diskann_index"
|
| 73 |
+
)
|
| 74 |
+
|
| 75 |
+
# Use with DiskANN search
|
| 76 |
+
# (Implementation depends on your DiskANN setup)
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
## File Formats
|
| 80 |
+
|
| 81 |
+
- **Parquet**: Efficient columnar format, compatible with pandas/HuggingFace
|
| 82 |
+
- **fvecs**: Binary format for vector data, used by many vector search libraries
|
| 83 |
+
- **DiskANN**: Optimized index format for fast similarity search
|
| 84 |
+
|
| 85 |
+
Generated with the DiskANN embedding generation tool.
|