fable-forge-10k / README.md
BunsDev's picture
Add dataset card
fde515d verified
|
Raw
History Blame Contribute Delete
5.41 kB
---
license: mit
task_categories:
- text-generation
- text2text-generation
language:
- en
tags:
- narrative-reasoning
- character-consistency
- recurrent-depth-transformer
- story-generation
- synthetic
- opencoven
size_categories:
- 10K<n<100K
---
# FableForge — Narrative Reasoning Dataset with Recurrence-Depth Annotations
**The first narrative dataset designed around recurrence depth requirements.**
Every example carries a `suggested_n_loops` field with a theoretically grounded basis —
derived from the structural complexity of the task, not a heuristic label or emergent property.
## Background
Standard narrative datasets treat reasoning depth as an emergent property. FableForge is
different: it annotates *how much computation* each task structurally requires, making it
suitable for training Recurrent-Depth Transformers (RDTs) where loop count is a controllable
hyperparameter at inference time.
## Task Types
### `character_trace`
Track a named character's state (location, emotion, companions) across N scene transitions.
**Recurrence requirement:** `loops = f(n_characters × n_scenes)`
More characters over more scenes → more recurrence needed to maintain entity state without drift.
### `coherence_challenge`
Detect and correct a single planted narrative inconsistency.
**Recurrence requirement:** `loops = f(inconsistency_type)`
Six inconsistency types, ordered by cognitive depth:
| Type | Loops | Why |
|---|---|---|
| `name_drift` | 4 | Surface pattern match |
| `location_contradiction` | 8 | Spatial reasoning |
| `object_continuity` | 8 | Object state tracking |
| `timeline_error` | 16 | Temporal ordering |
| `relationship_error` | 16 | Social graph recall |
| `trait_reversal` | 32 | Character psychology |
### `narrative_completion`
Generate a story continuation that satisfies N explicit constraints simultaneously.
**Recurrence requirement:** `loops = f(n_characters × n_constraints)`
## Dataset Fields
| Field | Type | Description |
|---|---|---|
| `id` | string | Unique stable identifier |
| `task_type` | string | `character_trace` / `coherence_challenge` / `narrative_completion` |
| `genre` | string | `fantasy` or `contemporary` |
| `complexity_score` | float | 0–1, derived from task structure |
| `suggested_n_loops` | int | 4 / 8 / 16 / 32 — recurrence target |
| `narrative_mode` | string | `action` / `dialogue` / `exposition` |
| `fable_memory_required` | bool | Whether FableMemory injection is needed |
| `coherence_probe_targets` | list[str] | Character names to monitor |
| `messages` | list | `[{"role": "user", "content": ...}, {"role": "assistant", "content": ...}]` |
| `source` | string | `fable_forge_v1` |
| `constraint_count` | int | Number of simultaneous constraints |
| `n_characters` | int | Characters in the task |
| `n_scenes` | int | Scenes spanned |
## Distribution (10k sample)
- ~40% character_trace, ~30% coherence_challenge, ~30% narrative_completion
- ~83% require FableMemory injection
- Loop distribution: ~12% dialogue (8), ~37% exposition (16), ~51% deep (32)
- Genres: ~50% fantasy, ~50% contemporary
- Fully deterministic: `seed=42`
## Usage
```python
from datasets import load_dataset
ds = load_dataset("OpenCoven/fable-forge-10k", split="train")
print(ds[0].keys())
# dict_keys(['id', 'task_type', 'genre', 'complexity_score', 'suggested_n_loops',
# 'narrative_mode', 'fable_memory_required', 'coherence_probe_targets',
# 'messages', 'source', 'constraint_count', 'n_characters', 'n_scenes'])
# Filter by depth tier
hard = ds.filter(lambda x: x["suggested_n_loops"] == 32)
print(f"{len(hard):,} examples require maximum recurrence depth")
# Use with OpenFable NarrativeDepthController
from open_fable.depth import NarrativeDepthController
ndc = NarrativeDepthController()
for ex in ds.select(range(5)):
loops = ndc.get_n_loops(ex["narrative_mode"])
print(f"{ex['task_type']:25s} suggested={ex['suggested_n_loops']:2d} ndc={loops}")
```
## Generating More Data
FableForge is deterministic and open-source. Generate at any scale:
```bash
git clone https://github.com/OpenCoven/open-fable
cd open-fable
pip install -e .
python -m open_fable.data.fable_forge --count 100000 --seed 99 --output data/fable_forge_100k.jsonl
```
## Two-Stage Training Pipeline
This dataset is Stage 2 of OpenFable's training pipeline:
- **Stage 1:** [WithinUsAI/claude_mythos_distilled_25k](https://huggingface.co/datasets/WithinUsAI/claude_mythos_distilled_25k) bridged via MythosBridge — general deep reasoning
- **Stage 2:** FableForge — narrative-specific reasoning with loop-depth annotations
## Citation
```bibtex
@misc{openfable2026fableforge,
title = {{FableForge}: A Synthetic Narrative Dataset with Recurrence-Depth Annotations},
author = {OpenCoven},
year = {2026},
url = {https://github.com/OpenCoven/open-fable},
note = {First dataset designed around recurrence depth requirements for
narrative reasoning in Recurrent-Depth Transformer architectures.}
}
```
## License
MIT — see [LICENSE](https://github.com/OpenCoven/open-fable/blob/main/LICENSE)
## Links
- GitHub: [OpenCoven/open-fable](https://github.com/OpenCoven/open-fable)
- Architecture: [OpenFable README](https://github.com/OpenCoven/open-fable#readme)
- Dataset card: [datasets/README.md](https://github.com/OpenCoven/open-fable/blob/main/datasets/README.md)