Closed WYY220062 closed 2 months ago
There is no need for the eval dataset. If you want use it, you could. However it's not necessary.
Hi! I am wondering if I can add eval dataset part. Can you point me any sample code or reference?
You could change the function in make_supervised_data_module
.
Do you mean I can make simple change like this:
def make_supervised_data_module(processor, data_args):
"""Make dataset and collator for supervised fine-tuning."""
sft_dataset = LazySupervisedDataset(
data_path=data_args.data_path, processor=processor, data_args=data_args
)
eval_dataset = LazySupervisedDataset(
data_path=/evaluation data path, processor=processor, data_args=data_args
)
data_collator = DataCollatorForSupervisedDataset(tokenizer=processor.tokenizer)
return dict(train_dataset=sft_dataset,
eval_dataset=eval_dataset,
data_collator=data_collator)
I did a simple try, let the eval_dataset = sft_dataset. But I didnt see eval dataset play any role in the training. Do I miss anything? My fine tune job seems have overfitting problem. I want to have eval loss on the wandb dashboard too. May I have any suggestion?
Yes, that is just the part for making the eval dataset. You should add some parameters and metrics for the trainer. The metrics should be different what task you want. You can check the official phi3-vision finetuning code for it.
Closing the issu for no updates.
Hi! I have a basic question, why the whole fine rune does need the eval dataset?