Skip to content

Code for "ParaGuide: Guided Diffusion Paraphrasers for Plug-and-Play Textual Style Transfer"

Notifications You must be signed in to change notification settings

WeiHao97/ParaGuide

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParaGuide

🔌 🤖 Guided Diffusion Paraphrasers for Plug-and-Play Textual Style Transfer 🤖 🔌

Our paper is available here.

Structure

  • demo/ contains demo code, demonstrating how to run the full ParaGuide approach to transform texts from formal → informal.

  • training/ contains the logic for training a paraphrase-conditioned text diffusion model.

  • inference/ contains our code for generating inferences with ParaGuide (once you have preprocessed/paraphrased your data)

  • data/ contains the logic for generating reddit and enron (paraphrase, original text) data.

  • baselines/ contains our implementations of each baseline.

  • evaluations contains our automatic evaluation automatic and human eval data and code.

Getting Started

Installation

In your python environment (>=3.8), you can install dependencies via the requirements file:

pip install -r requirements.txt

Models and Data Artifacts

Our models and data are available for download here.

We also provided corresponding scripts:

Demo

We recommend first checking out demo/generate_examples.py, which demonstrates ParaGuide inference logic!

About

Code for "ParaGuide: Guided Diffusion Paraphrasers for Plug-and-Play Textual Style Transfer"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.0%
  • Shell 12.9%
  • TeX 1.1%