File size: 4,310 Bytes
ce72571
 
8ac6170
 
 
ce72571
 
 
8ac6170
ce72571
9baa155
ce72571
 
 
 
 
 
6839fbc
ce72571
8ac6170
938df25
 
ce72571
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8ac6170
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
base_model: princeton-nlp/Llama-3-Base-8B-SFT
datasets:
- HuggingFaceH4/ultrafeedback_binarized
library_name: transformers
tags:
- alignment-handbook
- generated_from_trainer
pipeline_tag: text-generation
model-index:
- name: llama-3-8b-dpo-ultrafeedback-decrease_linear-1.0to0.95
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# llama-3-8b-dpo-ultrafeedback-decrease_linear-1.0to0.95

This model is released from the preprint: [DPO-Shift: Shifting the Distribution of Direct Preference Optimization](https://arxiv.org/abs/2502.07599).  For more details, please refer to our [repository](https://github.com/Meaquadddd/DPO-Shift).


This model is a fine-tuned version of [princeton-nlp/Llama-3-Base-8B-SFT](https://huggingface.co/princeton-nlp/Llama-3-Base-8B-SFT) on the HuggingFaceH4/ultrafeedback_binarized dataset.
It achieves the following results on the evaluation set:
- Loss: 0.5619
- Rewards/chosen: -0.3784
- Rewards/rejected: -0.8957
- Dpo Lambda: 0.9528
- Rewards/accuracies: 0.7310
- Rewards/margins: 0.5173
- Logps/rejected: -360.6006
- Logps/chosen: -338.4835
- Logits/rejected: -1.0030
- Logits/chosen: -0.9672

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-07
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- distributed_type: multi-GPU
- num_devices: 2
- gradient_accumulation_steps: 32
- total_train_batch_size: 128
- total_eval_batch_size: 4
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 1

### Training results

| Training Loss | Epoch  | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Dpo Lambda | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
|:-------------:|:------:|:----:|:---------------:|:--------------:|:----------------:|:----------:|:------------------:|:---------------:|:--------------:|:------------:|:---------------:|:-------------:|
| 0.6826        | 0.1047 | 50   | 0.6803          | 0.0669         | 0.0399           | 0.9948     | 0.6690             | 0.0270          | -267.0431      | -293.9557    | -0.9094         | -0.8412       |
| 0.5951        | 0.2094 | 100  | 0.6223          | -0.0861        | -0.2745          | 0.9895     | 0.7130             | 0.1884          | -298.4850      | -309.2591    | -0.9195         | -0.8667       |
| 0.6296        | 0.3141 | 150  | 0.5972          | -0.2312        | -0.5289          | 0.9843     | 0.7100             | 0.2977          | -323.9177      | -323.7625    | -0.9008         | -0.8554       |
| 0.6219        | 0.4187 | 200  | 0.5784          | -0.4096        | -0.8051          | 0.9790     | 0.7310             | 0.3955          | -351.5381      | -341.6022    | -0.9313         | -0.8927       |
| 0.5738        | 0.5234 | 250  | 0.5685          | -0.4338        | -0.8864          | 0.9738     | 0.7260             | 0.4526          | -359.6707      | -344.0276    | -0.9691         | -0.9333       |
| 0.5598        | 0.6281 | 300  | 0.5695          | -0.4246        | -0.9086          | 0.9686     | 0.7220             | 0.4840          | -361.8922      | -343.1057    | -1.0002         | -0.9608       |
| 0.566         | 0.7328 | 350  | 0.5613          | -0.3470        | -0.8404          | 0.9633     | 0.7260             | 0.4934          | -355.0737      | -335.3493    | -0.9958         | -0.9592       |
| 0.5423        | 0.8375 | 400  | 0.5613          | -0.3837        | -0.8996          | 0.9581     | 0.7290             | 0.5159          | -360.9908      | -339.0213    | -1.0033         | -0.9665       |
| 0.5357        | 0.9422 | 450  | 0.5619          | -0.3784        | -0.8957          | 0.9528     | 0.7310             | 0.5173          | -360.6006      | -338.4835    | -1.0030         | -0.9672       |


### Framework versions

- Transformers 4.44.2
- Pytorch 2.4.0+cu121
- Datasets 2.21.0
- Tokenizers 0.19.1