How can i get the word representation using BERT?

I need to get the embeddings using BERT for word-level, not sub-word . I got a lot of functions one of them gets the embeddings from the last layers in the model but the results for sub-word . How can I start, please? I hope someone can help . Appreciating your time

This previous discussion can be useful Obtaining word-embeddings from Roberta

1 Like

This might help: Generate raw word embeddings using transformer models like BERT for downstream process - #2 by BramVanroy

1 Like