Step-by-Step Sequence Log-Probability Computation
The process of computing the log-probability of an output sequence given an input, , in a Transformer language model involves several sequential operations. First, the input and output are concatenated. For each position , the corresponding token embedding is processed through a stack of Transformer layers, where self-attention networks update the KV cache and compute attention outputs. If the position corresponds to a generated token, the model utilizes a Softmax layer to determine the token's prediction probability. Finally, the total log-probability is calculated by summing these individual token log-probabilities over the entire generated sequence.
0
1
Tags
Foundations of Large Language Models
Ch.5 Inference - Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Sequence Evaluation using Log-Probability
An engineer is using a generative language model to decide which of two possible sentences is a more likely completion for the input prompt 'Once upon a time,'. The model can compute various log-probability scores. To select the better completion, which of the following scores should the engineer compare for each candidate sentence?
Debugging a Language Model's Output Score
Rationale for Log-Probability Calculation in Generative Models
Core Computational Task in Autoregressive Generation
Step-by-Step Sequence Log-Probability Computation