You still haven’t defined what your understanding of “embeddings” is. If you want to get the weight parameter of a specific layer, you can directly index it via model.layer.weight. On the other hand, if you want to get a forward activation from a specific layer, you can register a forward hook or just return the activation in the forward method (additionally to the last output).