# Output embedding from each self-attention head from each encoder layer

**URL:** <https://discuss.huggingface.co/t/output-embedding-from-each-self-attention-head-from-each-encoder-layer/15195>\
**Category:** Intermediate\
**Created:** [February 28, 2022, 7:41am UTC](https://discuss.huggingface.co/t/output-embedding-from-each-self-attention-head-from-each-encoder-layer/15195 "2022-02-28T07:41:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreyan](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Sreyan](https://discuss.huggingface.co/u/Sreyan)\
**Post date:** [February 28, 2022, 7:41am UTC](https://discuss.huggingface.co/t/output-embedding-from-each-self-attention-head-from-each-encoder-layer/15195/1 "2022-02-28T07:41:32Z")

</div>

Hi there!

I wanted the embeddings from each self-attention head of each encoder layer for one of my projects, is this possible with the hugging face library?

If not, can I just slice the original embeddings from each layer (suppose 768/12 = 128 size slice) to get the attention head output?

Thank You
