--- datasets: - IteraTeR_full_sent --- # IteraTeR RoBERTa model This model was obtained by fine-tuning [roberta-large](https://huggingface.co/roberta-large) on [IteraTeR-human-sent](https://huggingface.co/datasets/wanyu/IteraTeR_human_sent) dataset. Paper: [Understanding Iterative Revision from Human-Written Text](https://arxiv.org/abs/2203.03802)
Authors: Wanyu Du, Vipul Raheja, Dhruv Kumar, Zae Myung Kim, Melissa Lopez, Dongyeop Kang ## Usage ```python import torch from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("wanyu/IteraTeR-ROBERTA") model = AutoModelForSequenceClassification.from_pretrained("wanyu/IteraTeR-ROBERTA") id2label = {0: "clarity", 1: "fluency", 2: "coherence", 3: "style", 4: "meaning-changed"} before_text = 'I likes coffee.' after_text = 'I like coffee.' model_input = tokenizer(before_text, after_text, return_tensors='pt') model_output = model(**model_input) softmax_scores = torch.softmax(model_output.logits, dim=-1) pred_id = torch.argmax(softmax_scores) pred_label = id2label[pred_id.int()] ```