GenAI Basics · Question 22 · Medium
What does top-p (nucleus) sampling do when choosing the next token?
- It always picks the single most likely token
- It samples only from the smallest set of most-likely tokens whose combined probability reaches p
- It samples from exactly p tokens
- It removes the p most likely tokens before sampling
Answer and explanation
Answer: B. It samples only from the smallest set of most-likely tokens whose combined probability reaches p
Explanation: With top-p = 0.9, tokens are ranked by probability and the smallest top group reaching 90% total probability is kept; the next token is sampled from that group. Always picking the top token is greedy decoding.
Previous: How do diffusion models, widely used for text-to-image generation, generate an… · Next: Assume that, on average, one token corresponds to about 0.75 English words…
Practise genai basics
Try a fresh set of genai basics questions with an explanation after every answer, free and without signing up: GenAI Basics practice. Or sit a full placement mock test.
More genai basics questions
- Further training an already pre-trained model on a smaller, task-specific…
- A model that can accept both an image and a text question about that image…
- How do diffusion models, widely used for text-to-image generation, generate an…
- Assume that, on average, one token corresponds to about 0.75 English words…
- What is chain-of-thought prompting?
- An AI email assistant summarises incoming emails. One email contains hidden…
- In a RAG system, what is the main purpose of a vector database?
- A query embedding is q = (1, 2, 2). Four document embeddings are: D1 = (2, 1…
- A model's two candidate next tokens have logits 2 and 0. With softmax at…
- In Reinforcement Learning from Human Feedback (RLHF), what is the reward model…
More technical & programming practice
Pseudo-code · C Programming · Java · Python · Data Structures · Algorithms · Object-Oriented Programming · DBMS
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge