# Getting pretrained embeddings

**URL:** <https://discuss.huggingface.co/t/getting-pretrained-embeddings/43969>\
**Category:** 🤗Transformers\
**Created:** [June 20, 2023, 7:00pm UTC](https://discuss.huggingface.co/t/getting-pretrained-embeddings/43969 "2023-06-20T19:00:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aljanaidehosu](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@aljanaidehosu](https://discuss.huggingface.co/u/aljanaidehosu)\
**Post date:** [June 20, 2023, 7:00pm UTC](https://discuss.huggingface.co/t/getting-pretrained-embeddings/43969/1 "2023-06-20T19:00:07Z")

</div>

I want to get the pretrained embeddings from the bert base model. I have the code below. The problem is that I am expecting a 12x768 embedding for every word where each of the 12 correspond to one of the layers, but I am getting a 1x768 for every word

```auto
pipeline = pipeline('feature-extraction', model='bert-base-uncased', tokenizer=tokenizer)
data = pipeline("This is a loooong word")
print (data)

```
