Input text: {{ text }}
Next word: {{ prediction.token }}
Logit value: {{ "%.4f"|format(prediction.logit) }}
Probability: {{ "%.2f"|format(prediction.prob) }}%
This chart shows how each layer in GPT-2 influences the prediction of "{{ prediction.token }}" as your next word. Each bar represents one of GPT-2's 12 layers:
This heatmap shows how each of GPT-2's 144 individual attention mechanisms (12 heads in each of 12 layers) influences the prediction:
Hover over any square to see its exact contribution. Research has shown certain heads specialize in specific tasks like tracking names or completing patterns.