Downloads · 30 days
18
6% of all-time downloads
ggallipoli/bart-base_pos2neg
bart-base_pos2neg is a text generation model from ggallipoli. Use it when you need the model to write or continue text. It is set up for transformers.
This repository contains the models from the paper "Self-supervised Text Style Transfer using Cycle-Consistent Adversarial Networks" (ACM TIST 2024).\ The work introduces a novel approach to Text Style Transfer using…
Downloads · 30 days
18
6% of all-time downloads
All-time downloads
324
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.bin558 MB · 99%
From the Hugging Face model README
This repository contains the models from the paper "Self-supervised Text Style Transfer using Cycle-Consistent Adversarial Networks" (ACM TIST 2024).
The work introduces a novel approach to Text Style Transfer using CycleGANs with sequence-level supervision and Transformer architectures.
| model | checkpoint |
|---|---|
| BART base | informal-to-formal, formal-to-informal |
| BART large | informal-to-formal, formal-to-informal |
| T5 small | informal-to-formal, formal-to-informal |
| T5 base | informal-to-formal, formal-to-informal |
| T5 large | informal-to-formal, formal-to-informal |
| BERT base | style classifier |
| model | checkpoint |
|---|---|
| BART base | informal-to-formal, formal-to-informal |
| BART large | informal-to-formal, formal-to-informal |
| T5 small | informal-to-formal, formal-to-informal |
| T5 base | informal-to-formal, formal-to-informal |
| T5 large | informal-to-formal, formal-to-informal |
| BERT base | style classifier |
| model | checkpoint |
|---|---|
| BART base | negative-to-positive, positive-to-negative |
| BART large | negative-to-positive, positive-to-negative |
| T5 small | negative-to-positive, positive-to-negative |
| T5 base | negative-to-positive, positive-to-negative |
| T5 large | negative-to-positive, positive-to-negative |
| BERT base | style classifier |
The models implement a CycleGAN architecture for Text Style Transfer that:
The models achieve state-of-the-art results on both formality and sentiment transfer tasks.
Both generators and style classifiers can be used with the Hugging Face 🤗 transformers library:
Each generator model can be loaded as:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("[GENERATOR_MODEL]")
tokenizer = AutoTokenizer.from_pretrained("[GENERATOR_MODEL]")
The style classifiers can be loaded as:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
classifier = AutoModelForSequenceClassification.from_pretrained("[CLASSIFIER_MODEL]")
tokenizer = AutoTokenizer.from_pretrained("[CLASSIFIER_MODEL]")
For more details, you can refer to the paper.
@article{10.1145/3678179,
author = {La Quatra, Moreno and Gallipoli, Giuseppe and Cagliero, Luca},
title = {Self-supervised Text Style Transfer Using Cycle-Consistent Adversarial Networks},
year = {2024},
issue_date = {October 2024},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {15},
number = {5},
issn = {2157-6904},
url = {https://doi.org/10.1145/3678179},
doi = {10.1145/3678179},
journal = {ACM Trans. Intell. Syst. Technol.},
month = nov,
articleno = {110},
numpages = {38},
keywords = {Text Style Transfer, Sentiment transfer, Formality transfer, Cycle-consistent Generative Adversarial Networks, Transformers}
}
The full implementation is available at: https://github.com/gallipoligiuseppe/TST-CycleGAN.
This work is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.