Direct Logit Attribution
~12 mincode completion
Implement logit_attribution(components, W_U, token) returning the array of the m contributions followed by their total (length m+1).
Where this shows up
~12 min
••••••••••••••••
8 employers weight this skill
4 frontier labs, 3 AI product companies, 1 enterprise vendor. Top match scores 93.
Python
import numpy as np
def logit_attribution(components, W_U, token):
"""
Per-component contributions to one token's logit.
Args:
components: residual-stream writes, shape (m, d)
W_U: unembedding matrix, shape (V, d)
token: index of the token to explain
Returns:
array of length m + 1: each contribution, then their sum
"""
# YOUR CODE HERE
pass