Downloads · 30 days
4
18% of all-time downloads
AdapterHub/xlm-roberta-base_formality_classify_gyafc_pfeiffer
xlm-roberta-base_formality_classify_gyafc_pfeiffer is a text classification model from AdapterHub. Use it when you need a label for a piece of text. It is set up for adapter-transformers. The card lists the license as apache-2.0.
Note: This adapter was not trained by the AdapterHub team, but by these author(s): Kalpesh Krishna. See author details below.
Downloads · 30 days
4
18% of all-time downloads
All-time downloads
22
Public
Repo size
6 MB
Likes
0
Public
Click a slice to open those files.
.bin6 MB · 100%
From the Hugging Face model README
xlm-roberta-base_formality_classify_gyafc_pfeiffer for xlm-roberta-baseNote: This adapter was not trained by the AdapterHub team, but by these author(s): Kalpesh Krishna. See author details below.
This adapter has been trained on the English formality classification GYAFC dataset and tested with other language adapters (like hindi) for zero-shot transfer. Make sure to remove tokenization, lowercase and remove trailing punctuation for best results.
This adapter was created for usage with the Adapters library.
First, install adapters:
pip install -U adapters
Now, the adapter can be loaded and activated like this:
from adapters import AutoAdapterModel
model = AutoAdapterModel.from_pretrained("xlm-roberta-base")
adapter_name = model.load_adapter("AdapterHub/xlm-roberta-base_formality_classify_gyafc_pfeiffer")
model.set_active_adapters(adapter_name)
@inproceedings{krishna-etal-2020-reformulating,
title = "Reformulating Unsupervised Style Transfer as Paraphrase Generation",
author = "Krishna, Kalpesh and
Wieting, John and
Iyyer, Mohit",
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
month = nov,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2020.emnlp-main.55",
doi = "10.18653/v1/2020.emnlp-main.55",
pages = "737--762",
}
This adapter has been auto-imported from https://github.com/Adapter-Hub/Hub/blob/master/adapters/martiansideofthemoon/xlm-roberta-base_formality_classify_gyafc_pfeiffer.yaml.