openai / gpt-2

Code for the paper "Language Models are Unsupervised Multitask Learners"
https://openai.com/blog/better-language-models/
Other
22.58k stars 5.53k forks source link

How to get reproducible interactive conditional samples? #172

Closed gugray closed 5 years ago

gugray commented 5 years ago

The 'seed' argument of interactive_conditional_samples.py helps getting reproducible sample if I restart the script, i.e., if I start from a new session.

However, I cannot find a way to get the exact same sample for the same prompt within a single session. How can this be achieved without creating a new session?

WuTheFWasThat commented 5 years ago

this is a limitation of tensorflow, i think. you'd have to change the tf.multinomial call within sample to use stateless randomness or something like that