GPT-2: Ending on a functional suffix?

Follow the full discussion on Reddit.
I am using GPT-2 Simple to generate text. I am using a prefix to generate where I want the text to begin. I am curious if there is a way to tell it where to end? I know there is a truncate variable, but it doesn't seem to work for what I am intending.

Comments

There's unfortunately not much to read here yet...

Discover the Best of Machine Learning.

Ever having issues keeping up with everything that's going on in Machine Learning? That's where we help. We're sending out a weekly digest, highlighting the Best of Machine Learning.

Join over 900 Machine Learning Engineers receiving our weekly digest.

Best of Machine LearningBest of Machine Learning

Discover the best guides, books, papers and news in Machine Learning, once per week.

Twitter