
Answer-first summary for fast verification
Answer: Lower top-k to 20
## Explanation **Correct Answer: B (Lower top-k to 20)** ### Understanding the Parameters: 1. **Top-k Sampling**: This parameter limits the model's vocabulary to only the top 'k' most probable tokens at each step of generation. By lowering top-k to 20, you restrict the model to choose from only the 20 most likely tokens, which reduces the chance of selecting rare or unexpected tokens. 2. **Top-p (Nucleus Sampling)**: This parameter selects from the smallest set of tokens whose cumulative probability exceeds 'p'. Increasing top-p to 1.0 would actually allow the model to consider ALL tokens, which would INCREASE the chance of rare/unexpected tokens. 3. **Temperature**: Controls the randomness of predictions by scaling the logits before applying softmax. Setting temperature to 1.0 is the default value that maintains the original probability distribution - it doesn't specifically reduce rare tokens. ### Why B is Correct: - **Lowering top-k to 20** restricts the vocabulary to only the most probable tokens - This reduces the chance of rare/unexpected tokens being generated - Still allows some randomness within the top 20 tokens - The team specifically wants to "reduce the number of rare and unexpected tokens" while maintaining some randomness ### Why Other Options Are Incorrect: - **A (Increase top-k to 100)**: This would allow MORE tokens to be considered, increasing the chance of rare/unexpected tokens - **C (Set temperature to 1.0)**: This is the default setting and doesn't specifically address rare token reduction - **D (Increase top-p to 1.0)**: This would consider ALL tokens, maximizing the chance of rare/unexpected tokens ### Key Takeaway: Top-k sampling is an effective method to control vocabulary diversity. Lower values make outputs more predictable and less likely to contain rare tokens, while higher values increase diversity at the risk of generating less coherent or unexpected content.
Author: Ritesh Yadav
Ultimate access to all questions.
A content moderation team wants to reduce the number of rare and unexpected tokens generated by the model while still allowing some randomness. Which parameter should be adjusted?
A
Increase top-k to 100
B
Lower top-k to 20
C
Set temperature to 1.0
D
Increase top-p to 1.0
No comments yet.