JJBauer commited on
Commit
c3447bd
·
verified ·
1 Parent(s): 657504b

Publish LitBench reference splits with provenance and attribution

Browse files
CITATION.bib ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ @misc{fein2025litbenchbenchmarkdatasetreliable,
2
+ title={LitBench: A Benchmark and Dataset for Reliable Evaluation of Creative Writing},
3
+ author={Daniel Fein and Sebastian Russo and Violet Xiang and Kabir Jolly and Rafael Rafailov and Nick Haber},
4
+ year={2025},
5
+ eprint={2507.00769},
6
+ archivePrefix={arXiv},
7
+ primaryClass={cs.CL},
8
+ url={https://arxiv.org/abs/2507.00769}
9
+ }
README.md ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - derived
4
+ language_creators:
5
+ - crowdsourced
6
+ language:
7
+ - en
8
+ size_categories:
9
+ - 10K<n<100K
10
+ source_datasets:
11
+ - SAA-Lab/LitBench-Train
12
+ task_categories:
13
+ - text-generation
14
+ pretty_name: LitBench Reference Splits (unofficial adaptation)
15
+ tags:
16
+ - litbench
17
+ - creative-writing
18
+ - preference-data
19
+ - rlhf
20
+ - reference-based-evaluation
21
+ configs:
22
+ - config_name: default
23
+ data_files:
24
+ - split: train
25
+ path: data/train-*.parquet
26
+ - split: test
27
+ path: data/test-*.parquet
28
+ dataset_info:
29
+ features:
30
+ - name: dataset
31
+ dtype: string
32
+ - name: prompt_id
33
+ dtype: string
34
+ - name: pair_id
35
+ dtype: string
36
+ - name: prompt
37
+ dtype: string
38
+ - name: preferred
39
+ dtype: string
40
+ - name: rejected
41
+ dtype: string
42
+ - name: reference
43
+ dtype: string
44
+ - name: reference_id
45
+ dtype: string
46
+ - name: preferred_id
47
+ dtype: string
48
+ - name: rejected_id
49
+ dtype: string
50
+ - name: metadata
51
+ struct:
52
+ - name: source_row
53
+ dtype: int64
54
+ - name: preferred_upvotes
55
+ dtype: int64
56
+ - name: rejected_upvotes
57
+ dtype: int64
58
+ - name: reference_upvotes
59
+ dtype: int64
60
+ - name: stories_for_prompt
61
+ dtype: int64
62
+ - name: reference_rule
63
+ dtype: string
64
+ - name: reference_observed_upvotes
65
+ list: int64
66
+ - name: split
67
+ dtype: string
68
+ splits:
69
+ - name: train
70
+ num_examples: 9935
71
+ num_bytes: 36785948
72
+ - name: test
73
+ num_examples: 7774
74
+ num_bytes: 76980970
75
+ dataset_size: 113766918
76
+ download_size: 67764968
77
+ ---
78
+
79
+ # LitBench Reference Splits — an adaptation of LitBench
80
+
81
+ This is an **unofficial adaptation of
82
+ [SAA-Lab/LitBench-Train](https://huggingface.co/datasets/SAA-Lab/LitBench-Train)**
83
+ for reinforcement learning with reference-dependent rewards and offline reward
84
+ evaluation. It is maintained by Jakob Johannes Bauer as part of
85
+ [non-verifiable-rewards](https://github.com/JakobJBauer/non-verifiable-rewards).
86
+ It is not affiliated with or endorsed by the LitBench authors, and its `test`
87
+ split is **not the official LitBench-Test benchmark**.
88
+
89
+ **LitBench already supplies chosen/rejected preferences inferred from Reddit
90
+ upvotes. We preserve those labels.** Our contributions are a reproducible
91
+ partition by prompt, a training view with one reference story per prompt, and a
92
+ separate third-story reference for each eligible evaluation pair. We collected
93
+ no new human annotations, inferred no new preference labels, and generated no
94
+ stories using language models.
95
+
96
+ Please cite **Fein et al. (2025), LitBench**, when using this adaptation; see
97
+ [Citation and attribution](#citation-and-attribution) below.
98
+
99
+ ## Sources and version
100
+
101
+ - Source: [LitBench-Train](https://huggingface.co/datasets/SAA-Lab/LitBench-Train),
102
+ revision `079a36dd2d56185f76cf466a08a05dda146795dd`, native `train` split.
103
+ - Paper: [LitBench: A Benchmark and Dataset for Reliable Evaluation of Creative
104
+ Writing](https://arxiv.org/abs/2507.00769).
105
+ - Authors' code: [drfein/LitBench](https://github.com/drfein/LitBench).
106
+ - Earlier source: [euclaise/WritingPrompts_preferences](https://huggingface.co/datasets/euclaise/WritingPrompts_preferences),
107
+ stories written by Reddit users on r/WritingPrompts.
108
+ - Adaptation code commit: `3e44d5b1b600402e711673290ab19d31fcab06ef`. The exact committed source and
109
+ dependency lock are bundled in [source.tar.gz](source.tar.gz).
110
+ - [provenance.json](provenance.json) records source revision, filtering counts,
111
+ split policy, package versions, and SHA-256 checksums of the release files.
112
+
113
+ ## Splits
114
+
115
+ | Split | Rows | Distinct prompts | Contents |
116
+ | --- | ---: | ---: | --- |
117
+ | `train` | 9,935 | 9,935 | One prompt and reference story for policy training |
118
+ | `test` | 7,774 | 1,304 | Preferred/rejected stories and a distinct third-story reference |
119
+
120
+ The upstream corpus has 43,827 pairs over 12,419 prompts. We reserve **2,484
121
+ prompts** for test before reference construction. Of these, 1,304 have enough
122
+ distinct stories for our evaluation schema. The remaining 1,180 stay reserved
123
+ and are **not moved back into training**. There is no separate validation split;
124
+ reserve development prompts from `train` if needed. The public rows are the
125
+ complete eligible cohorts, not the project's smaller sampled benchmarks.
126
+
127
+ Train and test share a Parquet schema for compatibility with `datasets` and the
128
+ Hub viewer. Training candidate fields (`preferred`, `rejected`, `pair_id`,
129
+ `preferred_id`, `rejected_id`) and pair-only metadata are **null**, not empty
130
+ strings or fabricated labels. Training references come from a preference corpus;
131
+ this is not an independently collected unlabelled story corpus.
132
+
133
+ ## Construction
134
+
135
+ 1. Load the pinned upstream training release. Strip outer whitespace from
136
+ prompts and story texts; discard empty prompts. Group all rows with the same
137
+ stripped prompt together, including whitespace aliases.
138
+ 2. Sort the prompt groups, shuffle with Python `random.Random(1729)`, and reserve
139
+ the first `ceil(0.2 * 12,419) = 2,484` groups for test. The other 9,935 groups
140
+ form training. Assignment is independent of the input row order. All stories
141
+ and reference candidates for a prompt remain in its assigned partition.
142
+ 3. **Train:** gather distinct nonempty stories from both sides of every pair for
143
+ each training prompt. Choose the story with the highest maximum observed
144
+ upvote count. Break ties by a stable SHA-256 content hash. Emit one
145
+ prompt/reference row, preserving the selected source-row index. A prompt with
146
+ only two stories is still usable for training.
147
+ 4. **Test:** require at least three distinct nonempty stories for the prompt and
148
+ a strict upstream preference (`chosen_upvotes > rejected_upvotes`). Keep the
149
+ source orientation: `chosen_story` becomes `preferred`. Among stories outside
150
+ that pair, choose the highest maximum-observed-upvote story as the reference,
151
+ with the same hash tie-break. Never use either candidate as its own reference.
152
+ 5. Reject blank texts, identical candidates, reference/candidate equality, and
153
+ duplicate oriented pairs. Retain vote counts and original source-row indices
154
+ in metadata. Both candidates in a pair use the same reference.
155
+
156
+ The 2,484 test prompt groups contain 8,954 upstream rows. Requiring a third story
157
+ excludes 1,180 rows in this release, leaving 7,774 eligible pairs. Partitioning
158
+ happens **before** reference construction, so reference selection does not pool
159
+ training and test stories.
160
+
161
+ Hashing uses the project's `_hashing.digest`: SHA-256 of UTF-8
162
+ `json.dumps(value, sort_keys=True, ensure_ascii=False)`. Prompt IDs hash
163
+ `["litbench", stripped_prompt]` and keep the first 24 hexadecimal characters;
164
+ reference IDs similarly hash `[prompt_id, stripped_reference]`. The full code
165
+ is included so these details need not be reimplemented from prose.
166
+
167
+ ## Loading and use
168
+
169
+ ```python
170
+ from datasets import load_dataset
171
+
172
+ data = load_dataset("JJBauer/LitBench-Reference-Splits")
173
+ train = data["train"]
174
+ test = data["test"]
175
+
176
+ # Policy input: the prompt only. Keep the reference on the reward side.
177
+ prompt = train[0]["prompt"]
178
+ reference = train[0]["reference"]
179
+
180
+ # Offline reward comparison: score both candidates against the same reference.
181
+ pair = test[0]
182
+ preferred, rejected, reference = (
183
+ pair["preferred"], pair["rejected"], pair["reference"]
184
+ )
185
+ ```
186
+
187
+ Pass `revision=` to `load_dataset` to pin this adaptation to a Hub commit.
188
+ For policy generation, wrap the writing prompt in the model's normal chat or
189
+ instruction template. **Do not show the reference or preference labels to the
190
+ generating policy.** The original project loader omits training candidate fields;
191
+ the published schema fills those fields with nulls to support a single Hub config.
192
+
193
+ | Field | Meaning |
194
+ | --- | --- |
195
+ | `dataset` | `litbench`, preserving the project task identifier |
196
+ | `prompt_id`, `prompt` | Stable prompt-group ID and writing prompt |
197
+ | `reference_id`, `reference` | Reference ID and human-written proxy story |
198
+ | `pair_id` | Stable oriented pair ID; null for train |
199
+ | `preferred`, `rejected` | Upstream higher/lower-upvote story; null for train |
200
+ | `preferred_id`, `rejected_id` | Candidate content IDs; null for train |
201
+ | `metadata.source_row` | Zero-based row in the pinned original training release |
202
+ | `metadata.split` | This adaptation's `train` or `test`, not the upstream split |
203
+ | `metadata.reference_rule` | Reference selection rule |
204
+ | `metadata.preferred_upvotes`, `metadata.rejected_upvotes` | Votes recorded on the source pair; null for train |
205
+ | `metadata.reference_upvotes` | Maximum observed votes for the reference story; null for train |
206
+ | `metadata.reference_observed_upvotes` | Observed reference vote counts; null for train |
207
+ | `metadata.stories_for_prompt` | Number of distinct nonempty stories; null for train |
208
+
209
+ ## Limitations
210
+
211
+ - Reddit upvotes are an **implicit preference proxy**, not controlled head-to-head
212
+ annotations or independent judgments collected for this adaptation. They can
213
+ reflect exposure, timing, community taste, and demographic biases.
214
+ - A third story is not a canonical gold answer. It can be less popular than both
215
+ candidates, and resemblance to it does not establish creative-writing quality.
216
+ A reference may appear as a candidate in another test pair. Different pairs
217
+ for the same prompt can use different references.
218
+ - Exact prompt groups do not cross train/test. This does not detect paraphrased
219
+ prompts, stories copied under different prompts, or model pretraining exposure.
220
+ Repeated test prompts/pairs are not independent observations; group uncertainty
221
+ estimates by prompt. The eligibility filter and different train/test reference
222
+ rules change the cohorts relative to the original LitBench benchmark.
223
+ - The official [LitBench-Test](https://huggingface.co/datasets/SAA-Lab/LitBench-Test)
224
+ release provides Reddit comment IDs and requires rehydration. We did not load
225
+ or rehydrate it. Results here must be reported as results on this adaptation.
226
+ - The source contains user-generated creative writing and may include offensive,
227
+ sensitive, or adult content. We apply no additional content moderation.
228
+ - These splits support future RL training, but earlier exploratory reward analyses
229
+ in the source project sampled from the full LitBench-Train corpus. They are not
230
+ a previously unseen blind benchmark for that project. Evaluate generated model
231
+ outputs with quality measures independent of the optimized reward.
232
+
233
+ ## Licensing and removal requests
234
+
235
+ The pinned LitBench-Train card does not declare a dataset license. Appendix B of
236
+ the [LitBench paper](https://arxiv.org/html/2507.00769v1#A2) says its training
237
+ content comes from `euclaise/WritingPrompts_preferences`, whose card declares
238
+ **MIT**. We preserve that provenance rather than assign a new license to the
239
+ stories or imply that the entire LitBench release has an explicit license grant.
240
+ The original Reddit authors retain rights in their writing; we claim no ownership
241
+ of their stories. Consult the upstream sources for their terms.
242
+
243
+ The upstream card asks authors to contact its maintainers for removal. Authors
244
+ can also request removal from this adaptation through its Hugging Face Community
245
+ tab, identifying the affected row/story. An upstream deletion is not automatically
246
+ propagated into this pinned snapshot; this copy must be updated separately.
247
+
248
+ ## Reproduction
249
+
250
+ Download and unpack `source.tar.gz`, install the project with `uv sync`, then run:
251
+
252
+ ```bash
253
+ uv run python scripts/publish_litbench.py export \
254
+ --output outputs/litbench-reference-splits \
255
+ --repo-id JJBauer/LitBench-Reference-Splits
256
+ ```
257
+
258
+ The exporter loads the pinned source revision and calls the same loader used by
259
+ the project. It checks expected cohort sizes, prompt separation, independent
260
+ references, and a local Parquet round trip. File checksums and logical row hashes
261
+ are recorded; binary Parquet bytes can vary with library versions. Publishing is
262
+ a separate command and uses the normal Hugging Face login, without embedding
263
+ credentials in any release file.
264
+
265
+ ## Citation and attribution
266
+
267
+ **Please cite the original LitBench paper and link to its dataset when using this
268
+ adaptation.** Credit the Reddit story authors and the earlier WritingPrompts
269
+ Preferences dataset. Also identify this adaptation by its URL and Hub revision
270
+ so readers can reproduce the partition and reference construction. This adaptation
271
+ is not a replacement citation for LitBench.
272
+
273
+ ```bibtex
274
+ @misc{fein2025litbenchbenchmarkdatasetreliable,
275
+ title={LitBench: A Benchmark and Dataset for Reliable Evaluation of Creative Writing},
276
+ author={Daniel Fein and Sebastian Russo and Violet Xiang and Kabir Jolly and Rafael Rafailov and Nick Haber},
277
+ year={2025},
278
+ eprint={2507.00769},
279
+ archivePrefix={arXiv},
280
+ primaryClass={cs.CL},
281
+ url={https://arxiv.org/abs/2507.00769}
282
+ }
283
+ ```
284
+
285
+ The citation is also available as [CITATION.bib](CITATION.bib).
data/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50de91de081fc1ca59738d8a47263cd34bb22452f7257cc465dc744f2840bda2
3
+ size 45165801
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2edfa72dedc2e70ca970c074f118f662cba15b2d3574d13a1322fb010a88896
3
+ size 22599167
provenance.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "format_version": 1,
3
+ "repository": "JJBauer/LitBench-Reference-Splits",
4
+ "upstream": {
5
+ "dataset": "SAA-Lab/LitBench-Train",
6
+ "revision": "079a36dd2d56185f76cf466a08a05dda146795dd",
7
+ "split": "train"
8
+ },
9
+ "code_revision": "3e44d5b1b600402e711673290ab19d31fcab06ef",
10
+ "splits": {
11
+ "train": {
12
+ "rows": 9935,
13
+ "prompts": 9935,
14
+ "logical_sha256": "19ac75ff863800e73e957f1aa2eb2efa84dad3cb842051e083b7a05c78776e48",
15
+ "audit": {
16
+ "source_rows": 34873,
17
+ "eligible_prompts": 9935
18
+ },
19
+ "split_policy": {
20
+ "name": "litbench_train_prompt_holdout_v1",
21
+ "official_test": false,
22
+ "test_size": 0.2,
23
+ "seed": 1729,
24
+ "source_prompts": 12419,
25
+ "partition_prompts": 9935
26
+ }
27
+ },
28
+ "test": {
29
+ "rows": 7774,
30
+ "prompts": 1304,
31
+ "logical_sha256": "6d5b12ef69eb53a8ca311e9fba1334de4d3430c4a4f19a850bbd977f06c7cf9a",
32
+ "audit": {
33
+ "source_prompts": 2484,
34
+ "prompts_with_at_least_three_stories": 1304,
35
+ "stories_with_multiple_observed_vote_counts": 0,
36
+ "source_rows": 8954,
37
+ "rows_with_at_least_three_stories": 7774,
38
+ "excluded_fewer_than_three_stories": 1180,
39
+ "eligible_pairs": 7774,
40
+ "eligible_prompts": 1304
41
+ },
42
+ "split_policy": {
43
+ "name": "litbench_train_prompt_holdout_v1",
44
+ "official_test": false,
45
+ "test_size": 0.2,
46
+ "seed": 1729,
47
+ "source_prompts": 12419,
48
+ "partition_prompts": 2484
49
+ }
50
+ }
51
+ },
52
+ "versions": {
53
+ "datasets": "5.2.0",
54
+ "pyarrow": "26.0.1",
55
+ "huggingface-hub": "2.4.0"
56
+ },
57
+ "files": {
58
+ "CITATION.bib": "307de550d059b2d8dbeb8b3ab7ac9108710acba7ed43b698395938538ce0f4c6",
59
+ "README.md": "b47e2685c6df37f77538d312760e695c539b0a55a8e6218e38da402bfa40d401",
60
+ "data/test-00000-of-00001.parquet": "50de91de081fc1ca59738d8a47263cd34bb22452f7257cc465dc744f2840bda2",
61
+ "data/train-00000-of-00001.parquet": "e2edfa72dedc2e70ca970c074f118f662cba15b2d3574d13a1322fb010a88896",
62
+ "source.tar.gz": "5be0bf7f877a94826e5616afcc6a7c00cda8ec93e7cd7a640263d063d4123fd3"
63
+ }
64
+ }
source.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5be0bf7f877a94826e5616afcc6a7c00cda8ec93e7cd7a640263d063d4123fd3
3
+ size 292618