uiz Space

May 2026 term · Large Language Models · BSDA5004

Large Language Models Quiz 1: 19 July 2026 (May 2026 term)

The IIT Madras BS Large Language Models (LLM) Quiz 1 paper sat on 19 Jul 2026, in the May 2026 term: 16 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
16
Marks
50
Duration
120 min
MSQ
2
Numerical
11
MCQ
3

Updated

Official paper: Large Language Models 16 Jul 26 · No negative marking.

Question 1

+4 marksOne or more correct options

Which statements are true about traditional attention used in sequence-to-sequence models?

Select all that apply.

  1. A

    The decoder decides which encoder states are important.

  2. B

    Attention weights are computed over all decoder hidden states.

  3. C

    The context vector is a weighted sum of encoder states.

  4. D

    Encoder hidden states are ignored after encoding.

Show answer

Correct answers

  • A

    The decoder decides which encoder states are important.

  • C

    The context vector is a weighted sum of encoder states.

Question 2

+3 marksNumerical answer

The query, key, and value projection matrices are given by:

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 4

Question 3

+3 marksOne correct option

The query, key, and value projection matrices are given by:

Based on the above data, answer the given subquestions.

Choose the token pair with the least attention score.

  1. A

    {"learn", "easy"}

  2. B

    {"learn", "math"}

  3. C

    {"easy", "math"}

  4. D

    {"learn", "learn"}

  5. E

    {"easy" , "easy"}

Show answer

Correct answer

  • A

    {"learn", "easy"}

Question 4

+4 marksNumerical answer

A Transformer model processes a sequence containing 6 tokens using Multi-Head Attention. The model initially uses 4 attention heads. If the number of attention heads is doubled to 8, while the sequence length remains unchanged, how many additional attention scores are computed across all heads?

Show answer

Correct answer: 144

Question 5

+4 marksNumerical answer
Show answer

Correct answer: 32768

Question 6

+4 marksNumerical answer
Show answer

Correct answer: 8128

Question 7

+4 marksNumerical answer
Show answer

Correct answer: 256

Question 8

+4 marksOne correct option

Consider the following statements regarding the use of Teacher Forcing while training autoregressive sequence-to-sequence models and select the appropriate option:
Statement 1: Teacher Forcing involves passing the input token to a larger Teacher model whose output is then input as the next token Statement 2: Teacher Forcing helps to prevent compounding of early incorrect predictions that can destabilize training

  1. A

    Statement 1 is True but Statement 2 is False

  2. B

    Statement 1 is False but Statement 2 is True

  3. C

    Both the statements are True

  4. D

    Both the statements are False

Show answer

Correct answer

  • B

    Statement 1 is False but Statement 2 is True

Question 9

+3 marksNumerical answer

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0.18 (accepted within ±0.01)

Question 10

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Choose the option corresponding to the sentence with the highest joint probability under the given language model.

  1. A

    "i eat apples"

  2. B

    "apples like You"

  3. C

    "i eat bananas"

  4. D

    "you like bananas

  5. E

    "you like apples

Show answer

Correct answer

  • C

    "i eat bananas"

Question 11

+2 marksNumerical answer

Based on the above data, answer the given subquestions.

Using the given probability tree calculate the conditional probability of predicting "apples" given "like" [i.e P(apples | like)]. (Submit -1 if the provided information is insufficient)

Show answer

Correct answer: -1

Question 12

+3 marksOne or more correct options

Which of the following are components found within a GPT decoder layer?

Select all that apply.

  1. A

    Causal (Masked) Multi-Head Self-Attention

  2. B

    Position-wise Feed-Forward Network

  3. C

    Multi Head (Cross) Attention

  4. D

    Recurrent Neural Network (RNN) Layer

  5. E

    Add & Norm Layer

Show answer

Correct answers

  • A

    Causal (Masked) Multi-Head Self-Attention

  • B

    Position-wise Feed-Forward Network

  • E

    Add & Norm Layer

Question 13

+2 marksNumerical answer

The table below represents the conditional probability distribution over the vocabulary. Each column corresponds to a decoding timestep and the values represent the conditional probability of selecting a token at the timestep given the previously generated tokens

For all calculations, consider only the tokens mentioned in the first column as the Vocabulary
Based on the above data, answer the given subquestions.

Use greedy decoding to determine the most likely sequence of 6 tokens and compute the probability of generating that sequence. Enter the value rounded off to 3 decimal places

Show answer

Correct answer: 0.00475 (accepted within ±0.00075)

Question 14

+2 marksNumerical answer

The table below represents the conditional probability distribution over the vocabulary. Each column corresponds to a decoding timestep and the values represent the conditional probability of selecting a token at the timestep given the previously generated tokens

For all calculations, consider only the tokens mentioned in the first column as the Vocabulary
Based on the above data, answer the given subquestions.

Use exhaustive search strategy to identify the most probable sequence consisting of 4 tokens. How many decoder runs are required in total to identify the most probable sequence containing 4 tokens?

Show answer

Correct answer: 400

Question 15

+3 marksNumerical answer

The table below represents the conditional probability distribution over the vocabulary. Each column corresponds to a decoding timestep and the values represent the conditional probability of selecting a token at the timestep given the previously generated tokens

For all calculations, consider only the tokens mentioned in the first column as the Vocabulary
Based on the above data, answer the given subquestions.

Use Top-k sampling at timestep t = 4 and k = 3. Compute the renormalized probability of the most probable token from the candidate tokens and enter the value rounded off to three decimal places

Show answer

Correct answer: 0.412 (accepted within ±0.002)

Question 16

+2 marksNumerical answer

The table below represents the conditional probability distribution over the vocabulary. Each column corresponds to a decoding timestep and the values represent the conditional probability of selecting a token at the timestep given the previously generated tokens

For all calculations, consider only the tokens mentioned in the first column as the Vocabulary
Based on the above data, answer the given subquestions.

Consider the sequence "the castle was abandoned". What is the minimum beam width required to guarantee that this sequence is retained during beam search at timestep t = 4 ?

Show answer

Correct answer: 5