Upload 19 files
Browse files- LongWriter-Qwen+LongDPO/added_tokens.json +24 -0
- LongWriter-Qwen+LongDPO/config.json +28 -0
- LongWriter-Qwen+LongDPO/generation_config.json +12 -0
- LongWriter-Qwen+LongDPO/merges.txt +0 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00001-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00002-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00003-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00004-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00005-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00006-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00007-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00008-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model-00009-of-00009.bin +3 -0
- LongWriter-Qwen+LongDPO/pytorch_model.bin.index.json +346 -0
- LongWriter-Qwen+LongDPO/special_tokens_map.json +31 -0
- LongWriter-Qwen+LongDPO/tokenizer.json +0 -0
- LongWriter-Qwen+LongDPO/tokenizer_config.json +208 -0
- LongWriter-Qwen+LongDPO/vocab.json +0 -0
- LongWriter-Qwen+LongDPO/xtuner_config.py +247 -0
LongWriter-Qwen+LongDPO/added_tokens.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</tool_call>": 151658,
|
3 |
+
"<tool_call>": 151657,
|
4 |
+
"<|box_end|>": 151649,
|
5 |
+
"<|box_start|>": 151648,
|
6 |
+
"<|endoftext|>": 151643,
|
7 |
+
"<|file_sep|>": 151664,
|
8 |
+
"<|fim_middle|>": 151660,
|
9 |
+
"<|fim_pad|>": 151662,
|
10 |
+
"<|fim_prefix|>": 151659,
|
11 |
+
"<|fim_suffix|>": 151661,
|
12 |
+
"<|im_end|>": 151645,
|
13 |
+
"<|im_start|>": 151644,
|
14 |
+
"<|image_pad|>": 151655,
|
15 |
+
"<|object_ref_end|>": 151647,
|
16 |
+
"<|object_ref_start|>": 151646,
|
17 |
+
"<|quad_end|>": 151651,
|
18 |
+
"<|quad_start|>": 151650,
|
19 |
+
"<|repo_name|>": 151663,
|
20 |
+
"<|video_pad|>": 151656,
|
21 |
+
"<|vision_end|>": 151653,
|
22 |
+
"<|vision_pad|>": 151654,
|
23 |
+
"<|vision_start|>": 151652
|
24 |
+
}
|
LongWriter-Qwen+LongDPO/config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/models/LongWriter-Qwen2.5-7B-Instruct/",
|
3 |
+
"architectures": [
|
4 |
+
"Qwen2ForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 151643,
|
8 |
+
"eos_token_id": 151645,
|
9 |
+
"hidden_act": "silu",
|
10 |
+
"hidden_size": 3584,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 18944,
|
13 |
+
"max_position_embeddings": 32768,
|
14 |
+
"max_window_layers": 28,
|
15 |
+
"model_type": "qwen2",
|
16 |
+
"num_attention_heads": 28,
|
17 |
+
"num_hidden_layers": 28,
|
18 |
+
"num_key_value_heads": 4,
|
19 |
+
"rms_norm_eps": 1e-06,
|
20 |
+
"rope_theta": 1000000.0,
|
21 |
+
"sliding_window": null,
|
22 |
+
"tie_word_embeddings": false,
|
23 |
+
"torch_dtype": "float16",
|
24 |
+
"transformers_version": "4.44.2",
|
25 |
+
"use_cache": true,
|
26 |
+
"use_sliding_window": false,
|
27 |
+
"vocab_size": 152064
|
28 |
+
}
|
LongWriter-Qwen+LongDPO/generation_config.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token_id": 151643,
|
3 |
+
"do_sample": true,
|
4 |
+
"eos_token_id": 151645,
|
5 |
+
"max_new_tokens": 2048,
|
6 |
+
"pad_token_id": 151643,
|
7 |
+
"repetition_penalty": 1.05,
|
8 |
+
"temperature": 0.7,
|
9 |
+
"top_k": 20,
|
10 |
+
"top_p": 0.8,
|
11 |
+
"transformers_version": "4.44.2"
|
12 |
+
}
|
LongWriter-Qwen+LongDPO/merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LongWriter-Qwen+LongDPO/pytorch_model-00001-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:640cd89818dd28c117fdb0395f7cae057a06eae3e4f81a263c883b74a8dab427
|
3 |
+
size 1886428918
|
LongWriter-Qwen+LongDPO/pytorch_model-00002-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f10b3a4d51c594e3cc1993fec13776e84b14f78d51e620b39f1e7ed153fcf66e
|
3 |
+
size 1864478730
|
LongWriter-Qwen+LongDPO/pytorch_model-00003-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c32d4ab3a5c163baee84c91917a5a378800d4fe2f81938718f1fdf5f3fde274f
|
3 |
+
size 1864478730
|
LongWriter-Qwen+LongDPO/pytorch_model-00004-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:62a3fc068bed22e255356f0bf16031012878b64d3c3347022ba923153e38f372
|
3 |
+
size 1864478794
|
LongWriter-Qwen+LongDPO/pytorch_model-00005-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d8d96c7bed42b613f6f89f5f00f5472156218d4fb4fcf49fe7752932a7a0167
|
3 |
+
size 1864478794
|
LongWriter-Qwen+LongDPO/pytorch_model-00006-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:83a816a1ac998486fb55b1aedfdb1d85f01f98de86f7f8cee9463ab5b23f3c5c
|
3 |
+
size 1864478794
|
LongWriter-Qwen+LongDPO/pytorch_model-00007-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bf18ddc797fc09e3146f799f3bd74bf800ea473c1520149621643f8c8e4b7664
|
3 |
+
size 1864478794
|
LongWriter-Qwen+LongDPO/pytorch_model-00008-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9f56ef707d3366054f70a5185f769beb18ecf2356d8fa6d05a8680a38d027a41
|
3 |
+
size 1068053090
|
LongWriter-Qwen+LongDPO/pytorch_model-00009-of-00009.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b98bf497ce8ad56412cafaeef3592d899613e1073a4ee96c8f57d18d6cb559d2
|
3 |
+
size 1089996165
|
LongWriter-Qwen+LongDPO/pytorch_model.bin.index.json
ADDED
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"metadata": {
|
3 |
+
"total_size": 15231233024
|
4 |
+
},
|
5 |
+
"weight_map": {
|
6 |
+
"lm_head.weight": "pytorch_model-00009-of-00009.bin",
|
7 |
+
"model.embed_tokens.weight": "pytorch_model-00001-of-00009.bin",
|
8 |
+
"model.layers.0.input_layernorm.weight": "pytorch_model-00001-of-00009.bin",
|
9 |
+
"model.layers.0.mlp.down_proj.weight": "pytorch_model-00001-of-00009.bin",
|
10 |
+
"model.layers.0.mlp.gate_proj.weight": "pytorch_model-00001-of-00009.bin",
|
11 |
+
"model.layers.0.mlp.up_proj.weight": "pytorch_model-00001-of-00009.bin",
|
12 |
+
"model.layers.0.post_attention_layernorm.weight": "pytorch_model-00001-of-00009.bin",
|
13 |
+
"model.layers.0.self_attn.k_proj.bias": "pytorch_model-00001-of-00009.bin",
|
14 |
+
"model.layers.0.self_attn.k_proj.weight": "pytorch_model-00001-of-00009.bin",
|
15 |
+
"model.layers.0.self_attn.o_proj.weight": "pytorch_model-00001-of-00009.bin",
|
16 |
+
"model.layers.0.self_attn.q_proj.bias": "pytorch_model-00001-of-00009.bin",
|
17 |
+
"model.layers.0.self_attn.q_proj.weight": "pytorch_model-00001-of-00009.bin",
|
18 |
+
"model.layers.0.self_attn.v_proj.bias": "pytorch_model-00001-of-00009.bin",
|
19 |
+
"model.layers.0.self_attn.v_proj.weight": "pytorch_model-00001-of-00009.bin",
|
20 |
+
"model.layers.1.input_layernorm.weight": "pytorch_model-00002-of-00009.bin",
|
21 |
+
"model.layers.1.mlp.down_proj.weight": "pytorch_model-00002-of-00009.bin",
|
22 |
+
"model.layers.1.mlp.gate_proj.weight": "pytorch_model-00001-of-00009.bin",
|
23 |
+
"model.layers.1.mlp.up_proj.weight": "pytorch_model-00001-of-00009.bin",
|
24 |
+
"model.layers.1.post_attention_layernorm.weight": "pytorch_model-00002-of-00009.bin",
|
25 |
+
"model.layers.1.self_attn.k_proj.bias": "pytorch_model-00001-of-00009.bin",
|
26 |
+
"model.layers.1.self_attn.k_proj.weight": "pytorch_model-00001-of-00009.bin",
|
27 |
+
"model.layers.1.self_attn.o_proj.weight": "pytorch_model-00001-of-00009.bin",
|
28 |
+
"model.layers.1.self_attn.q_proj.bias": "pytorch_model-00001-of-00009.bin",
|
29 |
+
"model.layers.1.self_attn.q_proj.weight": "pytorch_model-00001-of-00009.bin",
|
30 |
+
"model.layers.1.self_attn.v_proj.bias": "pytorch_model-00001-of-00009.bin",
|
31 |
+
"model.layers.1.self_attn.v_proj.weight": "pytorch_model-00001-of-00009.bin",
|
32 |
+
"model.layers.10.input_layernorm.weight": "pytorch_model-00004-of-00009.bin",
|
33 |
+
"model.layers.10.mlp.down_proj.weight": "pytorch_model-00004-of-00009.bin",
|
34 |
+
"model.layers.10.mlp.gate_proj.weight": "pytorch_model-00004-of-00009.bin",
|
35 |
+
"model.layers.10.mlp.up_proj.weight": "pytorch_model-00004-of-00009.bin",
|
36 |
+
"model.layers.10.post_attention_layernorm.weight": "pytorch_model-00004-of-00009.bin",
|
37 |
+
"model.layers.10.self_attn.k_proj.bias": "pytorch_model-00004-of-00009.bin",
|
38 |
+
"model.layers.10.self_attn.k_proj.weight": "pytorch_model-00004-of-00009.bin",
|
39 |
+
"model.layers.10.self_attn.o_proj.weight": "pytorch_model-00004-of-00009.bin",
|
40 |
+
"model.layers.10.self_attn.q_proj.bias": "pytorch_model-00004-of-00009.bin",
|
41 |
+
"model.layers.10.self_attn.q_proj.weight": "pytorch_model-00004-of-00009.bin",
|
42 |
+
"model.layers.10.self_attn.v_proj.bias": "pytorch_model-00004-of-00009.bin",
|
43 |
+
"model.layers.10.self_attn.v_proj.weight": "pytorch_model-00004-of-00009.bin",
|
44 |
+
"model.layers.11.input_layernorm.weight": "pytorch_model-00004-of-00009.bin",
|
45 |
+
"model.layers.11.mlp.down_proj.weight": "pytorch_model-00004-of-00009.bin",
|
46 |
+
"model.layers.11.mlp.gate_proj.weight": "pytorch_model-00004-of-00009.bin",
|
47 |
+
"model.layers.11.mlp.up_proj.weight": "pytorch_model-00004-of-00009.bin",
|
48 |
+
"model.layers.11.post_attention_layernorm.weight": "pytorch_model-00004-of-00009.bin",
|
49 |
+
"model.layers.11.self_attn.k_proj.bias": "pytorch_model-00004-of-00009.bin",
|
50 |
+
"model.layers.11.self_attn.k_proj.weight": "pytorch_model-00004-of-00009.bin",
|
51 |
+
"model.layers.11.self_attn.o_proj.weight": "pytorch_model-00004-of-00009.bin",
|
52 |
+
"model.layers.11.self_attn.q_proj.bias": "pytorch_model-00004-of-00009.bin",
|
53 |
+
"model.layers.11.self_attn.q_proj.weight": "pytorch_model-00004-of-00009.bin",
|
54 |
+
"model.layers.11.self_attn.v_proj.bias": "pytorch_model-00004-of-00009.bin",
|
55 |
+
"model.layers.11.self_attn.v_proj.weight": "pytorch_model-00004-of-00009.bin",
|
56 |
+
"model.layers.12.input_layernorm.weight": "pytorch_model-00004-of-00009.bin",
|
57 |
+
"model.layers.12.mlp.down_proj.weight": "pytorch_model-00004-of-00009.bin",
|
58 |
+
"model.layers.12.mlp.gate_proj.weight": "pytorch_model-00004-of-00009.bin",
|
59 |
+
"model.layers.12.mlp.up_proj.weight": "pytorch_model-00004-of-00009.bin",
|
60 |
+
"model.layers.12.post_attention_layernorm.weight": "pytorch_model-00004-of-00009.bin",
|
61 |
+
"model.layers.12.self_attn.k_proj.bias": "pytorch_model-00004-of-00009.bin",
|
62 |
+
"model.layers.12.self_attn.k_proj.weight": "pytorch_model-00004-of-00009.bin",
|
63 |
+
"model.layers.12.self_attn.o_proj.weight": "pytorch_model-00004-of-00009.bin",
|
64 |
+
"model.layers.12.self_attn.q_proj.bias": "pytorch_model-00004-of-00009.bin",
|
65 |
+
"model.layers.12.self_attn.q_proj.weight": "pytorch_model-00004-of-00009.bin",
|
66 |
+
"model.layers.12.self_attn.v_proj.bias": "pytorch_model-00004-of-00009.bin",
|
67 |
+
"model.layers.12.self_attn.v_proj.weight": "pytorch_model-00004-of-00009.bin",
|
68 |
+
"model.layers.13.input_layernorm.weight": "pytorch_model-00005-of-00009.bin",
|
69 |
+
"model.layers.13.mlp.down_proj.weight": "pytorch_model-00005-of-00009.bin",
|
70 |
+
"model.layers.13.mlp.gate_proj.weight": "pytorch_model-00004-of-00009.bin",
|
71 |
+
"model.layers.13.mlp.up_proj.weight": "pytorch_model-00004-of-00009.bin",
|
72 |
+
"model.layers.13.post_attention_layernorm.weight": "pytorch_model-00005-of-00009.bin",
|
73 |
+
"model.layers.13.self_attn.k_proj.bias": "pytorch_model-00004-of-00009.bin",
|
74 |
+
"model.layers.13.self_attn.k_proj.weight": "pytorch_model-00004-of-00009.bin",
|
75 |
+
"model.layers.13.self_attn.o_proj.weight": "pytorch_model-00004-of-00009.bin",
|
76 |
+
"model.layers.13.self_attn.q_proj.bias": "pytorch_model-00004-of-00009.bin",
|
77 |
+
"model.layers.13.self_attn.q_proj.weight": "pytorch_model-00004-of-00009.bin",
|
78 |
+
"model.layers.13.self_attn.v_proj.bias": "pytorch_model-00004-of-00009.bin",
|
79 |
+
"model.layers.13.self_attn.v_proj.weight": "pytorch_model-00004-of-00009.bin",
|
80 |
+
"model.layers.14.input_layernorm.weight": "pytorch_model-00005-of-00009.bin",
|
81 |
+
"model.layers.14.mlp.down_proj.weight": "pytorch_model-00005-of-00009.bin",
|
82 |
+
"model.layers.14.mlp.gate_proj.weight": "pytorch_model-00005-of-00009.bin",
|
83 |
+
"model.layers.14.mlp.up_proj.weight": "pytorch_model-00005-of-00009.bin",
|
84 |
+
"model.layers.14.post_attention_layernorm.weight": "pytorch_model-00005-of-00009.bin",
|
85 |
+
"model.layers.14.self_attn.k_proj.bias": "pytorch_model-00005-of-00009.bin",
|
86 |
+
"model.layers.14.self_attn.k_proj.weight": "pytorch_model-00005-of-00009.bin",
|
87 |
+
"model.layers.14.self_attn.o_proj.weight": "pytorch_model-00005-of-00009.bin",
|
88 |
+
"model.layers.14.self_attn.q_proj.bias": "pytorch_model-00005-of-00009.bin",
|
89 |
+
"model.layers.14.self_attn.q_proj.weight": "pytorch_model-00005-of-00009.bin",
|
90 |
+
"model.layers.14.self_attn.v_proj.bias": "pytorch_model-00005-of-00009.bin",
|
91 |
+
"model.layers.14.self_attn.v_proj.weight": "pytorch_model-00005-of-00009.bin",
|
92 |
+
"model.layers.15.input_layernorm.weight": "pytorch_model-00005-of-00009.bin",
|
93 |
+
"model.layers.15.mlp.down_proj.weight": "pytorch_model-00005-of-00009.bin",
|
94 |
+
"model.layers.15.mlp.gate_proj.weight": "pytorch_model-00005-of-00009.bin",
|
95 |
+
"model.layers.15.mlp.up_proj.weight": "pytorch_model-00005-of-00009.bin",
|
96 |
+
"model.layers.15.post_attention_layernorm.weight": "pytorch_model-00005-of-00009.bin",
|
97 |
+
"model.layers.15.self_attn.k_proj.bias": "pytorch_model-00005-of-00009.bin",
|
98 |
+
"model.layers.15.self_attn.k_proj.weight": "pytorch_model-00005-of-00009.bin",
|
99 |
+
"model.layers.15.self_attn.o_proj.weight": "pytorch_model-00005-of-00009.bin",
|
100 |
+
"model.layers.15.self_attn.q_proj.bias": "pytorch_model-00005-of-00009.bin",
|
101 |
+
"model.layers.15.self_attn.q_proj.weight": "pytorch_model-00005-of-00009.bin",
|
102 |
+
"model.layers.15.self_attn.v_proj.bias": "pytorch_model-00005-of-00009.bin",
|
103 |
+
"model.layers.15.self_attn.v_proj.weight": "pytorch_model-00005-of-00009.bin",
|
104 |
+
"model.layers.16.input_layernorm.weight": "pytorch_model-00005-of-00009.bin",
|
105 |
+
"model.layers.16.mlp.down_proj.weight": "pytorch_model-00005-of-00009.bin",
|
106 |
+
"model.layers.16.mlp.gate_proj.weight": "pytorch_model-00005-of-00009.bin",
|
107 |
+
"model.layers.16.mlp.up_proj.weight": "pytorch_model-00005-of-00009.bin",
|
108 |
+
"model.layers.16.post_attention_layernorm.weight": "pytorch_model-00005-of-00009.bin",
|
109 |
+
"model.layers.16.self_attn.k_proj.bias": "pytorch_model-00005-of-00009.bin",
|
110 |
+
"model.layers.16.self_attn.k_proj.weight": "pytorch_model-00005-of-00009.bin",
|
111 |
+
"model.layers.16.self_attn.o_proj.weight": "pytorch_model-00005-of-00009.bin",
|
112 |
+
"model.layers.16.self_attn.q_proj.bias": "pytorch_model-00005-of-00009.bin",
|
113 |
+
"model.layers.16.self_attn.q_proj.weight": "pytorch_model-00005-of-00009.bin",
|
114 |
+
"model.layers.16.self_attn.v_proj.bias": "pytorch_model-00005-of-00009.bin",
|
115 |
+
"model.layers.16.self_attn.v_proj.weight": "pytorch_model-00005-of-00009.bin",
|
116 |
+
"model.layers.17.input_layernorm.weight": "pytorch_model-00006-of-00009.bin",
|
117 |
+
"model.layers.17.mlp.down_proj.weight": "pytorch_model-00006-of-00009.bin",
|
118 |
+
"model.layers.17.mlp.gate_proj.weight": "pytorch_model-00005-of-00009.bin",
|
119 |
+
"model.layers.17.mlp.up_proj.weight": "pytorch_model-00005-of-00009.bin",
|
120 |
+
"model.layers.17.post_attention_layernorm.weight": "pytorch_model-00006-of-00009.bin",
|
121 |
+
"model.layers.17.self_attn.k_proj.bias": "pytorch_model-00005-of-00009.bin",
|
122 |
+
"model.layers.17.self_attn.k_proj.weight": "pytorch_model-00005-of-00009.bin",
|
123 |
+
"model.layers.17.self_attn.o_proj.weight": "pytorch_model-00005-of-00009.bin",
|
124 |
+
"model.layers.17.self_attn.q_proj.bias": "pytorch_model-00005-of-00009.bin",
|
125 |
+
"model.layers.17.self_attn.q_proj.weight": "pytorch_model-00005-of-00009.bin",
|
126 |
+
"model.layers.17.self_attn.v_proj.bias": "pytorch_model-00005-of-00009.bin",
|
127 |
+
"model.layers.17.self_attn.v_proj.weight": "pytorch_model-00005-of-00009.bin",
|
128 |
+
"model.layers.18.input_layernorm.weight": "pytorch_model-00006-of-00009.bin",
|
129 |
+
"model.layers.18.mlp.down_proj.weight": "pytorch_model-00006-of-00009.bin",
|
130 |
+
"model.layers.18.mlp.gate_proj.weight": "pytorch_model-00006-of-00009.bin",
|
131 |
+
"model.layers.18.mlp.up_proj.weight": "pytorch_model-00006-of-00009.bin",
|
132 |
+
"model.layers.18.post_attention_layernorm.weight": "pytorch_model-00006-of-00009.bin",
|
133 |
+
"model.layers.18.self_attn.k_proj.bias": "pytorch_model-00006-of-00009.bin",
|
134 |
+
"model.layers.18.self_attn.k_proj.weight": "pytorch_model-00006-of-00009.bin",
|
135 |
+
"model.layers.18.self_attn.o_proj.weight": "pytorch_model-00006-of-00009.bin",
|
136 |
+
"model.layers.18.self_attn.q_proj.bias": "pytorch_model-00006-of-00009.bin",
|
137 |
+
"model.layers.18.self_attn.q_proj.weight": "pytorch_model-00006-of-00009.bin",
|
138 |
+
"model.layers.18.self_attn.v_proj.bias": "pytorch_model-00006-of-00009.bin",
|
139 |
+
"model.layers.18.self_attn.v_proj.weight": "pytorch_model-00006-of-00009.bin",
|
140 |
+
"model.layers.19.input_layernorm.weight": "pytorch_model-00006-of-00009.bin",
|
141 |
+
"model.layers.19.mlp.down_proj.weight": "pytorch_model-00006-of-00009.bin",
|
142 |
+
"model.layers.19.mlp.gate_proj.weight": "pytorch_model-00006-of-00009.bin",
|
143 |
+
"model.layers.19.mlp.up_proj.weight": "pytorch_model-00006-of-00009.bin",
|
144 |
+
"model.layers.19.post_attention_layernorm.weight": "pytorch_model-00006-of-00009.bin",
|
145 |
+
"model.layers.19.self_attn.k_proj.bias": "pytorch_model-00006-of-00009.bin",
|
146 |
+
"model.layers.19.self_attn.k_proj.weight": "pytorch_model-00006-of-00009.bin",
|
147 |
+
"model.layers.19.self_attn.o_proj.weight": "pytorch_model-00006-of-00009.bin",
|
148 |
+
"model.layers.19.self_attn.q_proj.bias": "pytorch_model-00006-of-00009.bin",
|
149 |
+
"model.layers.19.self_attn.q_proj.weight": "pytorch_model-00006-of-00009.bin",
|
150 |
+
"model.layers.19.self_attn.v_proj.bias": "pytorch_model-00006-of-00009.bin",
|
151 |
+
"model.layers.19.self_attn.v_proj.weight": "pytorch_model-00006-of-00009.bin",
|
152 |
+
"model.layers.2.input_layernorm.weight": "pytorch_model-00002-of-00009.bin",
|
153 |
+
"model.layers.2.mlp.down_proj.weight": "pytorch_model-00002-of-00009.bin",
|
154 |
+
"model.layers.2.mlp.gate_proj.weight": "pytorch_model-00002-of-00009.bin",
|
155 |
+
"model.layers.2.mlp.up_proj.weight": "pytorch_model-00002-of-00009.bin",
|
156 |
+
"model.layers.2.post_attention_layernorm.weight": "pytorch_model-00002-of-00009.bin",
|
157 |
+
"model.layers.2.self_attn.k_proj.bias": "pytorch_model-00002-of-00009.bin",
|
158 |
+
"model.layers.2.self_attn.k_proj.weight": "pytorch_model-00002-of-00009.bin",
|
159 |
+
"model.layers.2.self_attn.o_proj.weight": "pytorch_model-00002-of-00009.bin",
|
160 |
+
"model.layers.2.self_attn.q_proj.bias": "pytorch_model-00002-of-00009.bin",
|
161 |
+
"model.layers.2.self_attn.q_proj.weight": "pytorch_model-00002-of-00009.bin",
|
162 |
+
"model.layers.2.self_attn.v_proj.bias": "pytorch_model-00002-of-00009.bin",
|
163 |
+
"model.layers.2.self_attn.v_proj.weight": "pytorch_model-00002-of-00009.bin",
|
164 |
+
"model.layers.20.input_layernorm.weight": "pytorch_model-00006-of-00009.bin",
|
165 |
+
"model.layers.20.mlp.down_proj.weight": "pytorch_model-00006-of-00009.bin",
|
166 |
+
"model.layers.20.mlp.gate_proj.weight": "pytorch_model-00006-of-00009.bin",
|
167 |
+
"model.layers.20.mlp.up_proj.weight": "pytorch_model-00006-of-00009.bin",
|
168 |
+
"model.layers.20.post_attention_layernorm.weight": "pytorch_model-00006-of-00009.bin",
|
169 |
+
"model.layers.20.self_attn.k_proj.bias": "pytorch_model-00006-of-00009.bin",
|
170 |
+
"model.layers.20.self_attn.k_proj.weight": "pytorch_model-00006-of-00009.bin",
|
171 |
+
"model.layers.20.self_attn.o_proj.weight": "pytorch_model-00006-of-00009.bin",
|
172 |
+
"model.layers.20.self_attn.q_proj.bias": "pytorch_model-00006-of-00009.bin",
|
173 |
+
"model.layers.20.self_attn.q_proj.weight": "pytorch_model-00006-of-00009.bin",
|
174 |
+
"model.layers.20.self_attn.v_proj.bias": "pytorch_model-00006-of-00009.bin",
|
175 |
+
"model.layers.20.self_attn.v_proj.weight": "pytorch_model-00006-of-00009.bin",
|
176 |
+
"model.layers.21.input_layernorm.weight": "pytorch_model-00007-of-00009.bin",
|
177 |
+
"model.layers.21.mlp.down_proj.weight": "pytorch_model-00007-of-00009.bin",
|
178 |
+
"model.layers.21.mlp.gate_proj.weight": "pytorch_model-00006-of-00009.bin",
|
179 |
+
"model.layers.21.mlp.up_proj.weight": "pytorch_model-00006-of-00009.bin",
|
180 |
+
"model.layers.21.post_attention_layernorm.weight": "pytorch_model-00007-of-00009.bin",
|
181 |
+
"model.layers.21.self_attn.k_proj.bias": "pytorch_model-00006-of-00009.bin",
|
182 |
+
"model.layers.21.self_attn.k_proj.weight": "pytorch_model-00006-of-00009.bin",
|
183 |
+
"model.layers.21.self_attn.o_proj.weight": "pytorch_model-00006-of-00009.bin",
|
184 |
+
"model.layers.21.self_attn.q_proj.bias": "pytorch_model-00006-of-00009.bin",
|
185 |
+
"model.layers.21.self_attn.q_proj.weight": "pytorch_model-00006-of-00009.bin",
|
186 |
+
"model.layers.21.self_attn.v_proj.bias": "pytorch_model-00006-of-00009.bin",
|
187 |
+
"model.layers.21.self_attn.v_proj.weight": "pytorch_model-00006-of-00009.bin",
|
188 |
+
"model.layers.22.input_layernorm.weight": "pytorch_model-00007-of-00009.bin",
|
189 |
+
"model.layers.22.mlp.down_proj.weight": "pytorch_model-00007-of-00009.bin",
|
190 |
+
"model.layers.22.mlp.gate_proj.weight": "pytorch_model-00007-of-00009.bin",
|
191 |
+
"model.layers.22.mlp.up_proj.weight": "pytorch_model-00007-of-00009.bin",
|
192 |
+
"model.layers.22.post_attention_layernorm.weight": "pytorch_model-00007-of-00009.bin",
|
193 |
+
"model.layers.22.self_attn.k_proj.bias": "pytorch_model-00007-of-00009.bin",
|
194 |
+
"model.layers.22.self_attn.k_proj.weight": "pytorch_model-00007-of-00009.bin",
|
195 |
+
"model.layers.22.self_attn.o_proj.weight": "pytorch_model-00007-of-00009.bin",
|
196 |
+
"model.layers.22.self_attn.q_proj.bias": "pytorch_model-00007-of-00009.bin",
|
197 |
+
"model.layers.22.self_attn.q_proj.weight": "pytorch_model-00007-of-00009.bin",
|
198 |
+
"model.layers.22.self_attn.v_proj.bias": "pytorch_model-00007-of-00009.bin",
|
199 |
+
"model.layers.22.self_attn.v_proj.weight": "pytorch_model-00007-of-00009.bin",
|
200 |
+
"model.layers.23.input_layernorm.weight": "pytorch_model-00007-of-00009.bin",
|
201 |
+
"model.layers.23.mlp.down_proj.weight": "pytorch_model-00007-of-00009.bin",
|
202 |
+
"model.layers.23.mlp.gate_proj.weight": "pytorch_model-00007-of-00009.bin",
|
203 |
+
"model.layers.23.mlp.up_proj.weight": "pytorch_model-00007-of-00009.bin",
|
204 |
+
"model.layers.23.post_attention_layernorm.weight": "pytorch_model-00007-of-00009.bin",
|
205 |
+
"model.layers.23.self_attn.k_proj.bias": "pytorch_model-00007-of-00009.bin",
|
206 |
+
"model.layers.23.self_attn.k_proj.weight": "pytorch_model-00007-of-00009.bin",
|
207 |
+
"model.layers.23.self_attn.o_proj.weight": "pytorch_model-00007-of-00009.bin",
|
208 |
+
"model.layers.23.self_attn.q_proj.bias": "pytorch_model-00007-of-00009.bin",
|
209 |
+
"model.layers.23.self_attn.q_proj.weight": "pytorch_model-00007-of-00009.bin",
|
210 |
+
"model.layers.23.self_attn.v_proj.bias": "pytorch_model-00007-of-00009.bin",
|
211 |
+
"model.layers.23.self_attn.v_proj.weight": "pytorch_model-00007-of-00009.bin",
|
212 |
+
"model.layers.24.input_layernorm.weight": "pytorch_model-00007-of-00009.bin",
|
213 |
+
"model.layers.24.mlp.down_proj.weight": "pytorch_model-00007-of-00009.bin",
|
214 |
+
"model.layers.24.mlp.gate_proj.weight": "pytorch_model-00007-of-00009.bin",
|
215 |
+
"model.layers.24.mlp.up_proj.weight": "pytorch_model-00007-of-00009.bin",
|
216 |
+
"model.layers.24.post_attention_layernorm.weight": "pytorch_model-00007-of-00009.bin",
|
217 |
+
"model.layers.24.self_attn.k_proj.bias": "pytorch_model-00007-of-00009.bin",
|
218 |
+
"model.layers.24.self_attn.k_proj.weight": "pytorch_model-00007-of-00009.bin",
|
219 |
+
"model.layers.24.self_attn.o_proj.weight": "pytorch_model-00007-of-00009.bin",
|
220 |
+
"model.layers.24.self_attn.q_proj.bias": "pytorch_model-00007-of-00009.bin",
|
221 |
+
"model.layers.24.self_attn.q_proj.weight": "pytorch_model-00007-of-00009.bin",
|
222 |
+
"model.layers.24.self_attn.v_proj.bias": "pytorch_model-00007-of-00009.bin",
|
223 |
+
"model.layers.24.self_attn.v_proj.weight": "pytorch_model-00007-of-00009.bin",
|
224 |
+
"model.layers.25.input_layernorm.weight": "pytorch_model-00008-of-00009.bin",
|
225 |
+
"model.layers.25.mlp.down_proj.weight": "pytorch_model-00008-of-00009.bin",
|
226 |
+
"model.layers.25.mlp.gate_proj.weight": "pytorch_model-00007-of-00009.bin",
|
227 |
+
"model.layers.25.mlp.up_proj.weight": "pytorch_model-00007-of-00009.bin",
|
228 |
+
"model.layers.25.post_attention_layernorm.weight": "pytorch_model-00008-of-00009.bin",
|
229 |
+
"model.layers.25.self_attn.k_proj.bias": "pytorch_model-00007-of-00009.bin",
|
230 |
+
"model.layers.25.self_attn.k_proj.weight": "pytorch_model-00007-of-00009.bin",
|
231 |
+
"model.layers.25.self_attn.o_proj.weight": "pytorch_model-00007-of-00009.bin",
|
232 |
+
"model.layers.25.self_attn.q_proj.bias": "pytorch_model-00007-of-00009.bin",
|
233 |
+
"model.layers.25.self_attn.q_proj.weight": "pytorch_model-00007-of-00009.bin",
|
234 |
+
"model.layers.25.self_attn.v_proj.bias": "pytorch_model-00007-of-00009.bin",
|
235 |
+
"model.layers.25.self_attn.v_proj.weight": "pytorch_model-00007-of-00009.bin",
|
236 |
+
"model.layers.26.input_layernorm.weight": "pytorch_model-00008-of-00009.bin",
|
237 |
+
"model.layers.26.mlp.down_proj.weight": "pytorch_model-00008-of-00009.bin",
|
238 |
+
"model.layers.26.mlp.gate_proj.weight": "pytorch_model-00008-of-00009.bin",
|
239 |
+
"model.layers.26.mlp.up_proj.weight": "pytorch_model-00008-of-00009.bin",
|
240 |
+
"model.layers.26.post_attention_layernorm.weight": "pytorch_model-00008-of-00009.bin",
|
241 |
+
"model.layers.26.self_attn.k_proj.bias": "pytorch_model-00008-of-00009.bin",
|
242 |
+
"model.layers.26.self_attn.k_proj.weight": "pytorch_model-00008-of-00009.bin",
|
243 |
+
"model.layers.26.self_attn.o_proj.weight": "pytorch_model-00008-of-00009.bin",
|
244 |
+
"model.layers.26.self_attn.q_proj.bias": "pytorch_model-00008-of-00009.bin",
|
245 |
+
"model.layers.26.self_attn.q_proj.weight": "pytorch_model-00008-of-00009.bin",
|
246 |
+
"model.layers.26.self_attn.v_proj.bias": "pytorch_model-00008-of-00009.bin",
|
247 |
+
"model.layers.26.self_attn.v_proj.weight": "pytorch_model-00008-of-00009.bin",
|
248 |
+
"model.layers.27.input_layernorm.weight": "pytorch_model-00008-of-00009.bin",
|
249 |
+
"model.layers.27.mlp.down_proj.weight": "pytorch_model-00008-of-00009.bin",
|
250 |
+
"model.layers.27.mlp.gate_proj.weight": "pytorch_model-00008-of-00009.bin",
|
251 |
+
"model.layers.27.mlp.up_proj.weight": "pytorch_model-00008-of-00009.bin",
|
252 |
+
"model.layers.27.post_attention_layernorm.weight": "pytorch_model-00008-of-00009.bin",
|
253 |
+
"model.layers.27.self_attn.k_proj.bias": "pytorch_model-00008-of-00009.bin",
|
254 |
+
"model.layers.27.self_attn.k_proj.weight": "pytorch_model-00008-of-00009.bin",
|
255 |
+
"model.layers.27.self_attn.o_proj.weight": "pytorch_model-00008-of-00009.bin",
|
256 |
+
"model.layers.27.self_attn.q_proj.bias": "pytorch_model-00008-of-00009.bin",
|
257 |
+
"model.layers.27.self_attn.q_proj.weight": "pytorch_model-00008-of-00009.bin",
|
258 |
+
"model.layers.27.self_attn.v_proj.bias": "pytorch_model-00008-of-00009.bin",
|
259 |
+
"model.layers.27.self_attn.v_proj.weight": "pytorch_model-00008-of-00009.bin",
|
260 |
+
"model.layers.3.input_layernorm.weight": "pytorch_model-00002-of-00009.bin",
|
261 |
+
"model.layers.3.mlp.down_proj.weight": "pytorch_model-00002-of-00009.bin",
|
262 |
+
"model.layers.3.mlp.gate_proj.weight": "pytorch_model-00002-of-00009.bin",
|
263 |
+
"model.layers.3.mlp.up_proj.weight": "pytorch_model-00002-of-00009.bin",
|
264 |
+
"model.layers.3.post_attention_layernorm.weight": "pytorch_model-00002-of-00009.bin",
|
265 |
+
"model.layers.3.self_attn.k_proj.bias": "pytorch_model-00002-of-00009.bin",
|
266 |
+
"model.layers.3.self_attn.k_proj.weight": "pytorch_model-00002-of-00009.bin",
|
267 |
+
"model.layers.3.self_attn.o_proj.weight": "pytorch_model-00002-of-00009.bin",
|
268 |
+
"model.layers.3.self_attn.q_proj.bias": "pytorch_model-00002-of-00009.bin",
|
269 |
+
"model.layers.3.self_attn.q_proj.weight": "pytorch_model-00002-of-00009.bin",
|
270 |
+
"model.layers.3.self_attn.v_proj.bias": "pytorch_model-00002-of-00009.bin",
|
271 |
+
"model.layers.3.self_attn.v_proj.weight": "pytorch_model-00002-of-00009.bin",
|
272 |
+
"model.layers.4.input_layernorm.weight": "pytorch_model-00002-of-00009.bin",
|
273 |
+
"model.layers.4.mlp.down_proj.weight": "pytorch_model-00002-of-00009.bin",
|
274 |
+
"model.layers.4.mlp.gate_proj.weight": "pytorch_model-00002-of-00009.bin",
|
275 |
+
"model.layers.4.mlp.up_proj.weight": "pytorch_model-00002-of-00009.bin",
|
276 |
+
"model.layers.4.post_attention_layernorm.weight": "pytorch_model-00002-of-00009.bin",
|
277 |
+
"model.layers.4.self_attn.k_proj.bias": "pytorch_model-00002-of-00009.bin",
|
278 |
+
"model.layers.4.self_attn.k_proj.weight": "pytorch_model-00002-of-00009.bin",
|
279 |
+
"model.layers.4.self_attn.o_proj.weight": "pytorch_model-00002-of-00009.bin",
|
280 |
+
"model.layers.4.self_attn.q_proj.bias": "pytorch_model-00002-of-00009.bin",
|
281 |
+
"model.layers.4.self_attn.q_proj.weight": "pytorch_model-00002-of-00009.bin",
|
282 |
+
"model.layers.4.self_attn.v_proj.bias": "pytorch_model-00002-of-00009.bin",
|
283 |
+
"model.layers.4.self_attn.v_proj.weight": "pytorch_model-00002-of-00009.bin",
|
284 |
+
"model.layers.5.input_layernorm.weight": "pytorch_model-00003-of-00009.bin",
|
285 |
+
"model.layers.5.mlp.down_proj.weight": "pytorch_model-00003-of-00009.bin",
|
286 |
+
"model.layers.5.mlp.gate_proj.weight": "pytorch_model-00002-of-00009.bin",
|
287 |
+
"model.layers.5.mlp.up_proj.weight": "pytorch_model-00002-of-00009.bin",
|
288 |
+
"model.layers.5.post_attention_layernorm.weight": "pytorch_model-00003-of-00009.bin",
|
289 |
+
"model.layers.5.self_attn.k_proj.bias": "pytorch_model-00002-of-00009.bin",
|
290 |
+
"model.layers.5.self_attn.k_proj.weight": "pytorch_model-00002-of-00009.bin",
|
291 |
+
"model.layers.5.self_attn.o_proj.weight": "pytorch_model-00002-of-00009.bin",
|
292 |
+
"model.layers.5.self_attn.q_proj.bias": "pytorch_model-00002-of-00009.bin",
|
293 |
+
"model.layers.5.self_attn.q_proj.weight": "pytorch_model-00002-of-00009.bin",
|
294 |
+
"model.layers.5.self_attn.v_proj.bias": "pytorch_model-00002-of-00009.bin",
|
295 |
+
"model.layers.5.self_attn.v_proj.weight": "pytorch_model-00002-of-00009.bin",
|
296 |
+
"model.layers.6.input_layernorm.weight": "pytorch_model-00003-of-00009.bin",
|
297 |
+
"model.layers.6.mlp.down_proj.weight": "pytorch_model-00003-of-00009.bin",
|
298 |
+
"model.layers.6.mlp.gate_proj.weight": "pytorch_model-00003-of-00009.bin",
|
299 |
+
"model.layers.6.mlp.up_proj.weight": "pytorch_model-00003-of-00009.bin",
|
300 |
+
"model.layers.6.post_attention_layernorm.weight": "pytorch_model-00003-of-00009.bin",
|
301 |
+
"model.layers.6.self_attn.k_proj.bias": "pytorch_model-00003-of-00009.bin",
|
302 |
+
"model.layers.6.self_attn.k_proj.weight": "pytorch_model-00003-of-00009.bin",
|
303 |
+
"model.layers.6.self_attn.o_proj.weight": "pytorch_model-00003-of-00009.bin",
|
304 |
+
"model.layers.6.self_attn.q_proj.bias": "pytorch_model-00003-of-00009.bin",
|
305 |
+
"model.layers.6.self_attn.q_proj.weight": "pytorch_model-00003-of-00009.bin",
|
306 |
+
"model.layers.6.self_attn.v_proj.bias": "pytorch_model-00003-of-00009.bin",
|
307 |
+
"model.layers.6.self_attn.v_proj.weight": "pytorch_model-00003-of-00009.bin",
|
308 |
+
"model.layers.7.input_layernorm.weight": "pytorch_model-00003-of-00009.bin",
|
309 |
+
"model.layers.7.mlp.down_proj.weight": "pytorch_model-00003-of-00009.bin",
|
310 |
+
"model.layers.7.mlp.gate_proj.weight": "pytorch_model-00003-of-00009.bin",
|
311 |
+
"model.layers.7.mlp.up_proj.weight": "pytorch_model-00003-of-00009.bin",
|
312 |
+
"model.layers.7.post_attention_layernorm.weight": "pytorch_model-00003-of-00009.bin",
|
313 |
+
"model.layers.7.self_attn.k_proj.bias": "pytorch_model-00003-of-00009.bin",
|
314 |
+
"model.layers.7.self_attn.k_proj.weight": "pytorch_model-00003-of-00009.bin",
|
315 |
+
"model.layers.7.self_attn.o_proj.weight": "pytorch_model-00003-of-00009.bin",
|
316 |
+
"model.layers.7.self_attn.q_proj.bias": "pytorch_model-00003-of-00009.bin",
|
317 |
+
"model.layers.7.self_attn.q_proj.weight": "pytorch_model-00003-of-00009.bin",
|
318 |
+
"model.layers.7.self_attn.v_proj.bias": "pytorch_model-00003-of-00009.bin",
|
319 |
+
"model.layers.7.self_attn.v_proj.weight": "pytorch_model-00003-of-00009.bin",
|
320 |
+
"model.layers.8.input_layernorm.weight": "pytorch_model-00003-of-00009.bin",
|
321 |
+
"model.layers.8.mlp.down_proj.weight": "pytorch_model-00003-of-00009.bin",
|
322 |
+
"model.layers.8.mlp.gate_proj.weight": "pytorch_model-00003-of-00009.bin",
|
323 |
+
"model.layers.8.mlp.up_proj.weight": "pytorch_model-00003-of-00009.bin",
|
324 |
+
"model.layers.8.post_attention_layernorm.weight": "pytorch_model-00003-of-00009.bin",
|
325 |
+
"model.layers.8.self_attn.k_proj.bias": "pytorch_model-00003-of-00009.bin",
|
326 |
+
"model.layers.8.self_attn.k_proj.weight": "pytorch_model-00003-of-00009.bin",
|
327 |
+
"model.layers.8.self_attn.o_proj.weight": "pytorch_model-00003-of-00009.bin",
|
328 |
+
"model.layers.8.self_attn.q_proj.bias": "pytorch_model-00003-of-00009.bin",
|
329 |
+
"model.layers.8.self_attn.q_proj.weight": "pytorch_model-00003-of-00009.bin",
|
330 |
+
"model.layers.8.self_attn.v_proj.bias": "pytorch_model-00003-of-00009.bin",
|
331 |
+
"model.layers.8.self_attn.v_proj.weight": "pytorch_model-00003-of-00009.bin",
|
332 |
+
"model.layers.9.input_layernorm.weight": "pytorch_model-00004-of-00009.bin",
|
333 |
+
"model.layers.9.mlp.down_proj.weight": "pytorch_model-00004-of-00009.bin",
|
334 |
+
"model.layers.9.mlp.gate_proj.weight": "pytorch_model-00003-of-00009.bin",
|
335 |
+
"model.layers.9.mlp.up_proj.weight": "pytorch_model-00003-of-00009.bin",
|
336 |
+
"model.layers.9.post_attention_layernorm.weight": "pytorch_model-00004-of-00009.bin",
|
337 |
+
"model.layers.9.self_attn.k_proj.bias": "pytorch_model-00003-of-00009.bin",
|
338 |
+
"model.layers.9.self_attn.k_proj.weight": "pytorch_model-00003-of-00009.bin",
|
339 |
+
"model.layers.9.self_attn.o_proj.weight": "pytorch_model-00003-of-00009.bin",
|
340 |
+
"model.layers.9.self_attn.q_proj.bias": "pytorch_model-00003-of-00009.bin",
|
341 |
+
"model.layers.9.self_attn.q_proj.weight": "pytorch_model-00003-of-00009.bin",
|
342 |
+
"model.layers.9.self_attn.v_proj.bias": "pytorch_model-00003-of-00009.bin",
|
343 |
+
"model.layers.9.self_attn.v_proj.weight": "pytorch_model-00003-of-00009.bin",
|
344 |
+
"model.norm.weight": "pytorch_model-00008-of-00009.bin"
|
345 |
+
}
|
346 |
+
}
|
LongWriter-Qwen+LongDPO/special_tokens_map.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_start|>",
|
4 |
+
"<|im_end|>",
|
5 |
+
"<|object_ref_start|>",
|
6 |
+
"<|object_ref_end|>",
|
7 |
+
"<|box_start|>",
|
8 |
+
"<|box_end|>",
|
9 |
+
"<|quad_start|>",
|
10 |
+
"<|quad_end|>",
|
11 |
+
"<|vision_start|>",
|
12 |
+
"<|vision_end|>",
|
13 |
+
"<|vision_pad|>",
|
14 |
+
"<|image_pad|>",
|
15 |
+
"<|video_pad|>"
|
16 |
+
],
|
17 |
+
"eos_token": {
|
18 |
+
"content": "<|im_end|>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": false,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
},
|
24 |
+
"pad_token": {
|
25 |
+
"content": "<|endoftext|>",
|
26 |
+
"lstrip": false,
|
27 |
+
"normalized": false,
|
28 |
+
"rstrip": false,
|
29 |
+
"single_word": false
|
30 |
+
}
|
31 |
+
}
|
LongWriter-Qwen+LongDPO/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LongWriter-Qwen+LongDPO/tokenizer_config.json
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_prefix_space": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"151643": {
|
6 |
+
"content": "<|endoftext|>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"151644": {
|
14 |
+
"content": "<|im_start|>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"151645": {
|
22 |
+
"content": "<|im_end|>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"151646": {
|
30 |
+
"content": "<|object_ref_start|>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"151647": {
|
38 |
+
"content": "<|object_ref_end|>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
},
|
45 |
+
"151648": {
|
46 |
+
"content": "<|box_start|>",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": false,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false,
|
51 |
+
"special": true
|
52 |
+
},
|
53 |
+
"151649": {
|
54 |
+
"content": "<|box_end|>",
|
55 |
+
"lstrip": false,
|
56 |
+
"normalized": false,
|
57 |
+
"rstrip": false,
|
58 |
+
"single_word": false,
|
59 |
+
"special": true
|
60 |
+
},
|
61 |
+
"151650": {
|
62 |
+
"content": "<|quad_start|>",
|
63 |
+
"lstrip": false,
|
64 |
+
"normalized": false,
|
65 |
+
"rstrip": false,
|
66 |
+
"single_word": false,
|
67 |
+
"special": true
|
68 |
+
},
|
69 |
+
"151651": {
|
70 |
+
"content": "<|quad_end|>",
|
71 |
+
"lstrip": false,
|
72 |
+
"normalized": false,
|
73 |
+
"rstrip": false,
|
74 |
+
"single_word": false,
|
75 |
+
"special": true
|
76 |
+
},
|
77 |
+
"151652": {
|
78 |
+
"content": "<|vision_start|>",
|
79 |
+
"lstrip": false,
|
80 |
+
"normalized": false,
|
81 |
+
"rstrip": false,
|
82 |
+
"single_word": false,
|
83 |
+
"special": true
|
84 |
+
},
|
85 |
+
"151653": {
|
86 |
+
"content": "<|vision_end|>",
|
87 |
+
"lstrip": false,
|
88 |
+
"normalized": false,
|
89 |
+
"rstrip": false,
|
90 |
+
"single_word": false,
|
91 |
+
"special": true
|
92 |
+
},
|
93 |
+
"151654": {
|
94 |
+
"content": "<|vision_pad|>",
|
95 |
+
"lstrip": false,
|
96 |
+
"normalized": false,
|
97 |
+
"rstrip": false,
|
98 |
+
"single_word": false,
|
99 |
+
"special": true
|
100 |
+
},
|
101 |
+
"151655": {
|
102 |
+
"content": "<|image_pad|>",
|
103 |
+
"lstrip": false,
|
104 |
+
"normalized": false,
|
105 |
+
"rstrip": false,
|
106 |
+
"single_word": false,
|
107 |
+
"special": true
|
108 |
+
},
|
109 |
+
"151656": {
|
110 |
+
"content": "<|video_pad|>",
|
111 |
+
"lstrip": false,
|
112 |
+
"normalized": false,
|
113 |
+
"rstrip": false,
|
114 |
+
"single_word": false,
|
115 |
+
"special": true
|
116 |
+
},
|
117 |
+
"151657": {
|
118 |
+
"content": "<tool_call>",
|
119 |
+
"lstrip": false,
|
120 |
+
"normalized": false,
|
121 |
+
"rstrip": false,
|
122 |
+
"single_word": false,
|
123 |
+
"special": false
|
124 |
+
},
|
125 |
+
"151658": {
|
126 |
+
"content": "</tool_call>",
|
127 |
+
"lstrip": false,
|
128 |
+
"normalized": false,
|
129 |
+
"rstrip": false,
|
130 |
+
"single_word": false,
|
131 |
+
"special": false
|
132 |
+
},
|
133 |
+
"151659": {
|
134 |
+
"content": "<|fim_prefix|>",
|
135 |
+
"lstrip": false,
|
136 |
+
"normalized": false,
|
137 |
+
"rstrip": false,
|
138 |
+
"single_word": false,
|
139 |
+
"special": false
|
140 |
+
},
|
141 |
+
"151660": {
|
142 |
+
"content": "<|fim_middle|>",
|
143 |
+
"lstrip": false,
|
144 |
+
"normalized": false,
|
145 |
+
"rstrip": false,
|
146 |
+
"single_word": false,
|
147 |
+
"special": false
|
148 |
+
},
|
149 |
+
"151661": {
|
150 |
+
"content": "<|fim_suffix|>",
|
151 |
+
"lstrip": false,
|
152 |
+
"normalized": false,
|
153 |
+
"rstrip": false,
|
154 |
+
"single_word": false,
|
155 |
+
"special": false
|
156 |
+
},
|
157 |
+
"151662": {
|
158 |
+
"content": "<|fim_pad|>",
|
159 |
+
"lstrip": false,
|
160 |
+
"normalized": false,
|
161 |
+
"rstrip": false,
|
162 |
+
"single_word": false,
|
163 |
+
"special": false
|
164 |
+
},
|
165 |
+
"151663": {
|
166 |
+
"content": "<|repo_name|>",
|
167 |
+
"lstrip": false,
|
168 |
+
"normalized": false,
|
169 |
+
"rstrip": false,
|
170 |
+
"single_word": false,
|
171 |
+
"special": false
|
172 |
+
},
|
173 |
+
"151664": {
|
174 |
+
"content": "<|file_sep|>",
|
175 |
+
"lstrip": false,
|
176 |
+
"normalized": false,
|
177 |
+
"rstrip": false,
|
178 |
+
"single_word": false,
|
179 |
+
"special": false
|
180 |
+
}
|
181 |
+
},
|
182 |
+
"additional_special_tokens": [
|
183 |
+
"<|im_start|>",
|
184 |
+
"<|im_end|>",
|
185 |
+
"<|object_ref_start|>",
|
186 |
+
"<|object_ref_end|>",
|
187 |
+
"<|box_start|>",
|
188 |
+
"<|box_end|>",
|
189 |
+
"<|quad_start|>",
|
190 |
+
"<|quad_end|>",
|
191 |
+
"<|vision_start|>",
|
192 |
+
"<|vision_end|>",
|
193 |
+
"<|vision_pad|>",
|
194 |
+
"<|image_pad|>",
|
195 |
+
"<|video_pad|>"
|
196 |
+
],
|
197 |
+
"bos_token": null,
|
198 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
199 |
+
"clean_up_tokenization_spaces": false,
|
200 |
+
"eos_token": "<|im_end|>",
|
201 |
+
"errors": "replace",
|
202 |
+
"model_max_length": 131072,
|
203 |
+
"pad_token": "<|endoftext|>",
|
204 |
+
"padding_side": "right",
|
205 |
+
"split_special_tokens": false,
|
206 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
207 |
+
"unk_token": null
|
208 |
+
}
|
LongWriter-Qwen+LongDPO/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LongWriter-Qwen+LongDPO/xtuner_config.py
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) OpenMMLab. All rights reserved.
|
2 |
+
import torch
|
3 |
+
from datasets import load_dataset
|
4 |
+
from mmengine.dataset import DefaultSampler
|
5 |
+
from mmengine.hooks import (CheckpointHook, DistSamplerSeedHook, IterTimerHook,
|
6 |
+
LoggerHook, ParamSchedulerHook)
|
7 |
+
from mmengine.optim import AmpOptimWrapper, CosineAnnealingLR, LinearLR
|
8 |
+
from peft import LoraConfig
|
9 |
+
from torch.optim import AdamW
|
10 |
+
from transformers import (AutoModelForCausalLM, AutoTokenizer,
|
11 |
+
BitsAndBytesConfig)
|
12 |
+
|
13 |
+
from xtuner.dataset.collate_fns.preference_collate_fn import \
|
14 |
+
preference_collate_fn
|
15 |
+
from xtuner.dataset.preference_dataset import (build_preference_dataset,
|
16 |
+
orpo_dpo_mix_40k_map_fn,ultrafeedback_dpo_map_fn,load_jsonl_dataset)
|
17 |
+
from xtuner.engine.hooks import (DatasetInfoHook, EvaluateChatHook,
|
18 |
+
VarlenAttnArgsToMessageHubHook)
|
19 |
+
from xtuner.engine.runner import TrainLoop
|
20 |
+
from xtuner.model.dpo import DPO
|
21 |
+
from xtuner.parallel.sequence import SequenceParallelSampler
|
22 |
+
from xtuner.utils import PROMPT_TEMPLATE, SYSTEM_TEMPLATE
|
23 |
+
#######################################################################
|
24 |
+
# PART 1 Settings #
|
25 |
+
#######################################################################
|
26 |
+
# Model
|
27 |
+
pretrained_model_name_or_path = '/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/models/LongWriter-Qwen2.5-7B-Instruct/'
|
28 |
+
use_varlen_attn = True
|
29 |
+
dpo_loss_type = 'sigmoid' # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: E501
|
30 |
+
loss_beta = 0.1
|
31 |
+
label_smoothing = 0.0
|
32 |
+
|
33 |
+
# Data
|
34 |
+
# prompt_template = PROMPT_TEMPLATE.llama3_chat
|
35 |
+
prompt_template = PROMPT_TEMPLATE.qwen_chat # llama2_chat
|
36 |
+
max_length = 32768
|
37 |
+
max_packed_length = max_length
|
38 |
+
|
39 |
+
# parallel
|
40 |
+
sequence_parallel_size = 2
|
41 |
+
|
42 |
+
# Scheduler & Optimizer
|
43 |
+
batch_size = 1 # per_device
|
44 |
+
accumulative_counts = 1
|
45 |
+
accumulative_counts *= sequence_parallel_size
|
46 |
+
dataloader_num_workers = 0
|
47 |
+
max_epochs = 2
|
48 |
+
optim_type = AdamW
|
49 |
+
lr = 1e-6 # refer to alignment handbook
|
50 |
+
betas = (0.9, 0.999)
|
51 |
+
weight_decay = 0
|
52 |
+
max_norm = 1 # grad clip
|
53 |
+
warmup_ratio = 0.1 # 0.03
|
54 |
+
|
55 |
+
# Save
|
56 |
+
save_steps = 100
|
57 |
+
save_total_limit = -1 # Maximum checkpoints to keep (-1 means unlimited)
|
58 |
+
|
59 |
+
# Evaluate the generation performance during the training
|
60 |
+
evaluation_freq = 500
|
61 |
+
SYSTEM = SYSTEM_TEMPLATE.alpaca
|
62 |
+
evaluation_inputs = [
|
63 |
+
'What famous British author, known for his tales of mystery and the macabre, shares his initials with a common abbreviation for "rest in peace"?', # noqa: E501
|
64 |
+
'Please tell me five scenic spots in Shanghai',
|
65 |
+
'890729 - 425663? Only respond with math and no words.'
|
66 |
+
]
|
67 |
+
|
68 |
+
#######################################################################
|
69 |
+
# PART 2 Model & Tokenizer #
|
70 |
+
#######################################################################
|
71 |
+
tokenizer = dict(
|
72 |
+
type=AutoTokenizer.from_pretrained,
|
73 |
+
pretrained_model_name_or_path=pretrained_model_name_or_path,
|
74 |
+
trust_remote_code=True,
|
75 |
+
padding_side='right')
|
76 |
+
|
77 |
+
model = dict(
|
78 |
+
type=DPO,
|
79 |
+
loss_type=dpo_loss_type,
|
80 |
+
use_varlen_attn=use_varlen_attn,
|
81 |
+
beta=loss_beta,
|
82 |
+
label_smoothing=label_smoothing,
|
83 |
+
llm=dict(
|
84 |
+
type=AutoModelForCausalLM.from_pretrained,
|
85 |
+
pretrained_model_name_or_path=pretrained_model_name_or_path,
|
86 |
+
trust_remote_code=True,
|
87 |
+
torch_dtype=torch.bfloat16,
|
88 |
+
),
|
89 |
+
ref_llm=dict( ##### initialization of ref_llm #######
|
90 |
+
type=AutoModelForCausalLM.from_pretrained,
|
91 |
+
pretrained_model_name_or_path=pretrained_model_name_or_path,
|
92 |
+
trust_remote_code=True,
|
93 |
+
torch_dtype=torch.bfloat16,
|
94 |
+
),
|
95 |
+
)
|
96 |
+
# llm=dict(
|
97 |
+
# type=AutoModelForCausalLM.from_pretrained,
|
98 |
+
# pretrained_model_name_or_path=pretrained_model_name_or_path,
|
99 |
+
# trust_remote_code=True,
|
100 |
+
# torch_dtype=torch.float16,
|
101 |
+
# quantization_config=dict(
|
102 |
+
# type=BitsAndBytesConfig,
|
103 |
+
# load_in_4bit=True,
|
104 |
+
# load_in_8bit=False,
|
105 |
+
# llm_int8_threshold=6.0,
|
106 |
+
# llm_int8_has_fp16_weight=False,
|
107 |
+
# bnb_4bit_compute_dtype=torch.float16,
|
108 |
+
# bnb_4bit_use_double_quant=True,
|
109 |
+
# bnb_4bit_quant_type='nf4')),
|
110 |
+
# lora=dict(
|
111 |
+
# type=LoraConfig,
|
112 |
+
# r=64,
|
113 |
+
# lora_alpha=16,
|
114 |
+
# lora_dropout=0.1,
|
115 |
+
# bias='none',
|
116 |
+
# task_type='CAUSAL_LM'))
|
117 |
+
#######################################################################
|
118 |
+
# PART 3 Dataset & Dataloader #
|
119 |
+
#######################################################################
|
120 |
+
sampler = SequenceParallelSampler \
|
121 |
+
if sequence_parallel_size > 1 else DefaultSampler
|
122 |
+
|
123 |
+
train_dataset = dict(
|
124 |
+
type=build_preference_dataset,
|
125 |
+
dataset=dict(type=load_jsonl_dataset,data_files=["/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/workspace/MCTS_DPO/MCTS-dpo/data/qwen_step_wise_fix_bug/merged/wild_chat_4000_32000.jsonl"]),
|
126 |
+
# dataset=dict(type=load_jsonl_dataset,data_files=["/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/workspace/MCTS_DPO/MCTS-dpo/data/qwen_step_wise_fix_bug/merged/wild_chat_500_2000_res.jsonl","/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/workspace/MCTS_DPO/MCTS-dpo/data/ultrafeedback_binarized.jsonl","/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/workspace/MCTS_DPO/MCTS-dpo/data/qwen_step_wise_fix_bug/merged/wild_chat_4000_32000.jsonl"]),
|
127 |
+
# dataset=dict(type=load_jsonl_dataset,data_files=["/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/workspace/MCTS_DPO/MCTS-dpo/data/qwen_step_wise_fix_bug/range_2_4k_res_filtered.jsonl","/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/workspace/MCTS_DPO/MCTS-dpo/data/ultrafeedback_binarized.jsonl","/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/workspace/MCTS_DPO/MCTS-dpo/data/qwen_step_wise_fix_bug/range_4_16k_res_filtered.jsonl","/mnt/gemininjceph2/geminicephfs/pr-others-prctrans/pingbowen/workspace/MCTS_DPO/MCTS-dpo/data/qwen_step_wise_fix_bug/range_16_32k_res.jsonl"]),
|
128 |
+
# dataset=dict(type=load_dataset, path='llamafactory/ultrafeedback_binarized'), # mlabonne/orpo-dpo-mix-40k
|
129 |
+
tokenizer=tokenizer,
|
130 |
+
max_length=max_length,
|
131 |
+
dataset_map_fn=ultrafeedback_dpo_map_fn,
|
132 |
+
is_dpo=True,
|
133 |
+
is_reward=False,
|
134 |
+
reward_token_id=-1,
|
135 |
+
num_proc=32,
|
136 |
+
use_varlen_attn=use_varlen_attn,
|
137 |
+
max_packed_length=max_packed_length,
|
138 |
+
shuffle_before_pack=True,
|
139 |
+
)
|
140 |
+
|
141 |
+
train_dataloader = dict(
|
142 |
+
batch_size=batch_size,
|
143 |
+
num_workers=dataloader_num_workers,
|
144 |
+
dataset=train_dataset,
|
145 |
+
sampler=dict(type=sampler, shuffle=True),
|
146 |
+
collate_fn=dict(
|
147 |
+
type=preference_collate_fn, use_varlen_attn=use_varlen_attn))
|
148 |
+
|
149 |
+
#######################################################################
|
150 |
+
# PART 4 Scheduler & Optimizer #
|
151 |
+
#######################################################################
|
152 |
+
# optimizer
|
153 |
+
optim_wrapper = dict(
|
154 |
+
type=AmpOptimWrapper,
|
155 |
+
optimizer=dict(
|
156 |
+
type=optim_type, lr=lr, betas=betas, weight_decay=weight_decay),
|
157 |
+
clip_grad=dict(max_norm=max_norm, error_if_nonfinite=False),
|
158 |
+
accumulative_counts=accumulative_counts,
|
159 |
+
loss_scale='dynamic',
|
160 |
+
dtype='bfloat16')
|
161 |
+
|
162 |
+
# learning policy
|
163 |
+
# More information: https://github.com/open-mmlab/mmengine/blob/main/docs/en/tutorials/param_scheduler.md # noqa: E501
|
164 |
+
param_scheduler = [
|
165 |
+
dict(
|
166 |
+
type=LinearLR,
|
167 |
+
start_factor=1e-5,
|
168 |
+
by_epoch=True,
|
169 |
+
begin=0,
|
170 |
+
end=warmup_ratio * max_epochs,
|
171 |
+
convert_to_iter_based=True),
|
172 |
+
dict(
|
173 |
+
type=CosineAnnealingLR,
|
174 |
+
eta_min=0.0,
|
175 |
+
by_epoch=True,
|
176 |
+
begin=warmup_ratio * max_epochs,
|
177 |
+
end=max_epochs,
|
178 |
+
convert_to_iter_based=True)
|
179 |
+
]
|
180 |
+
|
181 |
+
# train, val, test setting
|
182 |
+
train_cfg = dict(type=TrainLoop, max_epochs=max_epochs)
|
183 |
+
|
184 |
+
#######################################################################
|
185 |
+
# PART 5 Runtime #
|
186 |
+
#######################################################################
|
187 |
+
# Log the dialogue periodically during the training process, optional
|
188 |
+
|
189 |
+
custom_hooks = [
|
190 |
+
dict(type=DatasetInfoHook, tokenizer=tokenizer),
|
191 |
+
# dict(
|
192 |
+
# type=EvaluateChatHook,
|
193 |
+
# tokenizer=tokenizer,
|
194 |
+
# every_n_iters=evaluation_freq,
|
195 |
+
# evaluation_inputs=evaluation_inputs,
|
196 |
+
# system=SYSTEM,
|
197 |
+
# prompt_template=prompt_template)
|
198 |
+
]
|
199 |
+
|
200 |
+
if use_varlen_attn:
|
201 |
+
custom_hooks += [dict(type=VarlenAttnArgsToMessageHubHook)]
|
202 |
+
|
203 |
+
# configure default hooks
|
204 |
+
default_hooks = dict(
|
205 |
+
# record the time of every iteration.
|
206 |
+
timer=dict(type=IterTimerHook),
|
207 |
+
# print log every 10 iterations.
|
208 |
+
logger=dict(type=LoggerHook, log_metric_by_epoch=False, interval=10),
|
209 |
+
# enable the parameter scheduler.
|
210 |
+
param_scheduler=dict(type=ParamSchedulerHook),
|
211 |
+
# save checkpoint per `save_steps`.
|
212 |
+
checkpoint=dict(
|
213 |
+
type=CheckpointHook,
|
214 |
+
by_epoch=False,
|
215 |
+
interval=save_steps,
|
216 |
+
max_keep_ckpts=save_total_limit),
|
217 |
+
# set sampler seed in distributed evrionment.
|
218 |
+
sampler_seed=dict(type=DistSamplerSeedHook),
|
219 |
+
)
|
220 |
+
|
221 |
+
# configure environment
|
222 |
+
env_cfg = dict(
|
223 |
+
# whether to enable cudnn benchmark
|
224 |
+
cudnn_benchmark=False,
|
225 |
+
# set multi process parameters
|
226 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
|
227 |
+
# set distributed parameters
|
228 |
+
dist_cfg=dict(backend='nccl'),
|
229 |
+
)
|
230 |
+
|
231 |
+
# set visualizer
|
232 |
+
visualizer = None
|
233 |
+
|
234 |
+
# set log level
|
235 |
+
log_level = 'INFO'
|
236 |
+
|
237 |
+
# load from which checkpoint
|
238 |
+
load_from = None
|
239 |
+
|
240 |
+
# whether to resume training from the loaded checkpoint
|
241 |
+
resume = False
|
242 |
+
|
243 |
+
# Defaults to use random seed and disable `deterministic`
|
244 |
+
randomness = dict(seed=42, deterministic=False)
|
245 |
+
|
246 |
+
# set log processor
|
247 |
+
log_processor = dict(by_epoch=False)
|