# Llama2 finetuning for summarization mlsum

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama2-finetuning-for-summarization-mlsum%2F52720%3E%5C
**Category:** 🤗Transformers\
**Created:** [August 29, 2023, 9:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama2-finetuning-for-summarization-mlsum%2F52720 "2023-08-29T21:44:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jukaboo](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@Jukaboo](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJukaboo)%5C
**Post date:** [August 29, 2023, 9:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama2-finetuning-for-summarization-mlsum%2F52720%2F1 "2023-08-29T21:44:25Z")

</div>

hello, i am trying to finetune llama2-7b model on a german dataset for the summarization task. Everything works fine, however in the trainer part when i try to compute the rouge metrics for the valuation dataset, i get a 3 dimensional array from the model and the labels are two dimensional.

Does anyone have any idea how i can transform the model output in to the right format to compute the rouge metric between it and the label sentence ?
