Update README.md
Browse files
README.md
CHANGED
@@ -2,21 +2,22 @@ data: https://github.com/BigSalmon2/InformalToFormalDataset
|
|
2 |
|
3 |
Text Generation Informal Formal
|
4 |
|
|
|
|
|
5 |
```
|
6 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
7 |
|
8 |
tokenizer = AutoTokenizer.from_pretrained("BigSalmon/InformalToFormalLincoln82Paraphrase")
|
9 |
-
|
10 |
model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln82Paraphrase")
|
11 |
```
|
12 |
|
13 |
```
|
14 |
Demo:
|
15 |
-
https://huggingface.co/spaces/BigSalmon/
|
16 |
```
|
17 |
|
18 |
```
|
19 |
-
prompt = """
|
20 |
input_ids = tokenizer.encode(prompt, return_tensors='pt')
|
21 |
outputs = model.generate(input_ids=input_ids,
|
22 |
max_length=10 + len(prompt),
|
|
|
2 |
|
3 |
Text Generation Informal Formal
|
4 |
|
5 |
+
Trained on this model: https://huggingface.co/CarperAI/FIM-NeoX-1.3B, which is geared toward filling in the blank.
|
6 |
+
|
7 |
```
|
8 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
9 |
|
10 |
tokenizer = AutoTokenizer.from_pretrained("BigSalmon/InformalToFormalLincoln82Paraphrase")
|
|
|
11 |
model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln82Paraphrase")
|
12 |
```
|
13 |
|
14 |
```
|
15 |
Demo:
|
16 |
+
https://huggingface.co/spaces/BigSalmon/GPT2Mask
|
17 |
```
|
18 |
|
19 |
```
|
20 |
+
prompt = """<|SUF|> into relaxation <|PRE|> music before bedtime <|MID|>"""
|
21 |
input_ids = tokenizer.encode(prompt, return_tensors='pt')
|
22 |
outputs = model.generate(input_ids=input_ids,
|
23 |
max_length=10 + len(prompt),
|