Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- IteraTeR_full_sent
|
4 |
+
---
|
5 |
+
|
6 |
+
# IteraTeR PEGASUS model
|
7 |
+
This model was obtained by fine-tuning [google/pegasus-large](https://huggingface.co/google/pegasus-large) on [IteraTeR-full-sent](https://huggingface.co/datasets/wanyu/IteraTeR_full_sent) dataset.
|
8 |
+
|
9 |
+
Paper: [Understanding Iterative Revision from Human-Written Text](https://arxiv.org/abs/2203.03802) <br>
|
10 |
+
Authors: Wanyu Du, Vipul Raheja, Dhruv Kumar, Zae Myung Kim, Melissa Lopez, Dongyeop Kang
|
11 |
+
|
12 |
+
## Usage
|
13 |
+
```python
|
14 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
15 |
+
|
16 |
+
tokenizer = AutoTokenizer.from_pretrained("wanyu/IteraTeR-PEGASUS")
|
17 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("wanyu/IteraTeR-PEGASUS")
|
18 |
+
before_input = '<fluency> I likes coffee.'
|
19 |
+
model_input = tokenizer(before_input, return_tensors='pt')
|
20 |
+
model_outputs = model.generate(**model_input, num_beams=8, max_length=1024)
|
21 |
+
after_text = tokenizer.batch_decode(model_outputs, skip_special_tokens=True)[0]
|
22 |
+
```
|