Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Large Language Models
End Term · 31 Aug 2025 (Forenoon)
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

- A

- B

- C

- D

- A
- Q2MCQ2 Marks·Choose one option

- A

- B

- C

- D

- A
- Q3MSQ3 Marks·Choose all correct options
Which of the following statements about subword tokenizers (e.g., Byte Pair Encoding, SentencePiece) is true?
- AThey always split words into individual characters.
- BThey help handle rare words by breaking them into smaller units.
- CThey require the vocabulary to contain every possible word in the language.
- DThey can reduce the overall vocabulary size compared to word-level tokenizers.
- Q4MSQ3 Marks·Choose all correct options
A GPT-based model is fine-tuned for story generation. During evaluation, you test different decoding strategies on the same prompt: 1. Method A: Every run produces the exact same story, even when executed multiple times. 2. Method B: The story changes slightly in each run, but overall structure and key events remain similar. 3. Method C: The story is wildly different each time, sometimes even changing the genre. Based on the observations, select the most likely decoding strategies for each method:
- AMethod A: Greedy decoding
- BMethod A: Top-K sampling with K = 50
- CMethod B: Top-P sampling with p = 0.9
- DMethod C: Top-P sampling with p = 0.5 and high temperature T = 1.5
- EMethod C: Beam search with K = 5
- Q5MSQ3 Marks·Choose all correct options
Which of the following are valid design choices when building a transformer-based language model?
- ANumber of transformer layers
- BLearning rate schedule
- CFont style of the source code
- DVocabulary size
- EType of normalization (e.g., LayerNorm)
- Q6MSQ3 Marks·Choose all correct options
Which of the following statements about Top-k and Nucleus (Top-p) sampling are correct?
- ATop-k keeps only the k most probable tokens before sampling.
- BTop-p dynamically chooses the smallest set of tokens whose cumulative probability exceeds p.
- CTop-k is always a subset of Top-p.
- DTop-p always has a fixed number of candidate tokens.
- Q7MSQ3 Marks·Choose all correct options
Which of the following preprocessing steps are commonly required when preparing data for transformer models like BERT?
- ALowercasing text (for uncased models)
- BSplitting into subword units using BPE or WordPiece
- CRemoving all punctuation marks
- DAdding position indices for each token
- Q8NAT3 Marks·Write the number
Your answer: Read the passage below, then answer Q9–Q10
Q9NAT3 Marks·Write the numberFor the input “you enjoy tea often”, compute the final representation of the word “tea” after the attention layer (i.e., after applying W_Q, W_K, W_V , attention weights, and W_O). Enter the sum of the elements in the resulting vector.
Your answer:- Q10NAT2 Marks·Write the number
Suppose the input sentence is “tea you enjoy often”. Using the same matrices and processing method, what is the attention score (i.e., softmax entry from A) for the query word “tea” attending to key word “often”?
Your answer: Read the passage below, then answer Q11–Q13
Q11MCQ2 Marks·Choose one option
- A

- B

- C

- D

- A
- Q12NAT1 Mark·Write the number
Your answer: - Q13NAT2 Marks·Write the number
What percentage of entries in the attention matrix are zero (i.e., the sparsity)?
Your answer: Read the passage below, then answer Q14–Q17

Based on the above data, answer the given subquestions.
Q14MCQ1 Mark·Choose one option
- A(0, 1, 2, 3, 4)
- B(-1, 0, 1, 2, 3)
- C(-2, -1, 0, 1, 2)
- D(-3, -2, -1, 0, 1)
- Q15MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q16NAT3 Marks·Write the number
Your answer: - Q17NAT3 Marks·Write the number
Your answer: