liuqi6777 commited on
Commit
c55bc4a
·
verified ·
1 Parent(s): bf1013c

Simplify dataset card

Browse files
Files changed (1) hide show
  1. README.md +14 -160
README.md CHANGED
@@ -3,176 +3,30 @@ language:
3
  - en
4
  task_categories:
5
  - text-retrieval
6
- - question-answering
7
  tags:
8
  - rag
9
  - retrieval
10
- - query-encoder
11
  - reler
12
  - flashrag
13
  - qwen3-embedding
14
- - nq
15
- - hotpotqa
16
- pretty_name: RELER RAG (G3) Data
17
- size_categories:
18
- - 10M<n<100M
19
  license: other
20
  ---
21
 
22
- # RELER RAG (G3) Data
23
 
24
- This repository contains the **data used to train and evaluate the RAG query-encoder
25
- experiments (G3)** in the RELER project. It is a self-contained snapshot: frozen
26
- Wikipedia corpus, the frozen E0 FAISS index, FlashRAG training/evaluation queries,
27
- mined candidate lists, passage-level qrels, and evaluation outputs.
28
 
29
- > **No model weights or training checkpoints are included.** Only data and
30
- > derived data artifacts.
 
 
 
 
 
 
 
31
 
32
- ## 仓库内容 / Contents
 
33
 
