logit-lens

Decode layer activations into per-layer vocabulary predictions for Transformer interpretability.

9|2|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/ndif-team/skills --skill logit-lens
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logit-lens
Source: https://github.com/ndif-team/skills/tree/main/plugins/nnsight/skills/logit-lens
Command: npx skills add https://github.com/ndif-team/skills --skill logit-lens

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Decodes intermediate layer activations into vocabulary predictions to reveal what the model "thinks" at each processing step, offering insight beyond the final output.

Core Features & Use Cases

  • Decode per-layer predictions by applying final normalization and unembedding to hidden states to reveal evolving tokens.
  • Visualize and compare layer-wise predictions to diagnose information flow and debugging tasks.
  • Use for interpretability research, model auditing, and understanding recall dynamics across Transformer layers.

Quick Start

Prompt the model with a sample input and run a layer-wise trace to display the top token predictions at each layer.

Frequently Asked Questions about logit-lens

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I visualize layer-wise predictions in a transformer model?

To visualize layer-wise predictions, decode intermediate transformer activations into per-layer vocabulary tokens by applying final normalization and unembedding, revealing what the model computes at each processing step.

What is the logit lens technique for model interpretability?

The logit lens technique for model interpretability decodes hidden states at each layer to show evolving token predictions, offering insight into how a transformer model computes output beyond the final layer.

How can I debug information flow across transformer layers?

Debug information flow across transformer layers by decoding and comparing per-layer vocabulary predictions to diagnose how specific tokens evolve and recall dynamics shift during processing.

Do I need access to intermediate hidden states to interpret model predictions?

Yes, decoding per-layer predictions requires access to intermediate hidden states, the final projection head, and a tokenizer to map intermediate activations back to readable vocabulary words.

Can I use layer-wise decoding for model auditing tasks?

Yes, you can use layer-wise decoding for model auditing and interpretability research by tracing how top token predictions evolve across varying prompts to reveal internal recall dynamics.

What's the best way to trace how predictions evolve across transformer layers?

The best way to trace evolving predictions is applying final normalization and unembedding to hidden states at each layer, which maps intermediate activations to top vocabulary tokens for comparison.