Interview Questions
Interview Guides
Experiences
Explore
Get started
Sign in
Interview Guides
Top-k and Top-p Sampling | Dataford Interview Questions
All questions
/
Coding
Top-k and Top-p Sampling
Medium
Asked at 1 company
Language Models
Sampling
python
Problem
Write a function to simulate top-k or top-p (nucleus) sampling during text generation at Mistral AI.
Question
Answer
Problem
Write a function to simulate top-k or top-p (nucleus) sampling during text generation at Mistral AI.
Your answer
Edit
Preview
Try one AI text evaluation on us
Get structured feedback, scored against a 4-axis rubric. Premium unlocks unlimited.
0 words
target ~200
Try a free preview
Stuck? Get a hint
Past attempts
Up next
Top-p Nucleus Sampling Algorithm
Medium
Compare Top-p and Top-k Sampling
Easy
Nucleus Sampling From Scratch
Medium
Next question