CrazyJames26 commited on
Commit
7e03ccf
·
verified ·
1 Parent(s): b6d7866

Add round2_shared_kv/latest/continued_pretraining_step4222

Browse files
.gitattributes CHANGED
@@ -39,3 +39,4 @@ round2_shared_kv/deltanet_lr1e-4_v0/distillation_step4360/tokenizer.json filter=
39
  round2_shared_kv/deltanet_lr1e-4_v0/continued_pretraining_step4222/tokenizer.json filter=lfs diff=lfs merge=lfs -text
40
  round2_shared_kv/deltanet_lr1e-4_v0/sft_step442/tokenizer.json filter=lfs diff=lfs merge=lfs -text
41
  round2_shared_kv/latest/distillation_lr1e-3/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
39
  round2_shared_kv/deltanet_lr1e-4_v0/continued_pretraining_step4222/tokenizer.json filter=lfs diff=lfs merge=lfs -text
40
  round2_shared_kv/deltanet_lr1e-4_v0/sft_step442/tokenizer.json filter=lfs diff=lfs merge=lfs -text
41
  round2_shared_kv/latest/distillation_lr1e-3/tokenizer.json filter=lfs diff=lfs merge=lfs -text
42
+ round2_shared_kv/latest/continued_pretraining_step4222/tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -26,14 +26,15 @@ Each directory is a self-contained inference bundle: `student.safetensors`, `stu
26
  |---|---|---|---|
27
  | `round2_shared_kv/latest/distillation_lr1e-4` | latest | Distillation, 4,360 steps (15.0B tokens) | 1e-4 |
28
  | `round2_shared_kv/latest/distillation_lr5e-4` | latest | Distillation, 4,360 steps | 5e-4 |
29
- | `round2_shared_kv/latest/distillation_lr1e-3` | latest | Distillation, 4,360 steps — **selected** | 1e-3 |
30
- | `round2_shared_kv/deltanet_lr1e-4_v0/distillation_step4360` | deltanet | Distillation, 4,360 steps | 1e-4 |
31
- | `round2_shared_kv/deltanet_lr1e-4_v0/continued_pretraining_step4222` | deltanet | + full-parameter continued pretraining, 4,222 steps (15.0B tokens) | 5e-5 cosine |
32
- | `round2_shared_kv/deltanet_lr1e-4_v0/sft_step442` | deltanet | + SFT, 442 steps | 1e-5 cosine |
 
33
 
34
  Distillation trains only the replacement mixers against the frozen teacher (final hidden MSE + mean per-layer mixer-output MSE). Continued pretraining and SFT train all parameters with next-token cross-entropy.
35
 
36
- The `latest` learning-rate sweep selects one rate by held-out composite MSE (final hidden MSE + mean of 28 mixer-output MSEs, 128 samples): **1e-4: 2.511, 5e-4: 1.523, 1e-3: 1.376**. The selected 1e-3 is used for all four students (continued pretraining peak 1e-3 cosine, SFT peak 1e-4 linear). Final students trained at the selected rate will be added under `round2_shared_kv/` when they finish. `deltanet_lr1e-4_v0` is an earlier end-to-end run at the pre-sweep rates and will be superseded.
37
 
38
  ## Results so far
39
 
@@ -42,9 +43,9 @@ The `latest` learning-rate sweep selects one rate by held-out composite MSE (fin
42
  | Model | 4K | 8K | 16K |
43
  |---|---:|---:|---:|
44
  | Qwen3-0.6B (native) | 94.50 | 91.19 | 82.75 |
45
- | `deltanet_lr1e-4_v0/sft_step442` | 0.81 | 0.25 | 0.50 |
46
 
47
- Full per-task scores are in `deltanet_lr1e-4_v0/sft_step442/evaluation/scores.json`.
48
 
49
  ## Loading
50
 
 
26
  |---|---|---|---|
27
  | `round2_shared_kv/latest/distillation_lr1e-4` | latest | Distillation, 4,360 steps (15.0B tokens) | 1e-4 |
28
  | `round2_shared_kv/latest/distillation_lr5e-4` | latest | Distillation, 4,360 steps | 5e-4 |
29
+ | `round2_shared_kv/latest/distillation_lr1e-3` | latest | Distillation, 4,360 steps — **selected**; starting point of the `latest` student | 1e-3 |
30
+ | `round2_shared_kv/latest/continued_pretraining_step4222` | latest | + full-parameter continued pretraining, 4,222 steps (15.0B tokens) | 1e-3 cosine |
31
+ | `round2_shared_kv/deltanet_lr1e-4_v0/distillation_step4360` | deltanet (v0) | Distillation, 4,360 steps | 1e-4 |
32
+ | `round2_shared_kv/deltanet_lr1e-4_v0/continued_pretraining_step4222` | deltanet (v0) | + full-parameter continued pretraining, 4,222 steps (15.0B tokens) | 5e-5 cosine |
33
+ | `round2_shared_kv/deltanet_lr1e-4_v0/sft_step442` | deltanet (v0) | + SFT, 442 steps | 1e-5 cosine |
34
 
35
  Distillation trains only the replacement mixers against the frozen teacher (final hidden MSE + mean per-layer mixer-output MSE). Continued pretraining and SFT train all parameters with next-token cross-entropy.
36
 
37
+ The `latest` learning-rate sweep selects one rate by held-out composite MSE (final hidden MSE + mean of 28 mixer-output MSEs, 128 samples): **1e-4: 2.511, 5e-4: 1.523, 1e-3: 1.376**. The selected 1e-3 is used for all four students (continued pretraining peak 1e-3 cosine, SFT peak 1e-4 linear). Students trained at the selected rate live under `round2_shared_kv/<mode>/` and are added as each stage finishes. `deltanet_lr1e-4_v0` is an earlier end-to-end run at the pre-sweep rates and will be superseded.
38
 
39
  ## Results so far
40
 
 
43
  | Model | 4K | 8K | 16K |
44
  |---|---:|---:|---:|
45
  | Qwen3-0.6B (native) | 94.50 | 91.19 | 82.75 |
46
+ | `deltanet_lr1e-4_v0/sft_step442` (pre-sweep rates) | 0.81 | 0.25 | 0.50 |
47
 
48
+ Full per-task scores are in each `sft_step442/evaluation/scores.json`.
49
 
50
  ## Loading
51
 
round2_shared_kv/latest/continued_pretraining_step4222/completed_stage.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "objective": "all_valid_next_token_cross_entropy",
3
+ "teacher_loaded": false,
4
+ "all_parameters_trainable": true,
5
+ "trainable_parameters": 656211392,
6
+ "world_size": 8,
7
+ "microbatch_per_gpu": 32,
8
+ "global_batch": 256,
9
+ "weight_dtype": "float32",
10
+ "residual_dtype": "bfloat16",
11
+ "sampler_policy": "complete_length_grouped_batches_mask_fill",
12
+ "epoch_examples_with_fill": 1080832,
13
+ "learning_rate": 0.001,
14
+ "warmup_steps": 212,
15
+ "lr_schedule": "cosine",
16
+ "max_steps": 4222,
17
+ "padding_policy": "fixed_16384",
18
+ "runtime_max_sequence_length": 16384,
19
+ "write_mode": "latest",
20
+ "corpus_manifest_sha256": "44092e5750405ca02029f216900ce5c81de284329934bbb9e27a697d65303550",
21
+ "steps": 4222,
22
+ "cursor": 1080832
23
+ }
round2_shared_kv/latest/continued_pretraining_step4222/continued_pretraining_config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "write_mode": "latest",
3
+ "microbatch_per_gpu": 32,
4
+ "global_batch": 256,
5
+ "accumulation": 1,
6
+ "save_every_steps": 1000,
7
+ "keep_last_checkpoints": 2,
8
+ "gradient_checkpointing": true,
9
+ "lr_schedule": "cosine",
10
+ "stage": "continued_pretraining",
11
+ "student": "/work/ucla-jcong/jameszhang23/GDN_Routing/runs/shared_kv_30b_v1/selected_lr_v1/latest/distilled_student",
12
+ "corpus_manifest": "/work/ucla-jcong/jameszhang23/GDN_Routing/data/shared_kv_30b_40_35_5_5_15_v2/continued_pretraining/manifest.json",
13
+ "output_dir": "/work/ucla-jcong/jameszhang23/GDN_Routing/runs/shared_kv_30b_v1/selected_lr_v1/latest/continued_pretraining",
14
+ "epochs": 1,
15
+ "pad_to_length": 16384,
16
+ "max_steps": 4222,
17
+ "warmup_steps": 212,
18
+ "learning_rate": 0.001,
19
+ "wandb": {
20
+ "enabled": true,
21
+ "project": "GDN_Routing",
22
+ "entity": "jameszhang23-ucla",
23
+ "group": "shared-kv-30b-lr-selected-v1",
24
+ "name": "latest-continued_pretraining"
25
+ },
26
+ "scan_batch_chunk": 0,
27
+ "scan_checkpoint": false
28
+ }
round2_shared_kv/latest/continued_pretraining_step4222/learning_rate_selection.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "comparison": "/work/ucla-jcong/jameszhang23/GDN_Routing/runs/shared_kv_30b_v1/lr_sweep_v1/comparison.json",
3
+ "comparison_sha256": "0a68b0ad24279d26520a4a84126fe2ddbfc5627e8e25fdbd0af0aa7c3fbec77d",
4
+ "selected": "1e-3",
5
+ "distillation_learning_rate": 0.001,
6
+ "continued_pretraining_learning_rate": 0.001,
7
+ "sft_learning_rate": 0.0001,
8
+ "sft_schedule": "linear",
9
+ "winning_latest_checkpoint": "/work/ucla-jcong/jameszhang23/GDN_Routing/runs/shared_kv_30b_v1/lr_sweep_v1/1e-3/distillation/checkpoint_step_00004360.pt",
10
+ "winning_latest_distillation_config": "/work/ucla-jcong/jameszhang23/GDN_Routing/runs/shared_kv_30b_v1/lr_sweep_v1/1e-3/distillation.json"
11
+ }
round2_shared_kv/latest/continued_pretraining_step4222/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
round2_shared_kv/latest/continued_pretraining_step4222/student.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5695e2b208cc993d50b950c1c9cb41e95f633c53b9fb854d4bf8ee2a0f8db107
3
+ size 2624913496
round2_shared_kv/latest/continued_pretraining_step4222/student_config.json ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_dtype": "bfloat16",
3
+ "attention": {
4
+ "backend": "fla",
5
+ "compiled_qk_scale_only": true,
6
+ "conv_bias": false,
7
+ "conv_size": 4,
8
+ "fla_chunk_size": 64,
9
+ "fla_native_v": true,
10
+ "fla_pure_grouped_backward": false,
11
+ "fla_pure_grouped_no_decay": false,
12
+ "fused_norm_gate": true,
13
+ "fused_qkv_conv": true,
14
+ "fused_qkv_proj": true,
15
+ "fused_state_read": true,
16
+ "novelty_backend": "triton",
17
+ "novelty_route_interval": 1,
18
+ "novelty_warps": 16,
19
+ "num_kv_heads": 8,
20
+ "read_bias": true,
21
+ "segment_scan": true,
22
+ "simplified_qk_norm": true,
23
+ "use_global_decay": false,
24
+ "use_short_conv": true,
25
+ "write_mode": "latest"
26
+ },
27
+ "backbone": {
28
+ "architectures": [
29
+ "Qwen3ForCausalLM"
30
+ ],
31
+ "attention_bias": false,
32
+ "attention_dropout": 0.0,
33
+ "bos_token_id": 151643,
34
+ "eos_token_id": 151645,
35
+ "head_dim": 128,
36
+ "hidden_act": "silu",
37
+ "hidden_size": 1024,
38
+ "initializer_range": 0.02,
39
+ "intermediate_size": 3072,
40
+ "max_position_embeddings": 40960,
41
+ "max_window_layers": 28,
42
+ "model_type": "qwen3",
43
+ "num_attention_heads": 16,
44
+ "num_hidden_layers": 28,
45
+ "num_key_value_heads": 8,
46
+ "rms_norm_eps": 1e-06,
47
+ "rope_scaling": null,
48
+ "rope_theta": 1000000,
49
+ "sliding_window": null,
50
+ "tie_word_embeddings": true,
51
+ "torch_dtype": "bfloat16",
52
+ "transformers_version": "4.51.0",
53
+ "use_cache": true,
54
+ "use_sliding_window": false,
55
+ "vocab_size": 151936
56
+ },
57
+ "compute_precision": "mixed_bfloat16",
58
+ "format": "dynamic_deltanet_student_v1",
59
+ "generation": {
60
+ "bos_token_id": 151643,
61
+ "do_sample": true,
62
+ "eos_token_id": [
63
+ 151645,
64
+ 151643
65
+ ],
66
+ "pad_token_id": 151643,
67
+ "temperature": 0.6,
68
+ "top_k": 20,
69
+ "top_p": 0.95,
70
+ "transformers_version": "4.51.0"
71
+ },
72
+ "max_sequence_length": 16384,
73
+ "schedule": {
74
+ "length_base": 1024,
75
+ "max_state_num": 8,
76
+ "reference_length": 16384
77
+ },
78
+ "stable_inference": false
79
+ }
round2_shared_kv/latest/continued_pretraining_step4222/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4
3
+ size 11422654
round2_shared_kv/latest/continued_pretraining_step4222/tokenizer_config.json ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\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 {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- 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 {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
231
+ "clean_up_tokenization_spaces": false,
232
+ "eos_token": "<|im_end|>",
233
+ "errors": "replace",
234
+ "model_max_length": 131072,
235
+ "pad_token": "<|endoftext|>",
236
+ "split_special_tokens": false,
237
+ "tokenizer_class": "Qwen2Tokenizer",
238
+ "unk_token": null
239
+ }
round2_shared_kv/latest/continued_pretraining_step4222/vocab.json ADDED
The diff for this file is too large to render. See raw diff