This project explores the application of style transfer techniques in natural language processing. The goal is to transform the style of a given text while preserving its content. This can be useful in various applications such as text generation, sentiment transfer, and more.
This codebase uses uv
, which can be installed on POSIX systems with,
curl -LsSf https://astral.sh/uv/install.sh | sh
(See uv for more details.)
Install dependencies with,
uv sync
uv pip install -e .
- Generate formal/informal text dataset
- Linear-probe evaluation of where a simple model is learning style (linear decoding of hidden layers to predict style class)
- Manipulate architecture to include a style latent
- Freeze the entire model except for the style latent when fine-tuning, and train the style latent to predict the style class
- Demonstrate that manipulating the style latent can change the style of the text generated
- Evaluate the performance of the style transfer model with formality classification models
- ...and human evaluation?