Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Large Language Models
Quiz 1 · 26 Oct 2025 (Afternoon)
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ2 Marks·Choose one option

- ATo increase the numerical precision of the attention scores.
- BTo reduce the overall computational cost of the attention mechanism.
- CTo ensure that the sum of the attention scores for each query equals 1.
- DTo avoid numerical issues and loss of gradients during training.
- Q2MCQ2 Marks·Choose one option
Which of the following is true regarding sinusoidal encoding?
- AThe encoding vector of words present at even positions in the given text sequence uses sine, and the encoding vector of words present at odd positions uses cosine.
- BThe encoding vector of words present at odd positions in the given text sequence uses sine, and the encoding vector of words present at even positions uses cosine.
- CThe encoding vector for each word position contains values computed using both sine (for even dimensions) and cosine (for odd dimensions).
- Q3MCQ2 Marks·Choose one option

- A‘content’
- B‘je’
- C‘suis’
- D‘heureux’
- Q4MCQ2 Marks·Choose one option

- A

- B

- C

- D

- E

- A
- Q5MCQ2 Marks·Choose one option
In the context of language model training, teacher forcing is a technique where:
- AThe correct target tokens from the training data are used as input for the next time step, regardless of the model’s prediction.
- BThe model’s predictions are used as the input for the next time step, even if they are incorrect.
- CThe model is forced to learn without any pre-trained weights.
- DThe model is forced to correct the input data.
- Q6MCQ2 Marks·Choose one option

- A

- B

- C

- D

- A
- Q7MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q8MCQ3 Marks·Choose one option

- A

- B

- C

- D

- E

- A
- Q9MCQ3 Marks·Choose one option
For a vocabulary size of 10, how many beams will there be in greedy search, beam search with beam size 3, and exhaustive search at step 1 and step 3, respectively?
- AStep 1: Greedy: 1, Beam: 1, Exhaustive: 1 Step 3: Greedy: 1, Beam: 1, Exhaustive: 1
- BStep 1: Greedy: 1, Beam: 3, Exhaustive: 10 Step 3: Greedy: 1, Beam: 3, Exhaustive: 10
- CStep 1: Greedy: 1, Beam: 3, Exhaustive: 1 Step 3: Greedy: 1, Beam: 3, Exhaustive: 100
- DStep 1: Greedy: 1, Beam: 3, Exhaustive: 10 Step 3: Greedy: 1, Beam: 3, Exhaustive: 1000
- Q10MSQ2 Marks·Choose all correct options
Which of the following decoding strategies is/are inherently non-deterministic?
- ABeam
- BGreedy
- CNucleus
- DExhaustive
- Q11MSQ2 Marks·Choose all correct options
Which of the following statements about multiple attention heads in a Transformer are true?
- AThey allow learning diverse local/global relations.
- BThey reduce memory usage compared to one head.
- CIncreasing the number of heads while keeping d_(model) fixed, decreases the dimensionality handled by each head.
- DAll heads necessarily learn completely independent information about the input.
- Q12MSQ4 Marks·Choose all correct options
Which of the following statements about the Transformer architecture are true?
- AMasking (look-ahead mask) is applied in every decoder self-attention layer, not just the first one.
- BToken embeddings are used in the encoder but not in the decoder.
- CPositional encoding is required only in the encoder, not in the decoder.
- DToken embeddings are used in both the encoder and the decoder.
- EPositional encodings are added to the input embeddings in both the encoder and the decoder.
- Q13MSQ4 Marks·Choose all correct options

- ABeam search with beam size 2 will keep either A or B as per probability whereas Top-2 sampling will keep both A and B.
- BBeam search with beam size 2 will keep both A and B whereas Top-2 sampling will keep either A or B.
- CBeam search with beam size 2 will randomly choose any two tokens, whereas Top-2 sampling will always pick the two least probable tokens.
- DBeam search with beam size 2 will always keep the top-2 most probable tokens, whereas Top-2 sampling will restrict choices to top-2 tokens and then sample one probabilistically.
- Q14NAT3 Marks·Write the number
Your answer: - Q15NAT3 Marks·Write the number
Your answer: - Q16NAT2 Marks·Write the number
Your answer: Read the passage below, then answer Q17–Q20
Q17NAT3 Marks·Write the numberHow many next-token prediction targets are generated during training a full batch?
Your answer:- Q18NAT2 Marks·Write the number
For one sequence, how many non-zero attention scores remain in the masked attention score matrix (per head)?
Your answer: - Q19NAT2 Marks·Write the number
Your answer: - Q20MSQ2 Marks·Choose all correct options
During autoregressive inference with GPT:
- AThe model can generate all tokens in parallel.
- BEach new token is generated conditioned on previously generated tokens.
- CTeacher forcing is used to stabilize outputs.
- DBeam search or other decoding strategies are commonly used to decide the next token.