uiz Space

May 2025 term · Large Language Models · BSDA5004

Large Language Models Quiz 2: 3 August 2025 (May 2025 term)

The IIT Madras BS Large Language Models (LLM) Quiz 2 paper sat on 3 Aug 2025, in the May 2025 term: 17 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.

Questions
17
Marks
40
Duration
120 min
MCQ
9
MSQ
3
Numerical
5

Updated

Official paper: IIT M IMPROVEMENT AN EXAM QIA2 03 Aug 2025 · No negative marking.

Question 1

+2 marksOne correct option

What is a primary motivation for using subword tokenization (like BPE or WordPiece) instead of word-level tokenization in transformers?

  1. A

    It increases vocabulary size exponentially

  2. B

    It completely eliminates the need for a tokenizer

  3. C

    It helps handle out-of-vocabulary words more effectively

  4. D

    It prevents the model from needing positional encoding

Show answer

Correct answer

  • C

    It helps handle out-of-vocabulary words more effectively

Question 2

+2 marksOne correct option

What is a key implication of scaling laws in large language models?

  1. A

    Training longer always leads to better performance

  2. B

    Larger models require less training data

  3. C

    Model size and dataset size must scale together to maintain optimal performance

  4. D

    None of these

Show answer

Correct answer

  • C

    Model size and dataset size must scale together to maintain optimal performance

Question 3

+2 marksOne correct option

Consider the Following Assertion and Reason pair :
Assertion : In Byte Pair Encoding (BPE), each merge operation adds exactly one new token to the vocabulary.
Reason : BPE helps reduce the size of the initial vocabulary by merging the most frequent tokens.

  1. A

    Both Assertion and Reason are true, and Reason is the correct explanation of Assertion.

  2. B

    Both Assertion and Reason are true, but Reason is not the correct explanation of Assertion.

  3. C

    Assertion is true, but Reason is false.

  4. D

    Assertion is false, but Reason is true.

Show answer

Correct answer

  • C

    Assertion is true, but Reason is false.

Question 4

+2 marksOne correct option

What is the primary advantage of T5’s text-to-text approach for transfer learning in NLP?

  1. A

    It reduces the computational cost of training models significantly.

  2. B

    It allows a single model and architecture to be applied to a wide variety of NLP tasks without modification.

  3. C

    It guarantees optimal performance on all tasks without fine-tuning.

  4. D

    It eliminates the need for any pre-training data.

Show answer

Correct answer

  • B

    It allows a single model and architecture to be applied to a wide variety of NLP tasks without modification.

Question 5

+2 marksOne correct option

What is the format of output the T5 model is expected to generate during its span-corruption pretraining?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 6

+3 marksOne correct option

Given the input string:

peanutbutter

And the following vocabulary of subword tokens with their corresponding log-probabilities:

SubwordLog-Probability (base ee)
pea-1.0
nut-0.8
but-1.2
ter-0.7
butter-1.0
peanut-0.5
t-2.0
er-1.5

Using the Viterbi algorithm (as used in the SentencePiece tokenizer), determine the most probable tokenization of the input string. The probability of a tokenized sequence is the sum of the log-probabilities of the selected subwords. Only subwords from the vocabulary may be used.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 7

+3 marksOne correct option

Suppose you are given 4x more compute budget to scale a Transformer-based language model. According to scaling laws, what is the best way to utilize this increased compute for optimal model performance?

  1. A

    Increase the model size (number of parameters) by 4x and keep the dataset size and training steps the same.

  2. B

    Train the same model on 4x more data for 4x more steps without changing the model size.

  3. C

    Increase the model size by approximately 2x and increase the amount of training data by approximately 2x.

  4. D

    Double the model size and halve the training data size to compensate.

Show answer

Correct answer

  • C

    Increase the model size by approximately 2x and increase the amount of training data by approximately 2x.

Question 8

+3 marksOne or more correct options

In a data preprocessing stage designed to prepare clean, diverse, and safe data, which of the following examples is likely to be filtered out?

Select all that apply.

  1. A

    “All people from that xyz area are thieves. They should be jailed immediately.”

  2. B

    Kavya’s PAN number is BDZPK1234K and her registered address is 17/4, Green Park, Delhi.

  3. C

    [“Reinforcement learning allows agents to learn optimal strategies through interaction with an environment.”, “Reinforcement learning allows agents to learn optimal strategies through interaction with an environment.”]

  4. D

    The Union Budget 2024 proposes increased spending on green energy infrastructure.

  5. E

    According to WHO, global life expectancy has increased by 6 years since 2000.

  6. F

    None of these.

Show answer

Correct answers

  • A

    “All people from that xyz area are thieves. They should be jailed immediately.”

  • B

    Kavya’s PAN number is BDZPK1234K and her registered address is 17/4, Green Park, Delhi.

  • C

    [“Reinforcement learning allows agents to learn optimal strategies through interaction with an environment.”, “Reinforcement learning allows agents to learn optimal strategies through interaction with an environment.”]

