Corianas commited on
Commit
e8961a3
1 Parent(s): 066409b

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - openbmb/UltraFeedback
4
+ language:
5
+ - en
6
+ license: apache-2.0
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - autoquant
10
+ - UCLA-AGI/Mistral7B-PairRM-SPPO-Iter3
11
+ - gptq
12
+ ---
13
+ Self-Play Preference Optimization for Language Model Alignment (https://arxiv.org/abs/2405.00675)
14
+
15
+ # Mistral7B-PairRM-SPPO-Iter3
16
+
17
+ This model was developed using [Self-Play Preference Optimization](https://arxiv.org/abs/2405.00675) at iteration 3, based on the [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) architecture as starting point. We utilized the prompt sets from the [openbmb/UltraFeedback](https://huggingface.co/datasets/openbmb/UltraFeedback) dataset, splited to 3 parts for 3 iterations by [snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset](https://huggingface.co/datasets/snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset). All responses used are synthetic.
18
+
19
+ **This is the model reported in the paper** , with K=5 (generate 5 responses per iteration). We attached the Arena-Hard eval results in this model page.
20
+
21
+ ## Links to Other Models
22
+ - [Mistral7B-PairRM-SPPO-Iter1](https://huggingface.co/UCLA-AGI/Mistral7B-PairRM-SPPO-Iter1)
23
+ - [Mistral7B-PairRM-SPPO-Iter2](https://huggingface.co/UCLA-AGI/Mistral7B-PairRM-SPPO-Iter2)
24
+ - [Mistral7B-PairRM-SPPO-Iter3](https://huggingface.co/UCLA-AGI/Mistral7B-PairRM-SPPO-Iter3)
25
+ - [Mistral7B-PairRM-SPPO](https://huggingface.co/UCLA-AGI/Mistral7B-PairRM-SPPO)
26
+
27
+
28
+
29
+ ### Model Description
30
+
31
+ - Model type: A 7B parameter GPT-like model fine-tuned on synthetic datasets.
32
+ - Language(s) (NLP): Primarily English
33
+ - License: Apache-2.0
34
+ - Finetuned from model: mistralai/Mistral-7B-Instruct-v0.2
35
+
36
+
37
+ ## [AlpacaEval Leaderboard Evaluation Results](https://tatsu-lab.github.io/alpaca_eval/)
38
+
39
+
40
+ | Model | LC. Win Rate | Win Rate | Avg. Length |
41
+ |-------------------------------------------|:------------:|:--------:|:-----------:|
42
+ | Mistral7B-PairRM-SPPO Iter 1 | 24.79 | 23.51 | 1855 |
43
+ | Mistral7B-PairRM-SPPO Iter 2 | 26.89 | 27.62 | 2019 |
44
+ | Mistral7B-PairRM-SPPO Iter 3 | 28.53 | 31.02 | 2163 |
45
+ | Mistral7B-PairRM-SPPO Iter 1 (best-of-16) | 28.71 | 27.77 | 1901 |
46
+ | Mistral7B-PairRM-SPPO Iter 2 (best-of-16) | 31.23 | 32.12 | 2035 |
47
+ | Mistral7B-PairRM-SPPO Iter 3 (best-of-16) | 32.13 | 34.94 | 2174 |
48
+
49
+ ## [Arena-Hard Evaluation Results](https://github.com/lm-sys/arena-hard)
50
+
51
+ Model | Score | 95% CI | average \# Tokens |
52
+ |----------|-----------|--------------|-----------|
53
+ Mistral7B-PairRM-SPPO-Iter3| 23.3 | (-1.8, 1.8)|578|
54
+
55
+ ## [Open LLM Leaderboard Evaluation Results](https://github.com/EleutherAI/lm-evaluation-harness)
56
+
57
+ Results are reported by using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) v0.4.1
58
+
59
+ | | arc_challenge | truthfulqa_mc2 | winogrande | gsm8k | hellaswag | mmlu | average |
60
+ |--------|---------------|----------------|------------|-------|-----------|-------|---------|
61
+ | Mistral7B-PairRM-SPPO Iter 1 | 65.02 | 69.4 | 77.82 | 43.82 | 85.11 | 58.84 | 66.67 |
62
+ | Mistral7B-PairRM-SPPO Iter 2 | 65.53 | 69.55 | 77.03 | 44.35 | 85.29 | 58.72 | 66.75 |
63
+ | Mistral7B-PairRM-SPPO Iter 3 | 65.36 | 69.97 | 76.8 | 42.68 | 85.16 | 58.45 | 66.4 |
64
+ ## [MT-Bench Evaluation Results](https://github.com/lm-sys/FastChat/tree/main/fastchat/llm_judge)
65
+
66
+ | | 1st Turn | 2nd Turn | Average |
67
+ |--------|----------|----------|---------|
68
+ | Mistral7B-PairRM-SPPO Iter 1 | 7.63 | 6.79 | 7.21 |
69
+ | Mistral7B-PairRM-SPPO Iter 2 | 7.90 | 7.08 | 7.49 |
70
+ | Mistral7B-PairRM-SPPO Iter 3 | 7.84 | 7.34 | 7.59 |
71
+
72
+ ### Training hyperparameters
73
+ The following hyperparameters were used during training:
74
+
75
+ - learning_rate: 5e-07
76
+ - eta: 1000
77
+ - per_device_train_batch_size: 8
78
+ - gradient_accumulation_steps: 1
79
+ - seed: 42
80
+ - distributed_type: deepspeed_zero3
81
+ - num_devices: 8
82
+ - optimizer: RMSProp
83
+ - lr_scheduler_type: linear
84
+ - lr_scheduler_warmup_ratio: 0.1
85
+ - num_train_epochs: 18.0 (stop at epoch=1.0)
86
+
87
+
88
+
89
+
90
+ ## Citation
91
+ ```
92
+ @misc{wu2024self,
93
+ title={Self-Play Preference Optimization for Language Model Alignment},
94
+ author={Wu, Yue and Sun, Zhiqing and Yuan, Huizhuo and Ji, Kaixuan and Yang, Yiming and Gu, Quanquan},
95
+ year={2024},
96
+ eprint={2405.00675},
97
+ archivePrefix={arXiv},
98
+ primaryClass={cs.LG}
99
+ }
100
+ ```
config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "UCLA-AGI/Mistral7B-PairRM-SPPO-Iter3",
3
+ "architectures": [
4
+ "MistralForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 4096,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 14336,
14
+ "max_position_embeddings": 32768,
15
+ "model_type": "mistral",
16
+ "num_attention_heads": 32,
17
+ "num_hidden_layers": 32,
18
+ "num_key_value_heads": 8,
19
+ "quantization_config": {
20
+ "batch_size": 1,
21
+ "bits": 4,
22
+ "block_name_to_quantize": null,
23
+ "cache_block_outputs": true,
24
+ "damp_percent": 0.1,
25
+ "dataset": "c4",
26
+ "desc_act": false,
27
+ "exllama_config": {
28
+ "version": 1
29
+ },
30
+ "group_size": 64,
31
+ "max_input_length": null,
32
+ "model_seqlen": null,
33
+ "module_name_preceding_first_block": null,
34
+ "modules_in_block_to_quantize": null,
35
+ "pad_token_id": null,
36
+ "quant_method": "gptq",
37
+ "sym": true,
38
+ "tokenizer": null,
39
+ "true_sequential": true,
40
+ "use_cuda_fp16": false,
41
+ "use_exllama": true
42
+ },
43
+ "rms_norm_eps": 1e-05,
44
+ "rope_theta": 1000000.0,
45
+ "sliding_window": null,
46
+ "tie_word_embeddings": false,
47
+ "torch_dtype": "float16",
48
+ "transformers_version": "4.43.4",
49
+ "use_cache": false,
50
+ "vocab_size": 32000
51
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.43.4"
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b437426c7f45fe12e32a75bb8278f9060b9cd6b652aeadd95e846eb37e4336a
3
+ size 4292200184
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
3
+ size 493443
tokenizer_config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "additional_special_tokens": [],
32
+ "bos_token": "<s>",
33
+ "chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}",
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "</s>",
36
+ "legacy": true,
37
+ "model_max_length": 2048,
38
+ "pad_token": "</s>",
39
+ "sp_model_kwargs": {},
40
+ "spaces_between_special_tokens": false,
41
+ "tokenizer_class": "LlamaTokenizer",
42
+ "unk_token": "<unk>",
43
+ "use_default_system_prompt": false
44
+ }