Short Answer

Calculating Linear Relative Position Bias

In a causal self-attention mechanism, a bias is added to the attention score between a query at position i and a key at position j. This bias is calculated using the formula Bias = -β * (i - j) for j ≤ i. Given a learnable parameter β = 0.25, calculate the bias value that would be added to the attention score when a query at position 8 attends to a key at position 2.

0

1

Updated 2026-05-02

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

Application in Bloom's Taxonomy

Cognitive Psychology

Psychology

Social Science

Empirical Science

Science