Guide-linked quiz · Medium Level

Teacher Forcing in Sequence Models Quiz

Checks how ground-truth prefixes train a sequence decoder, how causal masks support parallel training, and why inference differs.

Question 1 of 8

During teacher forcing, what is fed as the input at each decoding step?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. During teacher forcing, what is fed as the input at each decoding step?
    • The ground-truth previous token
    • The model's own previous prediction
    • A random token
    • The final output token
  2. During teacher-forced training, what target is paired with decoder input y_(t−1)?
    • The previous ground-truth token
    • The next target token y_t
    • A token sampled from the validation set
    • The maximum-probability output from an earlier training run
  3. The train-test mismatch caused by teacher forcing is known as:
    • Vanishing gradients
    • Mode collapse
    • Exposure bias
    • Label leakage
  4. In a Transformer decoder, what mechanism lets teacher-forced training run in parallel across positions?
    • Dropout
    • Batch normalization
    • Beam search
    • A causal (look-ahead) attention mask
  5. At inference time, why can't teacher forcing be used?
    • There are no ground-truth future tokens to feed
    • The loss function is unavailable
    • The GPU is too slow
    • Attention masks are disabled
  6. Which loss is typically used at each step during teacher-forced training?
    • Mean squared error on raw logits
    • Cross-entropy between the predicted distribution and the true next token
    • Hinge loss on embeddings
    • Cosine similarity loss
  7. The target sequence is “red, blue, green.” Under teacher forcing, which token is supplied when training the prediction of “green”?
    • The model’s prediction for “green”
    • The future token after “green”
    • The ground-truth previous token “blue”
    • A randomly sampled vocabulary item
  8. At decoder position t, which tokens must a causal attention mask block?
    • The source sequence
    • All earlier target tokens
    • The current position’s own input
    • Target tokens at positions later than t

Keep testing yourself

More quizzes picked for your level.

View all quizzes