Quiz Space

Large Language Models · Quiz 1 · 25 Feb 2024 · January 2024 term

Question 2: Consider a vocabulary \mathcal{V} = (A, T, C, G) and the …

Question 2

+2 marksNumerical answer

Consider a vocabulary V=(A,T,C,G)\mathcal{V} = (A, T, C, G) and the corresponding embedding matrix E=[10011−111]E = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 1 & -1 \\ 1 & 1 \end{bmatrix}. For example, the 0−th0 - th row of EE is the embedding for 0−th0 - th token of V\mathcal{V} and so on. The following sequence X=(G,C,C,T,A,G)X = (G, C, C, T, A, G) is to be processed by the encoder layer of the transformer architecture by appropriately adding the positional information using the following encoding scheme

P(pos,2i)=sin(pos10(2i/dmodel))P(pos, 2i) = sin\left(\frac{pos}{10^{(2i/dmodel)}}\right)

P(pos,2i+1)=cos(pos10(2i/dmodel))P(pos, 2i+1) = cos\left(\frac{pos}{10^{(2i/dmodel)}}\right)

Assume the index for the position starts from zero. Add positional information to all the tokens in the sequence. Let the resultant sequence be denoted by H=E(X)+PH = E(X) + P, (HH will be used in the subsequent questions,please write it down).Here, E(X)E(X) denotes the embedding for each token in XX

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0.165 (accepted within ±0.035)

Question 2 of 15 in the IIT Madras BS Large Language Models (LLM) Quiz 1 paper sat on 25 Feb 2024, in the January 2024 term (IIT M DEGREE AN2 EXAM QDB2 25 Feb 2024). It carries 2 marks.

More questions from this paper

  1. Q1Consider a vocabulary \mathcal{V} = (A, T, C, G) and the corresponding embedding matrix E = \begin{bmatrix} 1 & 0 \ 0 &…
  2. Q3Consider a vocabulary \mathcal{V} = (A, T, C, G) and the corresponding embedding matrix E = \begin{bmatrix} 1 & 0 \ 0 &…
  3. Q4Consider a vocabulary \mathcal{V} = (A, T, C, G) and the corresponding embedding matrix E = \begin{bmatrix} 1 & 0 \ 0 &…
  4. Q5Consider the following configuration for the Vannila transformer architecture with one encoder layer and one decoder la…
  5. Q6Consider the following configuration for the Vannila transformer architecture with one encoder layer and one decoder la…
  6. Q7Figure question
  7. Q8Suppose we run the pre-trained GPT model in an autoregressive fashion for generating a text sequence. Then, the stateme…
  8. Q9Suppose we have a dataset for machine translation tasks with thousands of samples. Suppose a team considers training th…
  9. Q10A team trained a Language model using the GPT architecture using a large corpus of text. The model configurations are g…
  10. Q11Choose the correct statements
  11. Q12Figure question
  12. Q13Consider a GPT model used for Causal language modelling. We feed the input sentence “This is a cool idea” to the model …
  13. Q14Consider a GPT model used for Causal language modelling. We feed the input sentence “This is a cool idea” to the model …
  14. Q15The statement that “the Next Sentence Prediction (NSP) task requires the BERT model to run autoregressively given the f…