Continuing the discussion from Extracting token embeddings from pretrained language models:
Thank you very much. It is working.
Final question: I think the result of your code will give me embedding of whole sentence. Can I get the word embeddings within a sentence (embeddings of each word in a sentence separately) as well?