1. Home
  2. Artificial Intelligence
  3. Generative AI
  4. What is the purpose of the attention mask in a Transformer…

Added 11 Nov 2026

What is the purpose of the attention mask in a Transformer decoder?

  1. To speed up training
  2. To prevent attention to future positions Correct answer
  3. To reduce parameters
  4. To improve accuracy

Correct answer

B. To prevent attention to future positions

13 views

MCQSEXAM

Explanation

The attention mask prevents the decoder from attending to future tokens, preserving autoregressive causality. Source: MIT (Transformer MCQ), Q1.

Reference

Asked in: General

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Generative AI MCQs

Practise all Generative AI MCQs

Similar MCQs