karpathy/build-nanogpt

How Can I extract Last Layer Representation?

Opened this issue · 0 comments

In Open-AI gpt2 model we can find last layer representation using output_hidden_states=True in the forward pass. In your case there is no option like this.

How can extract weights for each layer?