A low temperature setting significantly alters the probability distribution (and is commonly used in text generation to control the level of "creativity" in the generated output), while a large temperature prioritizes the tokens with higher probabilities. Top-k is a creative way of sampling, and can be used along with beam search. The sequence chosen by top-k sampling may not be the sequence with highest probability in beam search. But it's important to remember that highest scores do not always lead to more realistic or meaningful sequences.