Add custom rules for sampling from GPT-2 Generator
Hi @patrickvonplaten, 
I've read your [blogpost](https://huggingface.co/blog/how-to-generate) and it's really interesting. Thanks! I have a question for that. 
We have recently trained a GPT-2 generator with HF on general text and it works well.

But to have better results on my custom task, I would like to add a custom function of sampling that is able to maximize a certain behaviour of the text I am generating.
I would like to add a custom sampling applied to top-k words that are choosen by GPT-2 in order to maximize , for example, the fact that in the text I am generating there must be the max number of vocals. 
Could you help me to think about this solution?
Thanks
Hey @simonefrancia happy that you liked the blog post :-) 

This sounds like quite a special sampling function, so the best you can do would be to fork/clone the repo and add this functionality yourself. If the sampling function is too special we probably will not include it into the master branch. 

But feel free to open a PR if you think it adds value and is quite general.