beyond/genius-large

Model

GENIUS: generating text using sketches!

19

60 commits

1 linked in READMEs

updated Jan 9, 2023

See the code

README

GENIUS: generating text using sketches!

You can use this model directly with a pipeline for masked language modeling:

from transformers import pipeline
# 1. load the model with the huggingface `pipeline`
genius = pipeline("text2text-generation", model='beyond/genius-large', device=0)
# 2. provide a sketch (joint by <mask> tokens)
sketch = "<mask> Conference on Empirical Methods <mask> submission of research papers <mask> Deep Learning <mask>"
# 3. here we go!
generated_text = genius(sketch, num_beams=3, do_sample=True, max_length=200)[0]['generated_text']
print(generated_text)

If you find our paper/code/demo useful, please cite our paper:

@article{guo2022genius,
  title={GENIUS: Sketch-based Language Model Pre-training via Extreme and Selective Masking for Text Generation and Augmentation},
  author={Guo, Biyang and Gong, Yeyun and Shen, Yelong and Han, Songqiao and Huang, Hailiang and Duan, Nan and Chen, Weizhu},
  journal={arXiv preprint arXiv:2211.10330},
  year={2022}
}
bart
conditional text generation
data augmentation
endpoints_compatible
GENIUS
pytorch
sketch-based text generation
text2text-generation
transformers

beyond/genius-large

Model

GENIUS: generating text using sketches!

19

60 commits

1 linked in READMEs

updated Jan 9, 2023

See the code

README

GENIUS: generating text using sketches!

You can use this model directly with a pipeline for masked language modeling:

from transformers import pipeline
# 1. load the model with the huggingface `pipeline`
genius = pipeline("text2text-generation", model='beyond/genius-large', device=0)
# 2. provide a sketch (joint by <mask> tokens)
sketch = "<mask> Conference on Empirical Methods <mask> submission of research papers <mask> Deep Learning <mask>"
# 3. here we go!
generated_text = genius(sketch, num_beams=3, do_sample=True, max_length=200)[0]['generated_text']
print(generated_text)

If you find our paper/code/demo useful, please cite our paper:

@article{guo2022genius,
  title={GENIUS: Sketch-based Language Model Pre-training via Extreme and Selective Masking for Text Generation and Augmentation},
  author={Guo, Biyang and Gong, Yeyun and Shen, Yelong and Han, Songqiao and Huang, Hailiang and Duan, Nan and Chen, Weizhu},
  journal={arXiv preprint arXiv:2211.10330},
  year={2022}
}
bart
conditional text generation
data augmentation
endpoints_compatible
GENIUS
pytorch
sketch-based text generation
text2text-generation
transformers