AI engineering glossary · Transformers LLM architecture

What is logit lens?

Logit lens: An interpretability technique that applies the model's final output layer to intermediate layers' residual stream, to see what token the model would predict if it stopped early. It shows how the prediction is refined across layers.

Level: advancedTopic: Transformers LLM architecture

Logit lens: an example

Decoding layer 12 of a 32-layer model shows 'Paris' as top token for 'The Eiffel Tower is in', sharpening by layer 20.

Related terms

More Transformers LLM architecture terms

Where you learn it

Logit lens is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.