Transformers
PyTorch
English
Chinese
bart
text2text-generation
GENIUS
conditional text generation
sketch-based text generation
data augmentation
Instructions to use beyond/genius-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use beyond/genius-large with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("beyond/genius-large") model = AutoModelForSeq2SeqLM.from_pretrained("beyond/genius-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -75,13 +75,21 @@ inference:
|
|
| 75 |
|
| 76 |
|
| 77 |
|
|
|
|
| 78 |
|
| 79 |
-
|
| 80 |
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
-
## Usage
|
| 84 |
|
|
|
|
| 85 |
#### 1. If you already have a sketch in mind, and want to get a paragraph based on it...
|
| 86 |
```python
|
| 87 |
from transformers import pipeline
|
|
|
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
+
## Usage
|
| 79 |
|
| 80 |
+
### What is a sketch?
|
| 81 |
|
| 82 |
+
First, what is a **sketch**? As defined in our paper, a sketch is "key information consisting of textual spans, phrases, or words, concatenated by mask tokens". It's like a draft or framework when you begin to write an article. With GENIUS model, you can input some key elements you want to mention in your wrinting, then the GENIUS model can generate cohrent text based on your sketch.
|
| 83 |
+
|
| 84 |
+
The sketch which can be composed of:
|
| 85 |
+
|
| 86 |
+
- keywords /key-phrases, like `__NLP__AI__computer__science__`
|
| 87 |
+
- spans, like `Conference on Empirical Methods__submission of research papers__`
|
| 88 |
+
- sentences, like `I really like machine learning__I work at Google since last year__`
|
| 89 |
+
- or a mixup!
|
| 90 |
|
|
|
|
| 91 |
|
| 92 |
+
### How to use the model
|
| 93 |
#### 1. If you already have a sketch in mind, and want to get a paragraph based on it...
|
| 94 |
```python
|
| 95 |
from transformers import pipeline
|