Short Answer

Analyzing Components of an Attention Score Formula

Consider the following formula for calculating an unnormalized attention score between a query at position i and a key at position j in a sequence: Score(i, j) = (q_i ⋅ k_j^T + PE(i, j)) / √d + Mask(i, j). Explain the distinct contribution of the PE(i, j) term and the Mask(i, j) term to the final attention weight. How would the model's behavior likely change if each of these terms were individually removed?

0

1

Updated 2025-10-04

Contributors are:

Who are from:

Tags

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Analysis in Bloom's Taxonomy

Cognitive Psychology

Psychology

Social Science

Empirical Science

Science