Guide-linked quiz · Medium Level
Repetition Penalty and Decoding Controls Quiz
Compare temperature, top-k, top-p, and repetition penalties, including how logits change before sampling in LLM generation workflows.
Question 1 of 8
What does raising the 'temperature' parameter do to a model's output?
Preview every question8 questions
Answers and explanations appear as you take the quiz.
- What does raising the 'temperature' parameter do to a model's output?
- Makes it more random and diverse
- Makes it more deterministic and focused
- Permanently changes the model's weights
- Speeds up generation
- How does top-p (nucleus) sampling decide which tokens to consider?
- It keeps a fixed number of tokens regardless of probability
- It keeps the smallest set of tokens whose probabilities sum to a threshold
- It keeps only the single most likely token
- It keeps tokens with probability above 50%
- At what stage does a repetition penalty typically act?
- On the raw text after generation
- On the training data
- On the logits before the softmax
- On the tokenizer vocabulary
- In OpenAI’s text-generation API, how do presence and frequency penalties differ?
- Presence penalty scales with token count; frequency penalty is flat
- They are identical
- Both only apply to the first token
- Frequency penalty scales with how often a token appeared; presence penalty applies once if it appeared at all
- For code completion where deterministic sampling is desired, which setting best matches the guide?
- Temperature near zero
- Very high temperature
- High repetition penalty above 2.0
- Top-p of 1.0 with high temperature
- What does top-k sampling do?
- Keeps tokens summing to probability k
- Keeps only the k most probable tokens as candidates
- Multiplies all logits by k
- Removes the k least likely tokens from training
- With a repetition penalty above 1, how does a standard logits processor adjust a previously seen token?
- It sets every repeated-token logit to zero
- It adds the penalty to every token equally
- It divides a positive logit by the penalty and multiplies a negative logit by it
- It removes the token from the vocabulary permanently
- How does top-k differ from top-p sampling?
- Top-k uses cumulative probability while top-p fixes a count
- Top-k changes model weights while top-p changes the tokenizer
- They are both deterministic decoding methods
- Top-k keeps a fixed number of candidates; top-p keeps a probability-mass-based set
Keep testing yourself
More quizzes picked for your level.