Top-k
Constrains the model's predictions during the generation process to the top-k most probable tokens at each step
The top-k parameter constrains the model's predictions during the generation process to the top-k most probable tokens at each step. When a value is set for 'k', the model focuses its attention on only the k tokens with the highest probabilities, discarding less likely options. This instruction allows for fine-tuning the generated output, ensuring that it aligns with specific patterns or constraints defined by the user. By controlling the set of tokens considered at each generation step, the top-k parameter provides a way to balance precision and diversity in the generated sequences.
The top-k parameter offers several advantages, including controlled diversity, sharper distributions, and reduced randomness in the generated output.
Liked the content? you'll love our emails!
Is Explainability critical for your 'AI' solutions?
Schedule a demo with our team to understand how AryaXAI can make your mission-critical 'AI' acceptable and aligned with all your stakeholders.