Learn Before
Extracting a Context Window from a Token Matrix
An engineer is processing the sentence 'The quick brown fox jumps over the lazy dog'. Each word is converted into a row vector and stored in a matrix , where the vectors are indexed from 1 to 9 corresponding to their position in the sentence. The engineer needs to extract a context window of size 3 for the target word 'jumps'. This window must include the target word and the two words that come just before it. What is the correct slice notation to select this specific sub-matrix from ? Explain your reasoning.
0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Application in Bloom's Taxonomy
Cognitive Psychology
Psychology
Social Science
Empirical Science
Science
Related
Key Matrix from a Sliding Window
Consider a matrix that contains 10 row vectors, indexed from 1 to 10 (i.e., ). The notation is used to select a sub-matrix by vertically stacking the row vectors from index to index , inclusive. Which of the following sub-matrices correctly represents ?
The notation is used to select a slice of row vectors from a larger matrix . This slice contains a total of ____ row vectors.
Extracting a Context Window from a Token Matrix