Files changed (1) hide show
  1. README.md +33 -0
README.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: text-generation
4
+ ---
5
+ [**๐ŸŒ Homepage**]() | [**๐Ÿค— Model**]() | [**๐Ÿ“– arXiv**]() | [**GitHub**]()
6
+ # Introduction
7
+ CT-LLM-SFT-DPO is an alignment version of [CT-LLM](https://huggingface.co/m-a-p/CT-LLM-Base).
8
+ The main features of this model is:
9
+ 1. Our model, an alignment-enhanced variant of CT-LLM-SFT, is trained using DPO, a direct preference-based learning method.
10
+ 2. We utilize a combination of publicly available datasets and synthetic data to train our model.
11
+ 3. Our model outperforms a range of 2B LLMs on the Cvalues benchmark, demonstrating its enhanced harmless nature. The Alignment training also enhance its general performances. Specifically, it shows enhanced results on benchmarks like COPA, CMMLU, Hellaswag, and TriviaQA compared to the CT-LLM-SFT version.
12
+ # Training Data
13
+ Our model incorporates a blend of publicly accessible datasets and synthetic data from the LLM. The open-source Chinese datasets consist of non-harmful and beneficial sections from [cvalues_rlhf](https://huggingface.co/datasets/Skepsun/cvalues_rlhf), `comparison_gpt4_data_zh` and `oaast_rm_zh` in Llama-factory, [huozi](https://github.com/HIT-SCIR/huozi), and [zhihu](https://huggingface.co/datasets/liyucheng/zhihu_rlhf_3k). For English, the dataset includes `comparison_gpt4_data_en` from [Llama-factory](https://github.com/hiyouga/LLaMA-Factory) and [beavertails](https://github.com/PKU-Alignment/beavertails). To construct a more high-quality preference dataset via a synthetics approach, we adopt alpaca-gpt4 which generates "chosen" responses using GPT-4, and we adopt [baichuan-6B](https://huggingface.co/baichuan-inc/Baichuan-7B) serving as a weaker model for generating "reject" responses. The dataset comprises 183k Chinese pairs and 46k English pairs in total.
14
+
15
+
16
+ # Training Settings
17
+ We leverage the CT-LLM-SFT as a reference model $\pi_{sft}$ to optimize the objective language model $\pi_{\theta}$.
18
+ $\pi_{\theta}$ is initialized by the model parameters of the $\pi_{sft}$.
19
+ We set the hyperparameters as follows:
20
+ 1. The $\pi_{\theta}$ is trained on 8 H800,
21
+ 2. learning rate $=1e-6$,
22
+ 3. batch size $=4$,
23
+ 4. epoch numbers $=2$,
24
+ 5. weight decay $=0.1$,
25
+ 6. warmup ratio $=0.03$,
26
+ 7. $\beta=0.5$ to control the deviation from $\pi_{sft}$.
27
+
28
+ # Results
29
+ ## Performance on CValues
30
+
31
+ ![Alt text](safe.png)
32
+ ## Performance on General Benchmark
33
+ ![Alt text](general.png)