uiz Space

January 2026 term · Large Language Models · BSDA5004

Large Language Models End Term: 10 May 2026 (January 2026 term)

The IIT Madras BS Large Language Models (LLM) End Term paper sat on 10 May 2026, in the January 2026 term: 20 questions for 50 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
20
Marks
50
Duration
180 min
MCQ
10
MSQ
5
Numerical
5

Updated

Official paper: Large Language Models 10 May 26 · No negative marking.

Question 1

+2 marksOne correct option

In the standard Transformer Decoder, the Multi-Head Attention layer is "Masked". What is the specific purpose of this mask during training?

  1. A

    To filter out padding tokens to save computation.

  2. B

    To prevent the model from attending to the [CLS] and [SEP] special tokens.

  3. C
  4. D

    To force the model to focus on the Encoder output rather than the Decoder input.

Show answer

Correct answer

  • C

Question 2

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

Correct answer

  • B

Question 3

+2 marksOne correct option
  1. A

    It has a limited receptive field and cannot capture long-range dependencies directly.

  2. B

    It requires more memory than full attention.

  3. C

    It cannot be parallelized on GPUs.

  4. D

    It causes the gradients to explode.

Show answer

Correct answer

  • A

    It has a limited receptive field and cannot capture long-range dependencies directly.

Question 4

+2 marksOne correct option

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?

  1. A

    Attention scores remain numerically well-shaped because ALiBi biases scale linearly with distance, not with a fixed maximum length.

  2. B

    The model cannot compute positional information beyond 128 because ALiBi stores one embedding per absolute position up to 128 only.

  3. C

    ALiBi attention becomes undefined for positions beyond 128 because its biases require precomputed lookup tables that stop at 128.

  4. D

    Attention scores collapse to near zero for distant positions because ALiBi uses fixed sinusoidal patterns tied to the original length 128.

Show answer

Correct answer

  • A

    Attention scores remain numerically well-shaped because ALiBi biases scale linearly with distance, not with a fixed maximum length.

Question 5

+3 marksOne or more correct options

Based on the BERT pre-training phase, select all correct constraints and properties regarding the input data.

Select all that apply.

  1. A

    The maximum context length (sequence length) supported is 512 tokens.

  2. B

    The input text must be contiguous (long-range contiguous text), meaning sentences are not shuffled randomly.

  3. C

    The vocabulary is built using BPE encoding.

  4. D
Show answer

Correct answers

  • A

    The maximum context length (sequence length) supported is 512 tokens.

  • B

    The input text must be contiguous (long-range contiguous text), meaning sentences are not shuffled randomly.

  • D

Question 6

+3 marksOne or more correct options

Select the statements that correctly distinguish fine-tuning from zero-shot prompting for GPT-style models.

Select all that apply.

  1. A

    In Fine-Tuning, the weights of the pre-trained model (and often a new specific head) are updated using backpropagation on a labeled dataset.

  2. B

    In Zero-Shot Prompting, the model weights are frozen (not updated); the task is formulated purely through the design of the input text (prompt).

  3. C

    Zero-Shot Prompting generally achieves higher accuracy than Fine-Tuning when abundant labeled data is available.

  4. D

    Fine-Tuning typically requires a task-specific output layer (like a linear classifier), whereas Zero-Shot Prompting relies on the model generating text directly.

Show answer

Correct answers

  • A

    In Fine-Tuning, the weights of the pre-trained model (and often a new specific head) are updated using backpropagation on a labeled dataset.

  • B

    In Zero-Shot Prompting, the model weights are frozen (not updated); the task is formulated purely through the design of the input text (prompt).

  • D

    Fine-Tuning typically requires a task-specific output layer (like a linear classifier), whereas Zero-Shot Prompting relies on the model generating text directly.

Question 7

+2 marksNumerical answer
Show answer

Correct answer: 3

Question 8

+2 marksNumerical answer
Show answer

Correct answer: 1048 (accepted within ±2)

Question 9

+2 marksNumerical answer
Show answer

Correct answer: 4

Question 10

+3 marksNumerical answer

Suppose a language model outputs the following logits for a vocabulary of size 4:

Show answer

Correct answer: 0.46 (accepted within ±0.03)

Question 11

+3 marksNumerical answer
Show answer

Correct answer: 640000

Question 12

+3 marksOne correct option

