Learn Before
Segment Embedding
A segment embedding, denoted as , is a new type of embedding that specifies whether a token belongs to the first sentence, , or the second sentence, . It is used alongside the regular token embedding and positional embedding to help the model distinguish between sentences.
0
1
Tags
Ch.1 Pre-training - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
A researcher is debugging a language model where the input representation for each token is created by summing three distinct vectors: one for the token's identity, one for its position in the sequence, and one for the sentence segment it belongs to. The researcher observes that the model treats the sentences 'The scientist observed the star' and 'The star observed the scientist' as having identical meanings. Which of the three component vectors is most likely being calculated incorrectly or omitted, causing this specific error?
In a language model that uses separate vectors for token identity, position, and sentence membership, the final input vector for a token is created by concatenating these three component vectors end-to-end.
Debugging Sentence Pair Representations
Segment Embedding
Example of Input Embedding Composition for a Sentence Pair
Learn After
Example of Input Embedding Composition for a Sentence Pair
A model processes a two-sentence input: 'The sky is blue. [SEP] Grass is green.'. To help the model distinguish between the two sentences, it uses a specific vector,
Vec_A, for the first sentence and another vector,Vec_B, for the second. How are these vectors assigned to the tokens in the combined input sequence?Debugging a Sentence-Pair Model
A model is given a two-sentence input: 'What is the capital of France? [SEP] Paris is the capital.'. The model uses one vector representation for the first sentence (let's call it
Vec_A) and a different one for the second sentence (Vec_B). For the tokenized sequence below, what is the correct sequence of these vector labels that would be assigned to each token?[CLS] What is the capital of France ? [SEP] Paris is the capital . [SEP]The correct sequence is: ____. (Use a comma and space to separate labels, e.g.,
Label1, Label2)