34
- ```
35
- rag/
36
- ├── corpus/
37
- │ ├── wiki18_100w.jsonl # 21,015,324 Wikipedia passages (13.4 GB)
38
- │ └── wiki18_100w.offsets.npy # byte offsets for O(1) passage lookup
39
- ├── qwen3_e0_index/ # frozen E0 FAISS index (41 GB, 64 shards)
40
- │ ├── index_manifest.json # hashes, model revision, pooling protocol
41
- │ ├── vectors-00000-of-00064.npy # float16, 1024-d, L2-normalized
42
- │ └── ...
43
- ├── flashrag/ # FlashRAG_datasets @ bcafb8dd (701 MB)
44
- │ ├── nq/{train,test}.jsonl
45
- │ ├── hotpotqa/{train,dev}.jsonl
46
- │ ├── triviaqa/test.jsonl
47
- │ ├── popqa/test.jsonl
48
- │ ├── 2wikimultihopqa/dev.jsonl
49
- │ ├── musique/dev.jsonl
50
- │ └── bamboogle/test.jsonl
51
- ├── raw/
52
- │ └── biencoder-nq-train.json.gz # DPR NQ train positives (2.2 GB)
53
- ├── candidates/
54
- │ ├── nq_hotpotqa_train.jsonl # top-1000 candidates, 108,730 queries (2.8 GB)
55
- │ ├── nq_hotpotqa_train.jsonl.manifest.json
56
- │ └── anchors/ # fp16 E0 query embeddings (anchor regularization)
57
- ├── qrels/
58
- │ ├── nq_hotpotqa_train.jsonl # official binary passage qrels
59
- │ ├── nq_hotpotqa_train.jsonl.manifest.json
60
- │ └── nq_hotpotqa_train.unresolved.jsonl
61
- ├── qrels_f1_0.5/ # relaxed HotpotQA mapping (ablation)
62
- ├── qrels_f1_0.8/ # identical to qrels/ (kept as named ablation)
63
- ├── qrels_alignment_cache/ # intermediate mapping cache
64
- ├── eval/ # evaluation outputs (7 QA datasets)
65
- │ ├── g3_e0/ # untrained E0 baseline
66
- │ ├── g3_cl_s42/, g3_retrl_mrr_s42/, g3_retrl_ndcg_s42/
67
- ├── generator_cache.sqlite3 # frozen-generator replay cache
68
- ├── flashrag_manifest.json # upstream provenance + per-file SHA-256
69
- └── question_leakage.json # 60 normalized train/eval question overlaps
70
- ```
71
-
72
- ## 数据来源与版本 / Provenance
73
-
74
- | Artifact | Upstream | Version / hash |
75
- |---|---|---|
76
- | Retrieval corpus | [FlashRAG `wiki18_100w`](https://huggingface.co/datasets/RUC-NLPIR/FlashRAG_datasets) | revision `bcafb8dd07d453be3cbeeeb3f78be1841bddf92c`, archive SHA-256 `e5b987a0…b956db` |
77
- | QA train/eval queries | same FlashRAG snapshot | see `rag/flashrag_manifest.json` |
78
- | NQ passage labels | [DPR `biencoder-nq-train.json.gz`](https://dl.fbaipublicfiles.com/dpr/data/retriever/biencoder-nq-train.json.gz) | SHA-256 `32492315…fe40c73` |
79
- | HotpotQA passage labels | FlashRAG `hotpotqa/train.jsonl` supporting facts | SHA-256 `a81274ab…64d1a` |
80
- | E0 document encoder | [Qwen/Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) | revision `97b0c614be4d77ee51c0cef4e5f07c00f9eb65b3` |
81
- | Frozen generator (answer rewards) | [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) | not included; run separately |
82
-
83
- ### Training queries
84
-
85
- - Sources: NQ `train` (79,168 rows) + HotpotQA `train` (90,447 rows) = 169,615.
86
- - After requiring complete passage-label mapping: **108,730 queries**
87
- (NQ 58,879; HotpotQA 49,851). HotpotQA queries whose supporting facts could
88
- not be mapped are dropped (40,547); NQ drops 1.
89
- - Default config holds out a deterministic 5% tuning split
90
- (`sha256("20260909:{source}:{query_id}")` bucket) → 103,293 train / 5,437 tuning.
91
- `configs/experiments/iclr2027/g3.yaml` uses `rag_split: full` (all 108,730).
92
-
93
- ### Labels
94
-
95
- - **NQ**: DPR `positive_ctxs` with `score == 1000` only.
96
- - **HotpotQA**: all annotated supporting facts mapped by title + sentence.
97
- - `qrels_f1_0.5/` relaxes the mapping with a title + window token-F1 ≥ 0.5 rule
98
- (66,223 HotpotQA queries kept); `qrels_f1_0.8/` is byte-identical to `qrels/`
99
- (SHA-256 `7ad52b9a…05144d`) and is kept only as the named ablation artifact.
100
- - Candidates carry three judgments per passage: `training_positive_mask` (qrels),
101
- `answer_positive_mask` (golden answer string occurs in passage), and
102
- `evidence_group_ids` (multi-hop evidence groups, used by graded relevance).
103
- - All known positives are forced into each depth-1000 list; unjudged documents
104
- are treated as zero gain.
105
-
106
- ### Corpus and index
107
-
108
- - 21,015,324 English Wikipedia passages (100-word passages, 2018 dump).
109
- - Encoded with Qwen3-Embedding-0.6B: last-token pooling, left padding, `pad`
110
- append token, max 512 tokens, float16, L2-normalized, 1024 dimensions,
111
- 64 shards. Built once and frozen; RAG training only updates the query encoder.
112
-
113
- ### Evaluation suite (not used for training)
114
-
115
- 51,713 queries over 7 datasets; in-domain = NQ/HotpotQA, held-out = the other 5:
116
-
117
- | Dataset | Split | Queries |
118
- |---|---|---|
119
- | NQ | test | 3,610 |
120
- | TriviaQA | test | 11,313 |
121
- | PopQA | test | 14,267 |
122
- | HotpotQA | dev | 7,405 |
123
- | 2WikiMultiHopQA | dev | 12,576 |
124
- | MuSiQue | dev | 2,417 |
125
- | Bamboogle | test | 125 |
126
-
127
- ## 使用方式 / Usage
128
-
129
- Download into a checkout of RELER so that paths resolve to `data/rag/...`:
130
-
131
- ```bash
132
- hf download liuqi6777/RELER-RAG-data --repo-type dataset --local-dir data
133
- # => data/rag/corpus, data/rag/qwen3_e0_index, ...
134
- ```
135
-
136
- Then, from the RELER repo root:
137
-
138
- ```bash
139
- # Train (4 GPUs); see configs/rag/*.yaml
140
- scripts/rag_pipeline.sh train configs/rag/rl_mrr.yaml
141
-
142
- # Evaluate a checkpoint on the fixed 7-dataset suite
143
- scripts/rag_pipeline.sh eval --model <checkpoint> --output-dir data/rag/eval/rerun
144
- ```
145
-
146
- To rebuild artifacts from the upstream sources instead of downloading them:
147
-
148
- ```bash
149
- scripts/rag_pipeline.sh prepare # download + verify FlashRAG / wiki18_100w
150
- scripts/rag_pipeline.sh encode # 4-GPU encode -> qwen3_e0_index
151
- scripts/rag_pipeline.sh qrels # build passage qrels
152
- scripts/rag_pipeline.sh candidates # mine top-1000 candidates
153
- ```
154
-
155
- All artifacts are hash-pinned in their `*.manifest.json`. Verification is on by
156
- default in the pipeline; pass `--skip-hash-verification` only if you intentionally
157
- modified an input.
158
-
159
- ## 已知问题 / Known issue
160
-
161
- `rag/question_leakage.json` records **60 normalized-question overlaps** between
162
- the NQ training queries and NQ test queries (upstream duplication). They are
163
- documented rather than removed; filter by `query_id` if you need a strict split.
164
-
165
- ## 许可 / License
166
-
167
- The derived artifacts (qrels, candidate lists, index, evaluation outputs) are
168
- released for research use. **Upstream data retains its original license and
169
- terms**; please follow them when redistributing:
170
-
171
- - FlashRAG datasets: https://huggingface.co/datasets/RUC-NLPIR/FlashRAG_datasets
172
- - Natural Questions: https://ai.google.com/research/NaturalQuestions
173
- - HotpotQA: https://hotpotqa.github.io/
174
- - Wikipedia text: CC BY-SA
175
- - Qwen3-Embedding-0.6B / Qwen2.5-7B-Instruct: Apache-2.0
176
-
177
- If you are a rights holder and believe an artifact should not be redistributed,
178
- please open a discussion on this repository.
 
3
  - en
4
  task_categories:
5
  - text-retrieval
 
6
  tags:
7
  - rag
8
  - retrieval
 
9
  - reler
10
  - flashrag
11
  - qwen3-embedding
 
 
 
 
 
12
  license: other
13
  ---
14
 
15
+ # RELER RAG Data
16
 
17
+ Data for the RELER RAG query-encoder experiments (G3).
 
 
 
18
 
19
+ | Path | Contents |
20
+ |---|---|
21
+ | `rag/corpus/` | `wiki18_100w`: 21,015,324 Wikipedia passages |
22
+ | `rag/qwen3_e0_index/` | Frozen Qwen3-Embedding-0.6B FAISS index (1024-d, fp16, 64 shards) |
23
+ | `rag/flashrag/` | NQ/HotpotQA train queries + 7-dataset eval queries |
24
+ | `rag/raw/` | DPR `biencoder-nq-train.json.gz` (NQ labels) |
25
+ | `rag/candidates/` | Top-1000 candidates for 108,730 training queries |
26
+ | `rag/qrels*/` | Binary passage qrels (NQ: DPR score==1000; HotpotQA: supporting facts) |
27
+ | `rag/eval/` | Evaluation outputs |
28
 
29
+ Upstream sources: `RUC-NLPIR/FlashRAG_datasets` @ `bcafb8dd`, DPR `biencoder-nq-train.json.gz`,
30
+ `Qwen/Qwen3-Embedding-0.6B` @ `97b0c61`. Upstream licenses apply.
31
 
32
+ File sizes are listed in `MANIFEST.tsv`.