Contrastive Decoding: Open-ended Text Generation as Optimization