Adapter Layers are a parameter-efficient fine-tuning strategy. Where are these layers typically inserted within a Transformer block?

  1. A

    Before the Self-Attention mechanism only.

  2. B

    After the Feed-Forward Network (FFN) block and/or after the Self-Attention block.

  3. C

    Replacing the Layer Normalization parameters.

  4. D

    In parallel to the main residual connection.

Show answer

Correct answer

  • B

    After the Feed-Forward Network (FFN) block and/or after the Self-Attention block.

Question 13

+3 marksOne correct option

Why do standard LLM architectures include explicit Positional Encodings (like RoPE or Sinusoidal) despite the causal mask providing some implicit order?

  1. A
  2. B

    To ensure that the model can only attend to future tokens.

  3. C

    To provide a strong inductive bias that allows the model to learn structural and distance-based relationships more efficiently than relying on masking alone.

  4. D

    To fix a mathematical error in the original Dot-Product Attention formula.

Show answer

Correct answer

  • C

    To provide a strong inductive bias that allows the model to learn structural and distance-based relationships more efficiently than relying on masking alone.

Question 14

+3 marksOne correct option
  1. A

    1 Key/Value head (same as MQA).

  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 15

+3 marksOne correct option

Consider Multi-Query Attention (MQA). How does its architecture differ from standard Multi-Head Attention (MHA) to improve inference efficiency?

  1. A

    It uses multiple query heads but only a single attention head.

  2. B

    It maintains multiple Query heads but shares a single Key and Value head across all Query heads.

  3. C

    It quantizes the Query vectors to 4 bits.

  4. D

    It removes the Value vectors entirely and uses Keys as Values.

Show answer

Correct answer

  • B

    It maintains multiple Query heads but shares a single Key and Value head across all Query heads.

Question 16

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

Correct answer

  • C

Question 17

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

Correct answer

  • D

Question 18

+2 marksOne or more correct options

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?

Select all that apply.

  1. A

    In gradual unfreezing, layers are progressively unfrozen starting from the task-specific (top) layers toward the input (bottom) layers.

  2. B

    Multi-task learning in T5 typically improves performance uniformly across all tasks.

  3. C

    Multi-task pre-training (as used in T5) followed by task-specific fine-tuning often performs better than relying on multi-task learning alone.

  4. D

    Gradual unfreezing can help mitigate catastrophic forgetting of pre-trained representations during T5 fine-tuning.

Show answer

Correct answers

  • A

    In gradual unfreezing, layers are progressively unfrozen starting from the task-specific (top) layers toward the input (bottom) layers.

  • B

    Multi-task learning in T5 typically improves performance uniformly across all tasks.

  • D

    Gradual unfreezing can help mitigate catastrophic forgetting of pre-trained representations during T5 fine-tuning.

Question 19

+2 marksOne or more correct options

Select all correct statements regarding Local Attention Variants (like Sparse, Dilated, or Windowed Attention).

Select all that apply.

  1. A

    Many local attention variants reduce complexity toward linear with sequence length.

  2. B

    They always outperform full attention on all tasks, regardless of sequence length.

  3. C

    Stacking multiple layers of local attention increases the effective receptive field, similar to dilated convolutions in CNNs.

  4. D

    They can be combined with global tokens (e.g., in BigBird) to ensure some tokens can attend to the entire sequence.

Show answer

Correct answers

  • A

    Many local attention variants reduce complexity toward linear with sequence length.

  • C

    Stacking multiple layers of local attention increases the effective receptive field, similar to dilated convolutions in CNNs.

  • D

    They can be combined with global tokens (e.g., in BigBird) to ensure some tokens can attend to the entire sequence.

Question 20

+2 marksOne or more correct options

Which of the following techniques are used in Flash Attention to speed up attention computation and save memory?

Select all that apply.

  1. A

    Tiling: Breaking the large matrices into smaller blocks that fit into the fast SRAM.

  2. B

    Recomputation: Recomputing the attention matrix during the backward pass instead of storing it in HBM.

  3. C

    Approximation: Using a low-rank approximation of the attention matrix to avoid exact calculation.

  4. D

    Kernel Fusion: Fusing multiple operations (MatMul, Mask, Softmax, Dropout) into a single kernel to reduce memory reads/writes.

Show answer

Correct answers

  • A

    Tiling: Breaking the large matrices into smaller blocks that fit into the fast SRAM.

  • B

    Recomputation: Recomputing the attention matrix during the backward pass instead of storing it in HBM.

  • D

    Kernel Fusion: Fusing multiple operations (MatMul, Mask, Softmax, Dropout) into a single kernel to reduce memory reads/writes.