# Extracting token embeddings from pretrained language models

**URL:** <https://discuss.huggingface.co/t/extracting-token-embeddings-from-pretrained-language-models/6834>\
**Category:** Beginners\
**Created:** [June 15, 2021, 4:16am UTC](https://discuss.huggingface.co/t/extracting-token-embeddings-from-pretrained-language-models/6834 "2021-06-15T04:16:55Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![giuseppefutia](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/giuseppefutia/32/5671_2.png) [@giuseppefutia](https://discuss.huggingface.co/u/giuseppefutia)\
**Post date:** [August 11, 2022, 3:39pm UTC](https://discuss.huggingface.co/t/extracting-token-embeddings-from-pretrained-language-models/6834/9 "2022-08-11T15:39:35Z")

</div>

Thank you for the very clean answer, Omar!

May I ask you to elaborate on the differences between your answer and the following ones?

- [Get word embeddings from transformer model](https://discuss.huggingface.co/t/get-word-embeddings-from-transformer-model/6929)
- [Generate raw word embeddings using transformer models like BERT for downstream process - #9 by Sanjeeth](https://discuss.huggingface.co/t/generate-raw-word-embeddings-using-transformer-models-like-bert-for-downstream-process/2958/9)

If I understood well, in practice, all the questions are related to the same request: the word embedding extraction from pre-trained models. If so, what is the best practice among all the reported solutions?

Sorry if I missing something and thank you for your clarification. 🙂

---

_[View the full topic](https://discuss.huggingface.co/t/extracting-token-embeddings-from-pretrained-language-models/6834)._
