Update README.md
Browse files
README.md
CHANGED
@@ -41,13 +41,9 @@ inference:
|
|
41 |
**How to use:**
|
42 |
```python
|
43 |
from transformers import pipeline
|
44 |
-
# 1. load the model with the huggingface `pipeline`
|
45 |
genius = pipeline("text2text-generation", model='beyond/genius-large', device=0)
|
46 |
-
# 2. provide a sketch (joint by <mask> tokens)
|
47 |
sketch = "<mask> Conference on Empirical Methods <mask> submission of research papers <mask> Deep Learning <mask>"
|
48 |
-
|
49 |
-
generated_text = genius(sketch, num_beams=3, do_sample=True, max_length=200)[0]['generated_text']
|
50 |
-
print(generated_text)
|
51 |
```
|
52 |
|
53 |
💡**GENIUS** is a powerful conditional text generation model using sketches as input, which can fill in the missing contexts for a given **sketch** (key information consisting of textual spans, phrases, or words, concatenated by mask tokens). GENIUS is pre-trained on a large-scale textual corpus with a novel *reconstruction from sketch* objective using an *extreme and selective masking* strategy, enabling it to generate diverse and high-quality texts given sketches.
|
|
|
41 |
**How to use:**
|
42 |
```python
|
43 |
from transformers import pipeline
|
|
|
44 |
genius = pipeline("text2text-generation", model='beyond/genius-large', device=0)
|
|
|
45 |
sketch = "<mask> Conference on Empirical Methods <mask> submission of research papers <mask> Deep Learning <mask>"
|
46 |
+
genius(sketch, num_beams=3, do_sample=True, max_length=200)[0]['generated_text']
|
|
|
|
|
47 |
```
|
48 |
|
49 |
💡**GENIUS** is a powerful conditional text generation model using sketches as input, which can fill in the missing contexts for a given **sketch** (key information consisting of textual spans, phrases, or words, concatenated by mask tokens). GENIUS is pre-trained on a large-scale textual corpus with a novel *reconstruction from sketch* objective using an *extreme and selective masking* strategy, enabling it to generate diverse and high-quality texts given sketches.
|