Large Language Models
Do not let tomorrow give away the answer
Give future positions the largest scores
Botie's next-token predictor must not consult the future token that supplies its training answer.
BOTIE
The inputs we are comparing
Key positions
Same in both cases
- 00
- 11
- 22
- 33
Current query position
Example 1
2
Example 2
1
Attention scores
Example 1
- 01
- 12
- 23
- 39
Example 2
- 02
- 11
- 28
- 39
Result for example 1
- 00.09
- 10.2447
- 20.6652
- 30
For a list use brackets, such as [2, 4]. For a matrix put each row in brackets. Text answers can stay as text.
The first position cannot read ahead
This check uses the pieces from “Make future positions invisible before normalising”.
BOTIE
- Key positions
- 00
- 11
- 22
- 33
- Current query position
0
- Attention scores
- 0-2
- 15
- 220
- 3100
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
Why is zeroing future probabilities after an unrestricted softmax insufficient without renormalising?
A causal boundary changes the set over which attention is normalised.
This is a small construction problem. The lesson explains the assumptions and the parts of the full method that this example leaves out.
Work through the Python challenges →