From the source
Contrastive search, a state-of-the-art decoding method for neural text generation, and announces its availability in the Hugging Face Transformers library for both PyTorch and TensorFlow.
It addresses repetition and semantic incoherence issues in existing decoding methods.





