Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 5 MCQs Transformers and Pretrained Language Models

CSE472 — Deep Learning For Natural Language Processing 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 transformer architecture Easy

    Which foundational 2017 paper introduced the Transformer architecture?

  2. Question 2 of 60 self-attention Easy

    What is the primary function of the self-attention mechanism in a Transformer?

  3. Question 3 of 60 multi-head attention Easy

    Why does the Transformer use multi-head attention instead of a single attention function?

  4. Question 4 of 60 positional encoding Easy

    Why is positional encoding necessary in a Transformer model?

  5. Question 5 of 60 transformer encoder and decoder blocks Easy

    Which component is present in a standard Transformer decoder block but NOT in an encoder block?

  6. Question 6 of 60 tokenization methods Easy

    What is the primary advantage of subword tokenization methods over traditional word-level tokenization?

  7. Question 7 of 60 Byte-Pair Encoding and WordPiece Easy

    How does the Byte-Pair Encoding (BPE) algorithm initially build its vocabulary?

  8. Question 8 of 60 pretrained transformer models Easy

    What does 'pretraining' mean in the context of large language models?

  9. Question 9 of 60 BERT Easy

    What does the acronym BERT stand for?

  10. Question 10 of 60 GPT Easy

    The GPT (Generative Pre-trained Transformer) architecture is primarily based on which part of the original Transformer?

  11. Question 11 of 60 T5 Easy

    What is the defining characteristic of the T5 (Text-to-Text Transfer Transformer) framework?

  12. Question 12 of 60 masked language modeling Easy

    In Masked Language Modeling (MLM), what is the model trained to do?

  13. Question 13 of 60 next sentence prediction Easy

    What is the objective of the Next Sentence Prediction (NSP) task used during BERT's pretraining?

  14. Question 14 of 60 causal language modeling Easy

    Which of the following best describes Causal Language Modeling (CLM)?

  15. Question 15 of 60 transfer learning for NLP tasks Easy

    What is a major benefit of using transfer learning in NLP?

  16. Question 16 of 60 fine-tuning for text classification Easy

    When fine-tuning BERT for a sequence classification task (like sentiment analysis), which special token's final hidden state is typically passed to the classification layer?

  17. Question 17 of 60 named entity recognition Easy

    Named Entity Recognition (NER) using Transformers is typically modeled as what type of task?

  18. Question 18 of 60 question answering Easy

    In an extractive Question Answering task using a model like BERT, what does the model output?

  19. Question 19 of 60 HuggingFace Transformers Easy

    What is the primary purpose of the HuggingFace Transformers library?

  20. Question 20 of 60 transformer architecture Easy

    In the context of the Transformer architecture, what is passed through the Feed-Forward Neural Network in an encoder block?

  21. Question 21 of 60 self-attention Medium

    In the scaled dot-product attention mechanism, why are the dot products scaled by the inverse square root of the dimension of the key vectors ()?

  22. Question 22 of 60 multi-head attention Medium

    What is the primary advantage of using Multi-Head Attention over a single attention function in a Transformer?

  23. Question 23 of 60 positional encoding Medium

    How are sine and cosine functions utilized for positional encoding in the original Transformer architecture?

  24. Question 24 of 60 transformer encoder and decoder blocks Medium

    In a standard Transformer decoder block, what is the purpose of the masked multi-head attention layer?

  25. Question 25 of 60 Byte-Pair Encoding and WordPiece Medium

    When training a Byte-Pair Encoding (BPE) tokenizer, how are new subwords formed?

  26. Question 26 of 60 BERT Medium

    Which components make up the input representation for a given token in the BERT model?

  27. Question 27 of 60 masked language modeling Medium

    During the pretraining phase of BERT using Masked Language Modeling (MLM), how are the selected tokens replaced?

  28. Question 28 of 60 GPT Medium

    Which of the following best describes the architecture of the Generative Pre-trained Transformer (GPT) models?

  29. Question 29 of 60 causal language modeling Medium

    In causal language modeling, what objective function is the model primarily optimizing?

  30. Question 30 of 60 T5 Medium

    How does the Text-to-Text Transfer Transformer (T5) format its input and output for different NLP tasks?

  31. Question 31 of 60 fine-tuning for text classification Medium

    When fine-tuning a BERT model for text classification, which vector is typically passed to the final classification layer?

  32. Question 32 of 60 HuggingFace Transformers Medium

    In the HuggingFace Transformers library, what is the role of the AutoModelForSequenceClassification class?

  33. Question 33 of 60 next sentence prediction Medium

    In BERT's Next Sentence Prediction (NSP) task, what defines a positive pair during pretraining?

  34. Question 34 of 60 named entity recognition Medium

    How is fine-tuning adapted for a Token Classification task like Named Entity Recognition (NER) using a transformer?

  35. Question 35 of 60 question answering Medium

    When applying a transformer model to Extractive Question Answering (like SQuAD), how is the answer extracted from the context?

  36. Question 36 of 60 transformer encoder and decoder blocks Medium

    Which component exists in a Transformer Decoder block but is ABSENT from a Transformer Encoder block?

  37. Question 37 of 60 transfer learning for NLP tasks Medium

    What is the main benefit of using transfer learning in modern NLP?

  38. Question 38 of 60 Byte-Pair Encoding and WordPiece Medium

    How does WordPiece tokenization differ primarily from Byte-Pair Encoding (BPE)?

  39. Question 39 of 60 transformer architecture Medium

    In the standard Transformer architecture, what specific type of neural network follows the attention mechanisms within both encoder and decoder layers?

  40. Question 40 of 60 self-attention Medium

    Given an input sequence of length and hidden dimension , what is the computational time complexity of the self-attention operation?

  41. Question 41 of 60 self-attention Hard

    In the standard scaled dot-product attention, the dot products of queries and keys are divided by . What is the primary theoretical justification for this specific scaling factor?

  42. Question 42 of 60 multi-head attention Hard

    Consider a Multi-Head Attention layer with heads and a model dimension of . If , how many trainable weights (excluding biases) are present in the query, key, value, and output projection matrices combined for this single layer?

  43. Question 43 of 60 positional encoding Hard

    Which of the following mathematical properties of the sinusoidal positional encodings proposed by Vaswani et al. is crucial for allowing the model to easily learn to attend by relative positions?

  44. Question 44 of 60 transformer encoder and decoder blocks Hard

    In standard Transformer architectures, Layer Normalization can be applied either before the sub-layers (Pre-LN) or after the sub-layers (Post-LN). Which of the following best characterizes the impact of choosing Pre-LN over Post-LN?

  45. Question 45 of 60 Byte-Pair Encoding and WordPiece Hard

    While both Byte-Pair Encoding (BPE) and WordPiece are subword tokenization algorithms, their merging criteria differ. BPE merges pairs based on frequency. What criterion does WordPiece primarily use to determine which subword pair to merge?

  46. Question 46 of 60 masked language modeling Hard

    In BERT's Masked Language Modeling (MLM), 15% of the tokens are chosen for prediction. Of these chosen tokens, 80% are replaced with [MASK], 10% with a random word, and 10% kept unchanged. What is the primary reason for keeping 10% of the selected tokens unchanged?

  47. Question 47 of 60 next sentence prediction Hard

    Which of the following pretrained models completely removed the Next Sentence Prediction (NSP) objective and demonstrated empirically that removing it actually improved performance on downstream tasks?

  48. Question 48 of 60 causal language modeling Hard

    During autoregressive generation in causal language models, a 'KV cache' is often utilized. If a model generates a sequence of length , how does the memory complexity of the KV cache scale with respect to ?

  49. Question 49 of 60 T5 Hard

    T5 (Text-to-Text Transfer Transformer) uses a unique unsupervised pre-training objective known as 'span corruption'. How does T5 handle the targets for masked spans during pre-training compared to BERT?

  50. Question 50 of 60 fine-tuning for text classification Hard

    When fine-tuning BERT for text classification, it is standard practice to pass the final hidden state of the [CLS] token to a classification head. If one extracts the [CLS] embedding from a pre-trained BERT without any fine-tuning, why is it generally a poor sentence representation for tasks like semantic textual similarity?

  51. Question 51 of 60 named entity recognition Hard

    When fine-tuning a transformer model for Named Entity Recognition (NER), subword tokenization often splits a single word into multiple tokens (e.g., 'Washington' -> 'Wash', '##ington'). What is the standard practice in HuggingFace for assigning labels to these subwords to compute the loss correctly?

  52. Question 52 of 60 question answering Hard

    In Extractive Question Answering tasks with unanswerable questions (like SQuAD 2.0), how does a standard BERT-based architecture signal that a question cannot be answered from the given context?

  53. Question 53 of 60 transformer architecture Hard

    Consider a Transformer block with sequence length and hidden dimension . The attention mechanism computes . If is significantly larger than (e.g., ), which operation becomes the primary computational bottleneck?

  54. Question 54 of 60 BERT Hard

    BERT relies on Token Embeddings, Segment (Token Type) Embeddings, and Positional Embeddings. If you are fine-tuning BERT for a single-sequence classification task (e.g., Sentiment Analysis), how are the Segment Embeddings typically handled?

  55. Question 55 of 60 transfer learning for NLP tasks Hard

    When adapting a large pre-trained language model to a specific task using Low-Rank Adaptation (LoRA), which of the following is true regarding the model's parameters?

  56. Question 56 of 60 HuggingFace Transformers Hard

    In the HuggingFace generate() method, when both top_k and top_p (nucleus sampling) parameters are provided (e.g., top_k=50, top_p=0.95), in what order are these filtering operations mathematically applied to the logits?

  57. Question 57 of 60 transformer decoder blocks Hard

    In the cross-attention sub-layer of a standard Transformer Decoder, how are the Query (Q), Key (K), and Value (V) matrices derived?

  58. Question 58 of 60 tokenization methods Hard

    Unlike BPE which starts with characters and builds up, the Unigram Language Model tokenizer starts with a large vocabulary and prunes it down. What metric does the Unigram algorithm use to decide which tokens to remove at each iteration?

  59. Question 59 of 60 GPT Hard

    GPT-3 popularized the concept of 'in-context learning' (few-shot prompting) where the model performs tasks without gradient updates. From a representational perspective, how does the model 'learn' a task dynamically during inference?

  60. Question 60 of 60 pretrained transformer models Hard

    In the context of the Effective Receptive Field (ERF) of deep neural networks, how does the theoretical receptive field of a token at the very first layer of a Transformer compare to a standard CNN?

That's unit 5

Answer a few questions and your score shows up here.