Transformers as the building blocks of modern LLMs: Practice Questions — Core Machine Learning and AI Knowledge (NVIDIA-Certified Associate: Generative AI Multimodal)
Practice Questions: Transformers as the Building Blocks of Modern LLMs This set of multiple-choice questions is designed to help you prepare for the...
Practice Questions: Transformers as the Building Blocks of Modern LLMs
This set of multiple-choice questions is designed to help you prepare for the NVIDIA-Certified Associate: Generative AI Multimodal exam, focusing specifically on transformers and their role in large language models (LLMs).
What is the primary function of the self-attention mechanism in a transformer model?
- A. To reduce the dimensionality of input data
- B. To weigh the importance of different tokens relative to each other
- C. To perform convolution operations on sequential data
- D. To generate random noise for regularization
Correct answer: B
Explanation: The self-attention mechanism computes attention scores that allow the model to weigh the relevance of each token in the input sequence relative to others, enabling context-aware representations.
Which component of a transformer is responsible for capturing positional information in sequences?
- A. Feed-forward neural network
- B. Positional encoding
- C. Layer normalization
- D. Multi-head attention
Correct answer: B
Explanation: Since transformers process input tokens in parallel, positional encoding is added to input embeddings to provide information about the order of tokens in the sequence.
In the context of transformers, what does "multi-head attention" enable?
- A. Parallel processing of multiple input sequences
- B. Capturing different types of relationships by attending to information from multiple representation subspaces
- C. Reducing the number of parameters in the model
- D. Applying attention only to the first token in the sequence
Correct answer: B
Explanation: Multi-head attention allows the model to attend to information from different representation subspaces simultaneously, enhancing its ability to capture diverse contextual relationships.
Which of the following best describes the role of the transformer encoder in LLMs?
- A. Generating output tokens one at a time
- B. Encoding input sequences into contextualized embeddings
- C. Performing dimensionality reduction on images
- D. Acting as a discriminator in adversarial training
Correct answer: B
Explanation: The transformer encoder processes input sequences to produce contextualized embeddings that capture semantic relationships, which are then used for downstream tasks.
What is a key advantage of transformers over traditional recurrent neural networks (RNNs) in language modeling?
- A. Transformers require fewer training data
- B. Transformers process tokens sequentially
- C. Transformers enable parallel processing of tokens, improving training efficiency
- D. Transformers do not use attention mechanisms
Correct answer: C
Explanation: Unlike RNNs, transformers process all tokens in parallel, which significantly speeds up training and allows better modeling of long-range dependencies.
Which of the following is NOT a typical component of a transformer block?
- A. Multi-head self-attention layer
- B. Convolutional layer
- C. Feed-forward neural network
- D. Layer normalization
Correct answer: B
Explanation: Standard transformer blocks do not include convolutional layers; they mainly consist of multi-head attention, feed-forward layers, and normalization components.
In transformer-based LLMs, what is the purpose of residual connections?
- A. To prevent overfitting by dropping units
- B. To allow gradients to flow more easily during backpropagation
- C. To reduce model size
- D. To encode positional information
Correct answer: B
Explanation: Residual connections help mitigate the vanishing gradient problem by allowing gradients to bypass certain layers, facilitating more effective training of deep networks.
Which of the following best describes the role of transformers in multimodal generative AI systems?
- A. Transformers are only used for text data and cannot process images or audio
- B. Transformers can be adapted to process and fuse multiple data types such as text, images, and audio
- C. Transformers replace convolutional neural networks for image classification exclusively
- D. Transformers are used only for pretraining and not for multimodal fusion
Correct answer: B
Explanation: Transformers serve as flexible building blocks that can be adapted and extended to handle multiple modalities, enabling generative AI models to synthesize and interpret text, image, and audio data effectively.
More in this topic
Ready to test your knowledge?
Put what you've learned into practice with a quick quiz and track your progress.
Test your knowledge →