# Evaluating on MMLU while finetuning using Trainer

**URL:** <https://discuss.huggingface.co/t/evaluating-on-mmlu-while-finetuning-using-trainer/57220>\
**Category:** 🤗Transformers\
**Created:** [October 3, 2023, 9:47am UTC](https://discuss.huggingface.co/t/evaluating-on-mmlu-while-finetuning-using-trainer/57220 "2023-10-03T09:47:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imdatta0](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/imdatta0/32/19610_2.png) [@imdatta0](https://discuss.huggingface.co/u/imdatta0)\
**Post date:** [October 3, 2023, 9:47am UTC](https://discuss.huggingface.co/t/evaluating-on-mmlu-while-finetuning-using-trainer/57220/1 "2023-10-03T09:47:29Z")

</div>

Hi all, I’m trying to finetune llama on custom text dataset and would want to check how it’d perform if I evaluated it on MMLU dataset. Here’s what I’m using rn ( the eval\_data and train\_data are subsets of custom dataset).

```auto
trainer = Trainer(
    model = model,
    train_dataset = train_data,
    eval_dataset = eval_data,
    args = **training_args
    data_collator=DataCollatorForLanguageModeling(tokenizer,pad_to_multiple_of=8, mlm=False)
)

```

If I replace eval\_data with MMLU dataset (aka by doing  
`eval_data = load_datset('mmlu','abstract_algebra')`  
), how do I tell the trainer to use Binary loss ( 1 or 0) instead of Cross Entropy loss (this is what it’d use normally ig)?
