Skip to content
Generative AI

What do temperature, top-p and top-k control?

How the next token is sampled: temperature flattens or sharpens the distribution, top-k keeps the k likeliest tokens, top-p the smallest set whose mass reaches p. Near zero for extraction and code; raise it only when you want variety.

datasciencetrivia.com

Card 1 of 213. Answer: How the next token is sampled: temperature flattens or sharpens the distribution, top-k keeps the k likeliest tokens, top-p the smallest set whose mass reaches p. Near zero for extraction and code; raise it only when you want variety.

Created by santiviquez

About · To suggest new questions or report an error send me a dm.

All questions