I am currently generating text from left context using the example script run_generation.py
of the huggingface transformers library with gpt-2:
$ python transformers/examples/run_generation.py \
--model_type gpt2 \
--model_name_or_path gpt2 \
--prompt "Hi, " --length 5
=== GENERATED SEQUENCE 1 ===
Hi, could anyone please inform me
I would like to generate short complete sentences. Is there any way to tell the model to finish a sentence before length
words?
Note: I don't mind changing model, but would prefer an auto-regressive one.