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
In the standard Transformer Decoder, the Multi-Head Attention layer is "Masked". What is the specific purpose of this mask during training?
Solution
In the Span Corruption pre-training objective used by T5 (similar to the "Denoising" objective in BART), the input is:

(where
and
represent masked spans).
What is the corresponding Target sequence that the decoder is trained to generate?
(where
What is the corresponding Target sequence that the decoder is trained to generate?
Solution
In Strided Local Attention, each token attends only to a local window of neighbors. While this reduces computational complexity to
(linear in
), what is a significant limitation of a single layer of such attention?
Solution
A transformer layer with absolute positional encoding and another with ALiBi are compared on sequences extended from length 128 to 512, without retraining.
Which numerical behavior is most likely for ALiBi in this extrapolation scenario?
Which numerical behavior is most likely for ALiBi in this extrapolation scenario?
Solution
Based on the BERT pre-training phase, select all correct constraints and properties regarding the input data.
Solution
Select the statements that correctly distinguish fine-tuning from zero-shot prompting for GPT-style models.
Solution
Inscript
You are using Top-
(Nucleus) Sampling with
.The model outputs the following sorted probability distribution for the next token:
- "apple": 0.40
- "banana": 0.25
- "cherry": 0.15
- "date": 0.10
- "elderberry": 0.10
How many tokens will be included in the candidate pool from which the final token is sampled? Enter the integer count.
You are using Top-
- "apple": 0.40
- "banana": 0.25
- "cherry": 0.15
- "date": 0.10
- "elderberry": 0.10
How many tokens will be included in the candidate pool from which the final token is sampled? Enter the integer count.
Solution
Inscript
A Large Language Model is pre-trained for
steps. The batch size is
sequences. The sequence length (context window) is
tokens.
Calculate the total number of tokens the model sees during pre-training.Enter your answer in Billions (B). (e.g., if the answer is 500 Billion, enter 500).
A Large Language Model is pre-trained for
Calculate the total number of tokens the model sees during pre-training.Enter your answer in Billions (B). (e.g., if the answer is 500 Billion, enter 500).
Solution
Inscript
The computational complexity and memory requirement of the Self-Attention mechanism is quadratic with respect to the sequence length
.
Specifically, the Attention Score matrix has a size of
.
If you double the input sequence length
(e.g., from 512 to 1024) while keeping the embedding dimension (
) constant, by what factor does the memory required to store the Attention Score matrix increase?
Enter the integer value.
The computational complexity and memory requirement of the Self-Attention mechanism is quadratic with respect to the sequence length
Specifically, the Attention Score matrix has a size of
If you double the input sequence length
Enter the integer value.
Solution
Inscript
Suppose a language model outputs the following logits for a vocabulary of size 4:

You apply High Temperature Sampling with temperature
. After applying the softmax on the temperature-scaled logits, what is the probability assigned to the token "apple"? (Give your answer up to 2 decimal places).
First, apply temperature scaling with
:
Suppose a language model outputs the following logits for a vocabulary of size 4:
You apply High Temperature Sampling with temperature
First, apply temperature scaling with
Solution
Inscript
Consider a Strided Local Attention mechanism where each token attends to a window of
tokens (
left,
right).
- Sequence Length (
) = 1000
- Embedding Dimension (
) = 64
- Window Size (
) = 10
How many multiplications are performed to compute the unnormalized attention scores (
) for one attention head?
Consider a Strided Local Attention mechanism where each token attends to a window of
- Sequence Length (
- Embedding Dimension (
- Window Size (
How many multiplications are performed to compute the unnormalized attention scores (
Solution
Adapter Layers are a parameter-efficient fine-tuning strategy. Where are these layers typically inserted within a Transformer block?
Solution
Why do standard LLM architectures include explicit Positional Encodings (like RoPE or Sinusoidal) despite the causal mask providing some implicit order?
Solution
In the context of Grouped Query Attention (GQA), if we have
query heads and
groups, how many Key/Value heads are trained?
Solution
Consider Multi-Query Attention (MQA). How does its architecture differ from standard Multi- Head Attention (MHA) to improve inference efficiency?
Solution
In a transformer with relative positional encoding (RPE), attention logits between a query at position 5 and keys at positions 3 and 7 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
In ALiBi, the attention score is modified using a distance-based bias
Suppose for a head the slope is:
For a query at position
, attending to keys at positions
:
What ALiBi bias values are subtracted from the logits for keys at positions 3, 5, and 8, respectively?
Note: Assume absolute distances.
Suppose for a head the slope is:
For a query at position
What ALiBi bias values are subtracted from the logits for keys at positions 3, 5, and 8, respectively?
Note: Assume absolute distances.
Solution
Which of the following statements about fine-tuning strategies such as gradual unfreezing and multi-task learning in the context of the T5 model are correct?
Solution
Select all correct statements regarding Local Attention Variants (like Sparse, Dilated, or Windowed Attention).
Solution
Which of the following techniques are used in Flash Attention to speed up attention computation and save memory?
Solution
Shape
Thickness [ / ]
3
All colors