[RFC] Sampling transform function for generation
See https://github.com/huggingface/transformers/issues/4164
(note that this will need to be refined to work with TF / beam search if we decide on the direction)<|||||>Closing in favor of #5416 