# Avoid large memory use with output\_score=True

**URL:** <https://discuss.huggingface.co/t/avoid-large-memory-use-with-output-score-true/19500>\
**Category:** Beginners\
**Created:** [June 23, 2022, 10:43am UTC](https://discuss.huggingface.co/t/avoid-large-memory-use-with-output-score-true/19500 "2022-06-23T10:43:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgrosser](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@kgrosser](https://discuss.huggingface.co/u/kgrosser)\
**Post date:** [June 23, 2022, 10:43am UTC](https://discuss.huggingface.co/t/avoid-large-memory-use-with-output-score-true/19500/1 "2022-06-23T10:43:20Z")

</div>

I am trying to use encoder decoder cross attention matrices in a project I am working on.

I only need the attention matrix of the last token that is produced. output\_scores=True produces it for all tokens, I only need the last. Is there a way to access it seperately, to avoid consuming so much memory?
