Two Prompts, One Prefix

TransformersHard+30 XP+30

Two Prompts, One Prefix

A trained decoder-only transformer is run twice, deterministically, with the same weights both times. Its stack is the standard one from this chapter: token embeddings plus positional encoding, then 12 identical blocks, where each block is masked self-attention, add and norm, feed-forward, add and norm.

Take each word below as one token, so both prompts are 6 tokens long:

position123456
run Athefilmwaslongbutbrilliant
run Bthefilmwaslonganddull

The two prompts diverge from position 5 onward.

At the top of the stack each run produces six output vectors, one per position. How many of those six are guaranteed to be identical across the two runs — whatever the model's weights happen to be?

the
cat
sat
down
the
✓
×
×
×
cat
✓
✓
×
×
sat
✓
✓
✓
×
down
✓
✓
✓
✓

A triangle of blocked cells. Each row may only look at itself and everything to its left.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.