Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Large Language Models
Decoding strategies & teacher forcing
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.
Quiz 1 · 26 Oct 2025 (AN)Quiz 1
- Q1MCQ2 Marks·Choose one option

- A‘content’
- B‘je’
- C‘suis’
- D‘heureux’
- Q2MCQ2 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.
- Q3MCQ2 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ3 Marks·Choose one option

- A

- B

- C

- D

- E

- A
- Q5MCQ3 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
- Q6MSQ2 Marks·Choose all correct options
Which of the following decoding strategies is/are inherently non-deterministic?
- ABeam
- BGreedy
- CNucleus
- DExhaustive
- Q7MSQ4 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.
Read the passage below, then answer Q8
Q8MSQ2 Marks·Choose all correct optionsDuring 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.
End Term · 31 Aug 2025 (FN)End Term
- Q9MSQ3 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
- Q10MSQ3 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.
- Q11NAT3 Marks·Write the number
Your answer:
End Term · 31 Aug 2025 (AN)End Term
- Q12NAT2 Marks·Write the number
Your answer: