nnilayy's picture
Rename bucket configs to width-4 zero-padded names (008k/016k/032k/064k/128k) so HF's lexicographic sort matches numeric order
d1d0e12 verified
|
Raw
History Blame Contribute Delete
6.53 kB
---
pretty_name: "PG-19 Stability Evaluation Prompts"
license: apache-2.0
language:
- en
size_categories:
- n<1K
task_categories:
- text-generation
- summarization
task_ids:
- language-modeling
multilinguality:
- monolingual
annotations_creators:
- machine-generated
language_creators:
- found
source_datasets:
- extended|emozilla/pg19
tags:
- long-context
- benchmark
- stability
- llm-inference
- vllm
- pg19
- chat
- instruction-following
- prompt-dataset
- rope-scaling
configs:
- config_name: "008k"
data_files: "008k/train.jsonl"
- config_name: "016k"
data_files: "016k/train.jsonl"
- config_name: "032k"
data_files: "032k/train.jsonl"
- config_name: "064k"
data_files: "064k/train.jsonl"
- config_name: "128k"
data_files: "128k/train.jsonl"
default_config_name: "008k"
---
# PG-19 Stability Evaluation Prompts
Long-context prompts in chat-message format at five bucket sizes (8K, 16K, 32K, 64K, 128K user-message tokens), designed for **output-stability evaluation** of LLMs under stress: as context grows (and RoPE scaling extends the effective window), do generations stay coherent — or do they degrade into mojibake, token soup, phrase loops, or script drift?
Each prompt is a 2-turn conversation (`system` + `user`) ready to send to any OpenAI-compatible `/v1/chat/completions` endpoint. The system message asks the model for **a 500-word summary plus a brief outlook**, producing ~600–800 generated tokens — enough output for mechanical degradation detectors (token soup, token flood, phrase loop, stuck token, script drift) to operate on.
Compared to [`nnilayy/pg19-concurrency-bench`](https://huggingface.co/datasets/nnilayy/pg19-concurrency-bench), which targets **throughput** measurement (5-word summaries, tightly bounded output, 256 prompts per bucket), this dataset targets **output-quality** at long context — longer generations, hand-picked novels long enough to fill 128K tokens, narrower prompt count.
## Quick preview
```
system : You are a helpful assistant. You will be given a passage from a
book. Read it carefully, then summarize it in exactly 500 words
and give a brief outlook on it.
user : Context:
[N tokens of cleaned PG-19 prose — N varies per config]
Question: Summarize the above passage in exactly 500 words and
give a brief outlook on it.
```
## What the dataset viewer renders
| Tab | What you see |
| --- | --- |
| Config dropdown (top) | Switch between `008k / 016k / 032k / 064k / 128k` (default `008k`) |
| Rows table | Per-prompt rows — the `messages` column auto-renders as chat bubbles |
| Statistics (per column) | Histograms over `tokens` and `chars`; length stats over text fields |
| SQL Console | Query in browser via DuckDB, e.g. `SELECT title, tokens FROM train ORDER BY tokens DESC` |
## Source
Sourced from [emozilla/pg19](https://huggingface.co/datasets/emozilla/pg19) — a Parquet mirror of [DeepMind's PG-19](https://huggingface.co/datasets/deepmind/pg19), containing books from Project Gutenberg published before 1919.
## Construction
**Ten long English-prose novels** (published 1880–1915, all > 850K chars raw, mixed UK/US authors), hand-picked for variety and to ensure every book is long enough to fill a 128K-token bucket with margin:
| gid | title |
| --- | --- |
| 2145 | Ben-Hur: A Tale of the Christ by Lew Wallace |
| 21249 | Clayhanger by Arnold Bennett |
| 217 | Sons and Lovers by D. H. Lawrence |
| 35338 | Marriage by H. G. Wells |
| 31824 | The Genius by Theodore Dreiser |
| 10038 | The Magnetic North by Elizabeth Robins |
| 31858 | Ancestors by Gertrude Atherton |
| 10064 | Beltane The Smith by Jeffery Farnol |
| 31620 | Vashti by Augusta J. Evans Wilson |
| 27618 | The End of a Coil by Susan Warner |
Boilerplate cleaned by skipping front matter (table of contents, dedication, transcriber notes) to the first `CHAPTER` / `PROLOGUE` / `BOOK ONE` / `PART ONE` marker, so every passage starts in narrative prose, not on a title page.
Tokenized with `tiktoken` `o200k_base` (GPT-4o tokenizer).
For each bucket, a passage of (target_tokens − prefix − suffix) tokens is decoded back to text and wrapped as:
```
Context:
{passage}
Question: Summarize the above passage in exactly 500 words and give a brief outlook on it.
```
That user message is paired with a fixed system prompt to form a 2-message conversation.
The same 10 stories appear in every bucket, sliced to different lengths — clean apples-to-apples comparison across context sizes (only the prompt length varies between buckets).
## Schema
Each JSONL record:
```json
{
"id": "pg19_000",
"title": "Ben-Hur: A Tale of the Christ by Lew Wallace",
"source_url": "http://www.gutenberg.org/ebooks/2145",
"tokens": 8192,
"chars": 30924,
"messages": [
{"role": "system", "content": "..."},
{"role": "user", "content": "Context:\n\n[passage]\n\nQuestion: ..."}
]
}
```
`tokens` counts the user message only (system message + chat-template wrappers are fixed overhead per model and don't vary across buckets).
## Configs
| Config | Target tokens | # prompts |
| --- | --- | --- |
| `008k` | 8,192 | 10 |
| `016k` | 16,384 | 10 |
| `032k` | 32,768 | 10 |
| `064k` | 65,536 | 10 |
| `128k` | 131,072 | 10 |
## Usage
```python
from datasets import load_dataset
from openai import OpenAI
ds = load_dataset("nnilayy/pg19-stability-bench", "032k", split="train")
client = OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
resp = client.chat.completions.create(
model="your-model",
messages=ds[0]["messages"],
max_tokens=1024,
temperature=0.0,
)
print(resp.choices[0].message.content)
```
## Intended use
Designed for **output-stability evaluation** at long context, not for general accuracy benchmarking. The "500-word summary + brief outlook" task is a forcing function that produces substantial generation (~600–800 tokens) so mechanical degradation detectors — token soup (mojibake / non-ASCII), token flood (single-char repetition), phrase loop (multi-token n-gram repetition), stuck token (function-word collapse / low lexical diversity), and script drift (writing-system switch) — have enough output to operate on.
Pairs naturally with RoPE-extended models (e.g. Qwen with YARN) where the 128K bucket exercises the extrapolated context window beyond the model's native train-time length.
## License
Apache 2.0 (matching the upstream PG-19 license).