Large Language Models Quiz 1: 15 March 2026 (January 2026 term)
The IIT Madras BS Large Language Models (LLM) Quiz 1 paper sat on 15 Mar 2026, in the January 2026 term: 19 questions for 40 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
- 19
- 40
- 120 min
- 12
- 3
- 4
Show answer
Correct answer
Question 2
In the scaled dot-product attention equation
To reduce the number of trainable parameters in the model
To prevent the dot product values from growing too large, which would push the softmax function into regions with extremely small gradients
To normalize the embedding vectors to have a unit length
Show answer
Correct answer
To prevent the dot product values from growing too large, which would push the softmax function into regions with extremely small gradients
Question 3
Show answer
Correct answer
Question 4
In a standard Transformer encoder-decoder architecture, is masking typically applied in the cross-attention layer?
Yes, both causal masking and padding masking are applied to prevent the decoder from attending to future encoder positions
Yes, only causal masking is applied to maintain the autoregressive property
No causal masking is needed, but padding masking may be applied to ignore padded positions in the source sequence
No masking is ever applied in cross-attention since the encoder processes the complete input sequence
Show answer
Correct answer
No causal masking is needed, but padding masking may be applied to ignore padded positions in the source sequence
Question 5
Segment embeddings are not used; the embedding layer is disabled for single-sentence tasks.
Segment embeddings are randomly initialized for every new single-sentence input.
Show answer
Correct answer
Question 6
It approaches a uniform distribution where all tokens have equal probability.
It approaches a "one-hot" distribution where the token with the highest logit has probability 1.0 (Greedy Search).
It remains unchanged from the original softmax distribution.
It causes numerical instability and results in NaNs.
Show answer
Correct answer
It approaches a "one-hot" distribution where the token with the highest logit has probability 1.0 (Greedy Search).
Question 7
The average pooling of all token vectors.
The concatenation of all hidden state vectors.
Show answer
Correct answer
Question 8
Select all statements that correctly describe the motivation and behavior of Multi-Head Attention as compared to single-head attention.
It allows the model to jointly attend to information from different representation subspaces at different positions.
It is mathematically similar to having multiple filters/kernels in a CNN to capture different features.
It reduces the total number of parameters required compared to a single head with the same total dimension.
Each head can theoretically learn to capture different linguistic relationships (e.g., one head links "it" to "animal", another links "it" to "tired").
Show answer
Correct answers
It allows the model to jointly attend to information from different representation subspaces at different positions.
It is mathematically similar to having multiple filters/kernels in a CNN to capture different features.
Each head can theoretically learn to capture different linguistic relationships (e.g., one head links "it" to "animal", another links "it" to "tired").
Question 9
Given the vectorized self-attention calculation
The softmax operation is applied to the entire matrix at once (globally), not row-wise.
Show answer
Correct answers
Question 10
This mechanism allows the Decoder to focus on relevant parts of the input sequence processed by the Encoder.
Show answer
Correct answers
This mechanism allows the Decoder to focus on relevant parts of the input sequence processed by the Encoder.
Question 11
Show answer
Correct answer: -0.62 (accepted within ±0.03)
Question 12
The previous decoder hidden state is:
and
Based on the above data, answer the given subquestions.
Show answer
Correct answer: 1.925 (accepted within ±0.035)
Question 13
The previous decoder hidden state is:
and
Based on the above data, answer the given subquestions.
Show answer
Correct answer: 0.35 (accepted within ±0.04)
Question 14
The previous decoder hidden state is:
and
Based on the above data, answer the given subquestions.
Show answer
Correct answer: 1.36 (accepted within ±0.04)
Question 15
Consider the following Configuration for a GPT model:
• Vocabulary size: 40,000 tokens • Embedding dimension (d_model): 768 • Maximum sequence length: 512 • Number of transformer blocks: 12 • Number of attention heads per block: 12 • Feed-forward network hidden dimension: 3,072 • Activation function: GELU
Note: In multi-head attention, the model dimension is split equally among all heads.
Based on the above data, answer the given subquestions.
What is the number of parameters in the token embedding matrix?
30,720,000
40,768
393,216
15,728,640,000
Show answer
Correct answer
30,720,000
Question 16
Consider the following Configuration for a GPT model:
• Vocabulary size: 40,000 tokens • Embedding dimension (d_model): 768 • Maximum sequence length: 512 • Number of transformer blocks: 12 • Number of attention heads per block: 12 • Feed-forward network hidden dimension: 3,072 • Activation function: GELU
Note: In multi-head attention, the model dimension is split equally among all heads.
Based on the above data, answer the given subquestions.
What is the total number of parameters in the positional embedding matrix?
512,768
393,216
3,932,160
39,321
Show answer
Correct answer
393,216
Question 17
Consider the following Configuration for a GPT model:
• Vocabulary size: 40,000 tokens • Embedding dimension (d_model): 768 • Maximum sequence length: 512 • Number of transformer blocks: 12 • Number of attention heads per block: 12 • Feed-forward network hidden dimension: 3,072 • Activation function: GELU
Note: In multi-head attention, the model dimension is split equally among all heads.
Based on the above data, answer the given subquestions.
For ONE complete attention head, what is the total number of parameters (Q + K + V projections combined)?
49,152
196,608
589,824
147,456
Show answer
Correct answer
147,456
Question 18
Consider the following Configuration for a GPT model:
• Vocabulary size: 40,000 tokens • Embedding dimension (d_model): 768 • Maximum sequence length: 512 • Number of transformer blocks: 12 • Number of attention heads per block: 12 • Feed-forward network hidden dimension: 3,072 • Activation function: GELU
Note: In multi-head attention, the model dimension is split equally among all heads.
Based on the above data, answer the given subquestions.
After the multi-head attention computation, all head outputs are concatenated and projected back to the model dimension.
How many parameters are in the output projection matrix (weights only, excluding bias)?
768
49,152
589,824
294,912
Show answer
Correct answer
589,824
Question 19
Consider the following Configuration for a GPT model:
• Vocabulary size: 40,000 tokens • Embedding dimension (d_model): 768 • Maximum sequence length: 512 • Number of transformer blocks: 12 • Number of attention heads per block: 12 • Feed-forward network hidden dimension: 3,072 • Activation function: GELU
Note: In multi-head attention, the model dimension is split equally among all heads.
Based on the above data, answer the given subquestions.
What is the total number of parameters in the complete FFN (including both weight matrices and bias vectors)?
2,359,296
4,718,592
4,722,432
9,437,184
Show answer
Correct answer
4,722,432