Question 9

+3 marksOne or more correct options

What are the key challenges encountered when building a vocabulary for NLP models?

Select all that apply.

  1. A

    A larger vocabulary leads to a bigger embedding matrix and increased softmax computation

  2. B

    Difficulty in handling out-of-vocabulary (OOV) words

  3. C

    The size of each embedding vector increases with the number of out-of- vocabulary (OOV) words

  4. D

    More vocabulary entries always guarantee better model generalization

Show answer

Correct answers

  • A

    A larger vocabulary leads to a bigger embedding matrix and increased softmax computation

  • B

    Difficulty in handling out-of-vocabulary (OOV) words

Question 10

+3 marksOne or more correct options

Select all the correct input-output representations used for different pretraining objectives based on the base sentence:
“The quick brown fox jumps over the lazy dog”

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • A
  • D

Question 11

+2 marksNumerical answer

In multi-task pretraining, tasks are sampled according to the Proportional Mixing Strategy:

rm=min⁡(em,K)∑n=1Nmin⁡(en,K)r_m = \frac{\min(e_m, K)}{\sum_{n=1}^{N} \min(e_n, K)}

where:

  • eme_m is the original number of examples in task mm,
  • Say we have N tasks and original number of samples in each task is ene_n where n∈(1,2,⋯ ,N)\mathrm{n} \in (1, 2, \cdots, \mathrm{N})
  • KK is the cap applied to all datasets.

Suppose you have two tasks:

  • Task A: e1=10,000e_1 = 10{,}000
  • Task B: e2=1,000,000e_2 = 1{,}000{,}000

What is the largest value of KK such that neither task has a sampling probability more than 50% (i.e. ≤0.5\leq 0.5)?

Show answer

Correct answer: 10000

Question 12

+3 marksNumerical answer

Consider the scaling law for pretraining test loss:

L(N,D)=(NNc)−αN+(DDc)−αDL(N, D) = \left(\frac{N}{N_c}\right)^{-\alpha_N} + \left(\frac{D}{D_c}\right)^{-\alpha_D}

L(N,D)=(A)−αN+(B)−αDL(N, D) = (A)^{-\alpha_N} + (B)^{-\alpha_D}

where A=NNc,B=DDcA = \frac{N}{N_c}, B = \frac{D}{D_c}

  • NN : the number of non-embedding parameters
  • DD : the size of the dataset (in tokens)
  • Nc=8.8×1013N_c = 8.8 \times 10^{13}
  • Dc=5.4×1013D_c = 5.4 \times 10^{13}
  • αN=0.076\alpha_N = 0.076
  • αD=0.095\alpha_D = 0.095

Assume A=2BA = 2B. What is the approximate ratio of the new loss after doubling NN and DD to the original loss i.e., L(2N,2D)L(N,D)\frac{L(2N, 2D)}{L(N, D)}? (Answer correct upto 3 digits after the decimal)

Show answer

Correct answer: 0.9445 (accepted within ±0.0305)

Question 13

+2 marksNumerical answer

Consider the following dictionary for the subword tokenization:

python
vocabulary = {
"gentler": 4,
"brighter": 5,
"crisper": 3
}

Append </w> to each word and consider it for all the calculations.

Based on the above data, answer the given subquestions.

Using Byte Pair Encoding (BPE), how many distinct tokens are there in the initial vocabulary before any merges are performed?

Show answer

Correct answer: 13

Question 14

+2 marksOne correct option

Consider the following dictionary for the subword tokenization:

python
vocabulary = {
"gentler": 4,
"brighter": 5,
"crisper": 3
}

Append </w> to each word and consider it for all the calculations.

Based on the above data, answer the given subquestions.

Which token pair has the lowest frequency before any merges in Byte Pair Encoding?

  1. A

    (‘b’, ‘r’)

  2. B

    (‘t’, ‘l’)

  3. C

    (‘p’, ‘e’)

  4. D

    (‘e’, ‘r’)

  5. E

    None of these

Show answer

Correct answer

  • C

    (‘p’, ‘e’)

Question 15

+2 marksNumerical answer

Consider the following dictionary for the subword tokenization:

python
vocabulary = {
"gentler": 4,
"brighter": 5,
"crisper": 3
}

Append </w> to each word and consider it for all the calculations.

Based on the above data, answer the given subquestions.

What is the frequency of the most frequent byte-pair before the first merge in Byte Pair Encoding?

Show answer

Correct answer: 12

Question 16

+2 marksNumerical answer

Consider the following dictionary for the subword tokenization:

python
vocabulary = {
"gentler": 4,
"brighter": 5,
"crisper": 3
}

Append </w> to each word and consider it for all the calculations.

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 4

Question 17

+2 marksOne correct option

Consider the following dictionary for the subword tokenization:

python
vocabulary = {
"gentler": 4,
"brighter": 5,
"crisper": 3
}

Append </w> to each word and consider it for all the calculations.

Based on the above data, answer the given subquestions.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B