What is it?
Sampling is the method used to choose a next token from the model's probability distribution.
Temperature is a generation setting that adjusts the shape of the token probability distribution before selection. Lower temperature usually makes higher-probability choices more dominant. Higher temperature usually spreads probability more broadly and can increase variation.