January 2025 term · Large Language Models · BSDA5004
Large Language Models Quiz 2: 16 March 2025 (January 2025 term)
The IIT Madras BS Large Language Models (LLM) Quiz 2 paper sat on 16 Mar 2025, in the January 2025 term: 18 questions for 50 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.
Official paper: IIT M DEGREE AN EXAM QDB2 16 Mar 2025 · No negative marking.
Question 1
+2 marksOne correct option
Consider following assertion and reason pair: Assertion: A small vocabulary is desirable, as it reduces the size of the embedding matrix. Reason: Decreasing the size of the vocabulary increases the number of tokens in the input.
A
Assertion and Reason are both true and Reason is a correct explanation of Assertion.
B
Assertion and Reason are both true and Reason is not a correct explanation of Assertion.
Consider following statement and mark if it is true or false:
Repeating examples in the pre-training datasets are completely harmless for downstream performance.
What is the order of the language modeling pipeline?
A
First, the model, which handles text and returns raw predictions. The tokenizer then makes sense of these predictions and converts them back to text when needed.
B
First, the tokenizer, which handles text and returns IDs. The model handles these IDs and outputs a prediction, which can be some text.
C
The tokenizer handles text and returns IDs. The model handles these IDs and outputs a prediction. The tokenizer can then be used once again to convert these predictions back to some text.
Show answerTap to reveal
Correct answer
C
The tokenizer handles text and returns IDs. The model handles these IDs and outputs a prediction. The tokenizer can then be used once again to convert these predictions back to some text.
Consider fine-tuning the T5 model on a sentiment classification task. The T5 model was pre- trained using the C4 dataset. Suppose, in the original dataset, the positive samples are denoted by integer 2, neutral samples are denoted by integer 1 and the negative samples are denoted by integer 0. Choose the necessary modifications that one needs to perform to use the T5 model for fine-tuning:
Select all that apply.
A
Map the label 0 to “negative” and 1 to “positive” in the dataset
B
Map the label 0 to “negative”, 1 to “neutral” and 2 to “positive” in the dataset
C
Map the label 0 to “0”, 1 to “1” and 2 to “2” in the dataset
D
Update the vocabulary of T5 with the modified labels
E
Add at least one linear layer on top of the decoder for final classification
F
None of these.
Show answerTap to reveal
Correct answers
B
Map the label 0 to “negative”, 1 to “neutral” and 2 to “positive” in the dataset
C
Map the label 0 to “0”, 1 to “1” and 2 to “2” in the dataset
The strikeout words in the passage given below denote the words to be dropped from the original sentence.
“These models can't read your mind. If outputs are too long, ask for brief replies. If outputs are too simple, ask for expert-level writing. If you dislike the format, demonstrate the format you'd like to see. The less the model has to guess at what you want, the more likely you'll get it.”
Which of the following represents the correct input sequence, with sentinel tokens, to the baseline model that uses pre-training denoising objectives? [z] represents the end of the sentinel token in a sentence. The characters inside the square brackets are the sentinel tokens.
Select all that apply.
A
[a] your mind [b] ask for brief replies [c] demonstrate the format [d] less the model has to guess [e]
B
[a] your mind [b] ask for brief replies [c] demonstrate the format [d] less the model has to guess
C
[v] your mind [w] ask for brief replies [x] demonstrate the format [y] less the model has to guess
D
[v] your mind [w] ask for brief replies [x] demonstrate the format [y] less the model has to guess [z]
E
[a] your mind [b] demonstrate the format [c] ask for brief replies [d] less the model has to guess
F
None of these
Show answerTap to reveal
Correct answers
B
[a] your mind [b] ask for brief replies [c] demonstrate the format [d] less the model has to guess
C
[v] your mind [w] ask for brief replies [x] demonstrate the format [y] less the model has to guess
Suppose the T5 base model has to be fine tuned with gradual unfreezing. First layer of the encoder takes the input in appropriate format. Gradual unfreezing is divided in 12 (i.e. no. of layers) phases.
Choose the correct statements:
Select all that apply.
A
In the first phase, weights of only the last layer of encoder and decoder (both) are unfrozen.
B
In the first phase, weights of only the last layer of decoder only are unfrozen.
C
In the first phase, weights of only the last layer of encoder only are unfrozen.
D
In the second phase, weights of only the second last layer of encoder and decoder (both) are unfrozen.
E
In the second phase, weights of the last two layers of encoder and decoder (both) are unfrozen.
F
In the first phase, weights of only the first layer of encoder and decoder (both) are unfrozen.
Show answerTap to reveal
Correct answers
A
In the first phase, weights of only the last layer of encoder and decoder (both) are unfrozen.
D
In the second phase, weights of only the second last layer of encoder and decoder (both) are unfrozen.
V=([start], deep, hot, is, learning, research, topic, very, [end]).
Assume that the BART model is being trained using a denoising objective. Suppose the original sentence is “[start] deep learning is very hot research topic [end]” and the corrupted sentence is “[start] deep [mask] is [mask] very hot [mask] topic [end]”
The prediction probabilities outputted by the model are given below.
The zeroth row of the matrix is the output probability distribution by the model given the special [Start] token as input. Following the Greedy Search decoding strategy, the subsequent rows give the conditional probability distribution conditioned over the previous tokens. What is the loss value?
Consider the following dictionary with the number of word occurrences in a corpus:
python
1wo ={"taught":2,
2"laughter":1,
3"drought":4,
4"tough":5}
Note: Append </w> to each word at the end.
You will be working with BPE algorithm, answer the given subquestions in that context:
Which pair will be merged in the third merge? Say the pair is (‘ab’,‘c’), then enter “abc” (without quotes and white spaces). If there is a tie between two or more candidates, pick the one that occurs first in the original vocabulary. NOTE: Enter the exact answer without any extra space in the beginning or at the end.