Learn Before
Span Prediction Inference Formula
During inference for a span prediction task, the optimal answer span, represented by the start index and end index , is found by selecting the pair of indices that maximizes the sum of the log-probabilities for the start and end positions. The search is constrained such that the start index must not come after the end index. The formula is: Where: - is the probability that token is the start of the span. - is the probability that token is the end of the span. - is the number of tokens in the context.

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
Ch.1 Pre-training - Foundations of Large Language Models
Related
Span Prediction Inference Formula
Identifying the Optimal Answer Span
A language model has processed the context 'The capital of France is Paris.' and produced the following probabilities for each token being the start or the end of an answer span. To determine the most likely answer, you must find the start and end token pair that yields the highest combined score (calculated as start_probability * end_probability), with the constraint that the start token cannot appear after the end token. Given the table below, which span is the most likely answer?
Token Index Start Probability End Probability 'The' 1 0.05 0.05 'capital' 2 0.10 0.05 'of' 3 0.05 0.05 'France' 4 0.20 0.10 'is' 5 0.05 0.05 'Paris' 6 0.50 0.60 '.' 7 0.05 0.10 Flaw in a Naive Inference Strategy
Learn After
A language model is tasked with finding an answer span within a text. After processing the text, it produces the following log-probabilities for each token being the start or the end of the answer. To find the best span, one must find the start index () and end index () that maximize the sum of their log-probabilities, with the constraint that the start index cannot be after the end index ().
Index Token Start Log-Prob End Log-Prob 1 The -5.1 -8.1 2 first -4.2 -7.2 3 person -4.5 -6.5 4 was -5.5 -5.5 5 Neil -0.9 -3.1 6 Armstrong -2.1 -0.5 Given the table above, what is the predicted answer span?
Analyzing the Span Prediction Constraint
Diagnosing a Span Prediction Error