Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : LARGE LANGUAGE MODELS
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Inscript
Consider a Multi-Head Attention sub-layer with the following hyper-parameters:
- Embedding dimension (
) = 256
- Number of heads (
) = 4
- key/value dimension per head (
) =
.
Calculate the total number of trainable parameters contained only in the projection matrices
and
. (Ignore biases). Enter the integer value.
Consider a Multi-Head Attention sub-layer with the following hyper-parameters:
- Embedding dimension (
- Number of heads (
- key/value dimension per head (
Calculate the total number of trainable parameters contained only in the projection matrices
Solution
Inscript
For T5-Base, the model dimension is 768 and FFN dimension is 3072. Ignore bias. Find the number of parameters in the FFN of one encoder layer.
For T5-Base, the model dimension is 768 and FFN dimension is 3072. Ignore bias. Find the number of parameters in the FFN of one encoder layer.
Solution
Inscript
A batch of 5 sentences is passed through a Transformer Encoder. The sequences are padded to a maximum length of 20 tokens. The embedding dimension (
) is 64. What is the total number of elements (volume) in the output tensor produced by the final layer of the encoder for this batch?
A batch of 5 sentences is passed through a Transformer Encoder. The sequences are padded to a maximum length of 20 tokens. The embedding dimension (
Solution
Inscript
Calculate the KV Cache memory size in Megabytes for a single request (batch size = 1) with the following parameters:
- Number of layers: 24
- Embedding dimension (d_model): 1024
- Sequence length (n): 2048 tokens
- Precision: 16-bit (2 bytes per element)
- Assume standard Multi-Head Attention (MHA) where total KV dimension per layer is 2 x d_model (2 for K+V)
Calculate the KV Cache memory size in Megabytes for a single request (batch size = 1) with the following parameters:
- Number of layers: 24
- Embedding dimension (d_model): 1024
- Sequence length (n): 2048 tokens
- Precision: 16-bit (2 bytes per element)
- Assume standard Multi-Head Attention (MHA) where total KV dimension per layer is 2 x d_model (2 for K+V)
Solution
In BERT's Next Sentence Prediction task, how are the negative (NotNext) examples created?
Solution
What happens when a very large model is trained for many epochs on a relatively small dataset in the T5 scaling-law setting?
Solution
PagedAttention is designed to address which specific inefficiency in Large Language Model (LLM) serving?
Solution
The standard Self-Attention mechanism has a time complexity of
, where
is the sequence length and
is the embedding dimension. In Kernel-based Linear Attention methods (like Linear Transformers), the associativity of matrix multiplication is exploited to compute
instead of
.
What is the resulting time complexity of this Linear Attention mechanism?
What is the resulting time complexity of this Linear Attention mechanism?
Solution
In a standard Transformer layer utilizing Rotary Positional Embeddings (RoPE), at which specific stage of the forward pass is the rotary transformation applied?
Solution
In a Transformer using ALiBi, the attention score is modified as:

Suppose a researcher proposes modifying ALiBi to:

and claims that:
“The model will still learn to focus on nearby tokens through training.”
Which of the following is the most accurate critique of this proposal?
Suppose a researcher proposes modifying ALiBi to:
and claims that:
“The model will still learn to focus on nearby tokens through training.”
Which of the following is the most accurate critique of this proposal?
Solution
Comparing the architectures of BERT and GPT, select all the structural differences that are true.
Solution
Based on the architectural comparison experiments (Encoder-Decoder vs. Decoder-only vs. Encoder-only) discussed in the lectures:
Solution
Select all true statements regarding KV Caching during the autoregressive inference of LLMs.
Solution
Select all correct statements regarding Decoding Strategies in language generation.
Solution
In a feature-based approach using a pretrained transformer (like BERT) for a Multiple-Choice QA task, which of the following statements regarding the methodology are correct? (Select all that apply)
Solution
A Transformer processes a sequence of length 5 using 6 identical self-attention layers. Count the total number of allowed attention links across all layers and Choose the option representing the correct pair
(A) BERT
(B) GPT
(A) BERT
(B) GPT
Solution
Consider the architecture of BART. Which of the following descriptions best match its structural design?
Solution
Why is Flash Attention considered an "IO-aware" algorithm?
Solution
In a transformer with relative positional encoding (RPE), attention logits between a query at position 4 and keys at positions 2 and 6 depend on relative distances
where
is the position of query and
is the position of key.
Suppose the learned scalar biases as per RPE are:
-
-
-
-
-
The base (content-only) attention logits are:
-
-
What are the final attention logits after incorporating RPE?
Suppose the learned scalar biases as per RPE are:
-
-
-
-
-
The base (content-only) attention logits are:
-
-
What are the final attention logits after incorporating RPE?
Solution
An engineer is designing a Transformer model capable of length extrapolation (handling sequences longer than those seen during training) while minimizing the number of trainable weights. They are evaluating Absolute Positional Encodings (APE), Relative Positional Encodings (RPE), Rotary Positional Encodings (RoPE), and Attention with Linear Biases (ALiBi).Which of the following statements correctly describes the parameterization and behavior of these techniques?
Solution
Shape
Thickness [ / ]
3
All colors