emnlp22-re3-story-generation  by yangkevin2

Research paper code for long story generation via recursive reprompting

created 2 years ago
254 stars

Top 99.3% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides code for Re3, a system designed for generating long-form stories (2000+ words) using recursive reprompting and revision. It is targeted at researchers in natural language generation and aims to facilitate the creation of coherent, extended narratives.

How It Works

Re3 employs a hierarchical approach, breaking down story generation into planning, drafting, and rewriting stages. It utilizes large language models (like GPT-3 for summarization) and specialized reranker models (Longformer-based) to assess and maintain relevance and coherence across generated segments. The recursive nature allows the system to iteratively refine the story based on these reranker scores, enabling longer and more structured outputs.

Quick Start & Requirements

  • Installation: pip install -e . after installing dependencies.
  • Prerequisites: Python 3.8.13, PyTorch 1.12.1, OpenAI API key, emnlp22_re3_data.zip (downloaded via wget).
  • Demo: See notebooks/re3.ipynb for a guided notebook.

Highlighted Details

  • Supports generating stories over 2000 words.
  • Includes code for reproducing baselines and ablation studies from the paper.
  • Offers configurable parameters for outline length, continuation length, and beam search.
  • Provides scripts for training custom relevance and coherence rerankers.

Maintenance & Community

The project is associated with EMNLP 2022. A newer system is available at https://github.com/yangkevin2/doc-story-generation.

Licensing & Compatibility

The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The README notes that the current version may generate repetitive plans when using multi-level outlines. Some generated stories may contain sensitive or NSFW content as filtering was not implemented. The project is also superseded by a newer system from the same authors.

Health Check
Last commit

2 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.