# Getting pretrained embeddings

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-pretrained-embeddings%2F43969%3E%5C
**Category:** 🤗Transformers\
**Created:** [June 20, 2023, 7:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-pretrained-embeddings%2F43969 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Faljanaidehosu)%5C
**Post date:** [June 20, 2023, 7:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-pretrained-embeddings%2F43969%2F1 "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)

```
