di2ox3/prefill-dataset
Prefill Dataset Long-context tokenized corpus for benchmarking LLM prefill computation with Qwen3-8B. Contains ~10M tokens of copyright-free English text pre-tokenized with character offset mappings for fast position lookup. Dataset Structure Files File Description Rows data/documents.parquet English documents with token IDs and char offsets ~100-500 data/tasks.parquet QA, translation, and retrieval tasks ~1K-5K… See the full description on the dataset page: https://huggingface.co/datasets/di2ox3/prefill-dataset.
Prefill Dataset
Long-context tokenized corpus for benchmarking LLM prefill computation with Qwen3-8B. Contains ~10M tokens of copyright-free English text pre-tokenized with character offset mappings for fast position lookup.
Dataset Structure
Files
documents.parquet Schema
tasks.parquet Schema
translations.parquet Schema
aligned_chunks.parquet Schema
Sources
Tokenizer
- Model:
Qwen/Qwen3-8B(vocab size: 151,936) - Offset mapping:
char_offsets[i]is the character position where tokenistarts. BPE tokens with leading spaces point to the space character — this is correct:text[char_offsets[i]:char_offsets[i+1]]recovers exact token text.
Usage
import pyarrow.parquet as pq
# Load
docs = pq.read_table("data/documents.parquet").to_pandas()
tasks = pq.read_table("data/tasks.parquet").to_pandas()
# Get a document and its tasks
doc = docs.iloc[0]
doc_tasks = tasks[tasks.doc_id == doc.doc_id]
print(f"Title: {doc.title}")
print(f"Tokens: {doc.token_count:,}")
print(f"Tasks: {len(doc_tasks)}")
# Verify token-to-text mapping
offsets = doc.char_offsets
text = doc.text
for i in range(5):
end = offsets[i + 1] if i + 1 < len(offsets) else len(text)
print(f" Token {i}: '{text[offsets[i]:end]}'")See generate_examples.py for a full usage example.
Regeneration
uv run build_dataset.pyRequires Python 3.11+. Dependencies are declared inline (PEP 723) — uv run handles them automatically.
License
The dataset is released under Apache 2.0. Source texts are public domain (Project Gutenberg).
