# Llama2 finetuning for summarization mlsum

**URL:** <https://discuss.huggingface.co/t/llama2-finetuning-for-summarization-mlsum/52720>\
**Category:** 🤗Transformers\
**Created:** [August 29, 2023, 9:44pm UTC](https://discuss.huggingface.co/t/llama2-finetuning-for-summarization-mlsum/52720 "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](https://discuss.huggingface.co/u/Jukaboo)\
**Post date:** [August 29, 2023, 9:44pm UTC](https://discuss.huggingface.co/t/llama2-finetuning-for-summarization-mlsum/52720/1 "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 ?
