Skip to content

Instantly share code, notes, and snippets.

@prakhar21
Last active May 9, 2021 08:37
Show Gist options
  • Save prakhar21/69f7de651a322283fffce38f45691c3d to your computer and use it in GitHub Desktop.
Save prakhar21/69f7de651a322283fffce38f45691c3d to your computer and use it in GitHub Desktop.
gpt-neo
from happytransformer import GENSettings
top_k_sampling_settings = GENSettings(do_sample=True, top_k=50, max_length=30, min_length=10)
output_top_k_sampling = gpt_neo.generate_text("Iphone ", args=top_k_sampling_settings)
print (output_top_k_sampling.text)
# iphones are very good for keeping track of calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment