chosen), one not (rejected). The model
learns to make the preferred reply more likely than the rejected one, measured against the model it started from.
Full-parameter only. The models that train it list dpo in client.models()[i].methods; use the job’s
train_type="dpo".
Data
One kind per dataset: preference pairs, in any of these forms.- The prompt ends with the user’s turn; both replies are non-empty. The last form is two conversations that differ only in their last reply (UltraFeedback, HH-RLHF style).
- With
tools(Data, on the models that take them) the prompt may end with a tool’s result and a reply may be an assistant message withtool_calls: prefer the right call over a wrong one, or over no call. check_filereportskind="preference"; after uploaddataset.kind == "preference"anddataset.tokens[model]["max"]is the longest pair: the prompt twice and both replies. It must be at most the method’smax_seq_len.- Pairs work best when both replies are close to what the model itself writes, for example two of its own replies ranked by a judge. Replies written by other models, especially when the chosen one is much longer, can leave the loss at or above 0.693.
Settings
batch_size, max_seq_len and validation sets do not apply: a step packs whole pairs into each GPU’s row, and
client.jobs.estimate(...).steps gives about how many steps a dataset makes.