huggingface / huggingface/alignment-handbook

DPO loss on different datasets

Open
#110 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.7k
Forks
490
Avg merge
2m
Merged PRs (30d)
1

Description

In parallel with #38, tho i am relating to full training instead of lora.

When i use a different set of prefs (ie chosen and rejected) but still same instructions (ultrafeedback), i get extremely low eval/train loss, where it drops sharply in the beginning. In contrast to training on the original prefs as in the case of ultrafeedback_binarised.

On my pref dataset (Eval loss)
![image](https://github.com/huggingface/alignment-handbook/assets/88869287/6794892c-b9e5-4045-b627-45024c5843e7)

on original pref dataset (eval loss)
![image](https://github.com/huggingface/alignment-handbook/assets/88869287/539c78a9-46a1-408a-bdfc-35f8436e751f)

train loss (mine)
![image](https://github.com/huggingface/alignment-handbook/assets/88869287/216603db-30cc-477c-8198-c2365433fada)

original
![image](https://github.com/huggingface/alignment-handbook/assets/88869287/6943cc8b-0d2b-4b55-84d4-2a2465ed7537)

reward margin (mine)
![image](https://github.com/huggingface/alignment-handbook/assets/88869287/2c9b3f7c-ac19-4d5d-9532-6a88d3132fca)

original reward
![image](https://github.com/huggingface/alignment-handbook/assets/88869287/c8a5de1c-5f90-4709-9f1c-298ce52d697a)

This huge diff in scale seems to occur when i use pref datasets that are sampled from the reference policy instead of in the case of ultrafeedback, where it is sampled from various policies.

Moreover this huge decrease in loss actually cause the DPO-ed model to perform worse across various benchmarks. Is there any intuition regarding this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.