Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Large Language Models
Positional encodings: relative & ALiBi
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
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).
End Term · 31 Aug 2025 (FN)End Term
Read the passage below, then answer Q2–Q5

Based on the above data, answer the given subquestions.
Q2MCQ1 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)
- Q3MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q4NAT3 Marks·Write the number
Your answer: - Q5NAT3 Marks·Write the number
Your answer:
End Term · 31 Aug 2025 (AN)End Term
- Q6MSQ3 Marks·Choose all correct options
In Transformer models that use relative position embeddings (such as in Transformer-XL or T5), clipping is often applied to the relative position indices. Which of the following statements about clipping in relative position embeddings are correct?
- AClipping ensures that very large relative distances are mapped to a fixed maximum distance.
- BWithout clipping, the model would require embeddings for every possible relative distance, which is infeasible for long sequences.
- CClipping increases the precision of embeddings for large relative distances.
- DClipping introduces an upper bound k such that all distances greater than k are mapped to the same index.
Read the passage below, then answer Q7–Q11

Based on the above data, answer the given subquestions.
Q7MCQ2 Marks·Choose one option
- A(0, 1, 2, 3, 4, 5)
- B(-1, 0, 1, 2, 3, 4)
- C(-3, -2, -1, 0, 1, 2)
- D(-2, -1, 0, 1, 2, 3)
- Q8MCQ2 Marks·Choose one option

- A[−0.4,−0.4,−0.4,−0.4]
- B[−0.1,−0.1,−0.1,−0.1]
- C[−0.8,−0.8,−0.8,−0.8]
- D[−0.2,−0.2,−0.2,−0.2]
- Q9NAT3 Marks·Write the number
Your answer: - Q10NAT2 Marks·Write the number
Your answer: - Q11NAT3 Marks·Write the number
Your answer: