uiz Space

September 2025 term · Large Language Models · BSDA5004

Large Language Models Quiz 2: 23 November 2025 (September 2025 term)

The IIT Madras BS Large Language Models (LLM) Quiz 2 paper sat on 23 Nov 2025, in the September 2025 term: 22 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.

Questions
22
Marks
50
Duration
120 min
Numerical
6
MCQ
14
MSQ
2

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 23 Nov 2025 NEW · No negative marking.

Question 1

+2 marksNumerical answer

A corpus containing the following five words is tokenized using WordPiece algorithm.

WordFrequency
play <w>< w >3
played <w>< w >2
pray <w>< w >1
prey <w>< w >5
reply <w>< w >4
Total15

Table 1: Word frequencies in the corpus before any merges

The initial character-level vocabulary is:

V0={‘p’,‘r’,‘l’,‘a’,‘y’,‘e’,‘d’,‘i’,‘n’,‘g’,<w>}.V_0 = \{\text{‘p’}, \text{‘r’}, \text{‘l’}, \text{‘a’}, \text{‘y’}, \text{‘e’}, \text{‘d’}, \text{‘i’}, \text{‘n’}, \text{‘g’}, < w >\}.

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0

Question 2

+2 marksNumerical answer

A corpus containing the following five words is tokenized using WordPiece algorithm.

WordFrequency
play <w>< w >3
played <w>< w >2
pray <w>< w >1
prey <w>< w >5
reply <w>< w >4
Total15

Table 1: Word frequencies in the corpus before any merges

The initial character-level vocabulary is:

V0={‘p’,‘r’,‘l’,‘a’,‘y’,‘e’,‘d’,‘i’,‘n’,‘g’,<w>}.V_0 = \{\text{‘p’}, \text{‘r’}, \text{‘l’}, \text{‘a’}, \text{‘y’}, \text{‘e’}, \text{‘d’}, \text{‘i’}, \text{‘n’}, \text{‘g’}, < w >\}.

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0.065 (accepted within ±0.005)

Question 3

+3 marksOne correct option

A corpus containing the following five words is tokenized using WordPiece algorithm.

WordFrequency
play <w>< w >3
played <w>< w >2
pray <w>< w >1
prey <w>< w >5
reply <w>< w >4
Total15

Table 1: Word frequencies in the corpus before any merges

The initial character-level vocabulary is:

V0={‘p’,‘r’,‘l’,‘a’,‘y’,‘e’,‘d’,‘i’,‘n’,‘g’,<w>}.V_0 = \{\text{‘p’}, \text{‘r’}, \text{‘l’}, \text{‘a’}, \text{‘y’}, \text{‘e’}, \text{‘d’}, \text{‘i’}, \text{‘n’}, \text{‘g’}, < w >\}.

Based on the above data, answer the given subquestions.

Which token will be generated in the first merge?

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

Correct answer

  • B

Question 4

+2 marksNumerical answer

A study is comparing three architectures, all trained with the same compute budget:
•
Model A (Encoder-Decoder): A 12-layer encoder and a 12-layer decoder with separate parameters. Its total size is 220 million parameters.
•
Model B (Decoder-Only): A 24-layer decoder-only model. Its total size is also approximately 220 million parameters.
•
Model C (Shared Enc-Dec): A 12-layer encoder and a 12-layer decoder where the parameters

are shared (
).
Assuming that the 12-layer encoder and 12-layer decoder in Model A have an equal number of parameters, what is the approximate total parameter count (in millions) of Model C?

Show answer

Correct answer: 110

Question 5

+2 marksNumerical answer

Consider a text corpus being processed using the Byte Pair Encoding (BPE) algorithm. The initial

vocabulary contains
tokens (representing characters), and the corpus contains a total of tokens.
During BPE training, the following merge operations are performed. Each merge combines all occurrences of a particular token pair into a single new token, reducing the total token count accordingly:
1.
Merge 1: Pair ('t', 'h') appears 24 times → merged into new token 'th'
2.
Merge 2: Pair ('i', 'n') appears 18 times → merged into new token 'in'
3.
Merge 3: Pair ('th', 'e') appears 10 times → merged into new token 'the'
4.
Merge 4: Pair ('i', 's') appears 8 times → merged into new token 'is'
What is the final total number of tokens in the corpus after all 4 merges are completed?

Show answer

Correct answer: 940

Question 6

+2 marksNumerical answer

If Byte-Pair Encoding (BPE) starts with
unique characters and performs
merge operations, what will be the final vocabulary size?

Show answer

Correct answer: 10100

Question 7

+2 marksNumerical answer

In a 4-token sequence, a Transformer is calculating the attention for the third Token. Its Query

vector (
) must be compared against the Key vectors (
) of all tokens. The Causal LM mask is applied to the raw scores before the softmax function. The raw dot-product scores are:

•

•

•

•
After the Causal LM mask and the subsequent softmax function are applied, what will be the final attention probability assigned to Token 4?

Show answer

Correct answer: 0

Question 8

+3 marksOne or more correct options

Which of the following is/are primarily multilingual datasets? Select all that apply.

Select all that apply.

  1. A

    Sangraha

  2. B

    DOLMA

  3. C

    BookCorpus

  4. D

    CommonCrawl

Show answer

Correct answers

  • A

    Sangraha

  • D

    CommonCrawl

Question 9

+2 marksOne or more correct options

Which decoding method ensures the same response every time for a given prompt (assuming no randomness in model weights)? Select all that apply.

Select all that apply.

  1. A

    Top-k with k = 3, temperature > 1

  2. B

    Top-k with k = 3, temperature = 1

  3. C

    Top-p with p = 0.2, Temperature > 1

  4. D

    Top-p with p = 0.2, Temperature = 1

  5. E

    Beam Search with beam-size = 5

  6. F

    Beam Search with beam-size = 1

Show answer

Correct answers

  • E

    Beam Search with beam-size = 5

  • F

    Beam Search with beam-size = 1

Question 10

+2 marksOne correct option

A data preprocessing pipeline removed data from the Common Crawl snapshot in three stages: 50% after language identification, 24% of the remaining after quality filtering, and 12% of what remained after deduplication. What percentage of the original Common Crawl snapshot remains in the final dataset? (Choose the closest number)

  1. A

    21%

  2. B

    66%

  3. C

    33%

  4. D

    50%

Show answer

Correct answer

  • C

    33%

Question 11

+3 marksOne correct option

A data preprocessing pipeline needs to apply the following steps on raw Common Crawl data: 1.
Fuzzy deduplication (using MinHash)
2.
Toxicity detection (using ML-based classifiers)
3.
PII removal (using regex patterns)
4.
Exact deduplication (using hash-based matching)
5.
Quality filtering (using several rule-based heuristics)
6.
URL Filtering
What is the most efficient sequence to apply these steps?

  1. A

    6
    4
    1
    5
    2
    3

  2. B

    1
    4
    2
    5
    3
    6

  3. C

    5
    6
    4
    1
    2
    3

  4. D

    4
    5
    6
    1
    3
    2

Show answer

Correct answer

  • A

    6
    4
    1
    5
    2
    3

Question 12

+4 marksOne correct option

Consider the following four pre-training scenarios for four different language models:

  • Model A: Given “The cat sat on the ___”, predict “mat” using both left and right context.
  • Model B: Given “The cat sat”, predict the next token “on”.
  • Model C: Given corrupted input “The <X> sat on <Y> mat” (where spans are masked), generate “cat … the”.
  • Model D: Given “<extra_id_0> cat sat <extra_id_1> mat”, generate “<extra_id_0> The <extra_id_1> on the”.

(Here, the symbols <X>, <Y>, and <extra_id_0>, <extra_id_1> represent different kinds of placeholder tokens used by some language models during pre-training.)

Match each scenario to the correct model:

  1. A

    A = BART, B = T5, C = BERT, D = GPT

  2. B

    A = T5, B = BERT, C = GPT, D = BART

  3. C

    A = BERT, B = GPT, C = BART, D = T5

  4. D

    A = BERT, B = BART, C = GPT, D = T5

Show answer

Correct answer

  • C

    A = BERT, B = GPT, C = BART, D = T5

Question 13

+2 marksOne correct option

Consider the scaling law:

where
= model parameters,
= training tokens,
= scale constants,
= scaling exponents.
A team trains an LLM and observes the following losses for their model:
1.
Training Loss
2.
Test Loss (same distribution as training)
3.
Test Loss (different distribution from training)

Which loss does
represent?

  1. A

    Both 2 and 3

  2. B

    Both 1 and 2

  3. C

    1 only

  4. D

    2 only

Show answer

Correct answer

  • D

    2 only

Question 14

+3 marksOne correct option

A company is building a sentiment analysis system for customer reviews. They have two options: Option A: Fine-tune BERT for sentiment classification
Option B: Fine-tune BART for sentiment classification
Their requirements are:
•
Process 10,000 reviews per minute
•
Deploy on cost-effective cloud instances (memory-constrained)
•
Simple positive/negative/neutral classification
•
No need for explanations or text generation
Which statement best describes the trade-offs they should consider?

  1. A

    BART is expected to provide significantly better accuracy and is worth the extra computational cost since it's pre-trained on more diverse corruption tasks.

  2. B

    BART is better because its decoder can verify the encoder's sentiment understanding, providing a built-in validation mechanism that improves robustness.

  3. C

    They should use BART's encoder only and discard the decoder, which will give them the same efficiency as BERT with better pre-training.

  4. D

    BERT is more suitable because sentiment classification only requires understanding (encoding), not generation (decoding), making it faster and more memory-efficient without sacrificing accuracy.

Show answer

Correct answer

  • D

    BERT is more suitable because sentiment classification only requires understanding (encoding), not generation (decoding), making it faster and more memory-efficient without sacrificing accuracy.

Question 15

+2 marksOne correct option

Which of the following statements best describes the fundamental difference between the unsupervised pre-training objective used in T5 (span corruption) and its supervised fine-tuning objectives such as translation or summarization?

  1. A

    The pre-training objective is a denoising task, while the fine-tuning objective is a Causal Language Model (CLM) task.

  2. B

    There is no fundamental difference; both are treated as "text-to-text" tasks, where the model is trained to generate a target sequence given an input sequence.

  3. C

    The pre-training objective trains the model to fill in [MASK] tokens, while the fine-tuning objective trains the model to generate text from a [CLS] token.

  4. D

    The pre-training objective trains the entire encoder-decoder, while the fine- tuning objective freezes the encoder and only trains the decoder.

Show answer

Correct answer

  • B

    There is no fundamental difference; both are treated as "text-to-text" tasks, where the model is trained to generate a target sequence given an input sequence.

Question 16

+2 marksOne correct option

An original document is:

“The quick brown fox jumps over the lazy dog.”

A corrupted input for pre-training is: “The quick <X> fox <Y> over the lazy dog.”

Assuming a T5-style Span Corruption, what is the exact target sequence the decoder is trained to generate?

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

Correct answer

  • C

Question 17

+2 marksOne correct option

A Transformer model is designed to handle both understanding and generation tasks. When given

the input sequence
, its attention mask allows the following:

•
When processing
or
, the model can see both
and
.

•
When processing
, the model can see
and
but not
.
This attention scheme is the defining characteristic of which training objective?

  1. A

    Causal Language Modeling (CLM)

  2. B

    Masked Language Modeling (MLM)

  3. C

    Denoising Objective (like BART)

  4. D

    Prefix Language Modeling (Prefix-LM)

Show answer

Correct answer

  • D

    Prefix Language Modeling (Prefix-LM)

Question 18

+2 marksOne correct option

BART is an encoder-decoder model. During its denoising pre-training, what is fed as input to the decoder?

  1. A

    The corrupted text from the encoder.

  2. B

    The original, uncorrupted text (shifted right by one token).

  3. C

    A sequence of [MASK] tokens, one for each original word.

  4. D

    Nothing; the decoder starts with only the < s > token.

Show answer

Correct answer

  • B

    The original, uncorrupted text (shifted right by one token).

Question 19

+2 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 20

+2 marksOne correct option

How does SentencePiece handle whitespace characters (like spaces) during tokenization?

  1. A

    It only keeps whitespace that appears next to punctuation marks.

  2. B

    It discards all whitespace as a pre-processing step.

  3. C

    It replaces all whitespace with a special [SPACE] token.

  4. D

    It treats whitespace as part of the text stream and encodes it, often using a

    symbol like
    (underscore).

Show answer

Correct answer

  • D

    It treats whitespace as part of the text stream and encodes it, often using a

    symbol like
    (underscore).

Question 21

+2 marksOne correct option

For a layer with
features, how many learnable parameters do BatchNorm and LayerNorm have?

  1. A

    BatchNorm: 512, LayerNorm: 512

  2. B

    BatchNorm: 1024, LayerNorm: 512

  3. C

    BatchNorm: 512, LayerNorm: 1024

  4. D

    BatchNorm: 1024, LayerNorm: 1024

Show answer

Correct answer

  • D

    BatchNorm: 1024, LayerNorm: 1024

Question 22

+2 marksOne correct option

In a standard Encoder-Decoder Transformer, where do the Query
, Key
, and Value inputs for the Decoder's Cross-Attention sub-layer come from?

  1. A

    comes from the decoder's previous sub-layer;
    and
    come from the final hidden states of the encoder.

  2. B

    comes from the final hidden states of the encoder;
    and
    come from the decoder's previous sub-layer.

  3. C

    ,
    , and
    all come from the final hidden states of the encoder.

  4. D

    ,
    , and
    all come from the decoder's previous sub-layer.

Show answer

Correct answer

  • A

    comes from the decoder's previous sub-layer;
    and
    come from the final hidden states of the encoder.