Guide-linked quiz · Hard Level

Typical Sampling Quiz

Checks typical surprisal, entropy-based ranking, the typical_p mass threshold, and differences from probability-ranked top-p sampling.

Related guide pathsTypical Sampling
Question 1 of 8

What core quantity does typical sampling compare each candidate token against?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. What core quantity does typical sampling compare each candidate token against?
    • The expected information content (entropy) of the distribution
    • The model's overall vocabulary size
    • The token's position in the sentence
    • The temperature parameter alone
  2. How does typical sampling treat the single most probable token?
    • It always selects it first
    • It may exclude it if its surprisal is far below the expected value
    • It doubles its probability
    • It ignores probability entirely
  3. Typical sampling was motivated by which idea about human language?
    • Humans always choose the rarest possible words
    • Humans never repeat words
    • Humans communicate near a roughly steady rate of information
    • Humans speak in fixed-length sentences
  4. What does the tau parameter in typical sampling control?
    • The learning rate during training
    • The number of layers in the model
    • The maximum sentence length
    • The cumulative probability mass collected into the typical set
  5. Compared with greedy decoding, what does typical sampling try to change?
    • It samples from tokens whose surprisal is closer to the distribution’s expected surprisal
    • It always selects the most probable token
    • It guarantees every continuation is factually correct
    • It removes probability scores from decoding
  6. In which kind of software is typical sampling commonly exposed to developers?
    • Spreadsheet applications
    • Open-source LLM inference libraries like Hugging Face Transformers
    • Image editing tools
    • Database query engines
  7. How does typical sampling rank candidate tokens differently from top-p sampling?
    • By alphabetical order of token strings
    • By token position in the prompt
    • By distance between token surprisal and expected surprisal, rather than probability rank alone
    • By the model’s training loss
  8. Which value does typical_p control?
    • The model’s vocabulary size
    • The number of transformer layers
    • The probability that the answer is factually correct
    • The target cumulative probability mass collected in the typical set

Keep testing yourself

More quizzes picked for your level.

View all quizzes