winglian commited on
Commit
b48387e
·
verified ·
1 Parent(s): 2d13c5c

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: Qwen/Qwen2.5-Coder-7B-Instruct
5
+ tags:
6
+ - generated_from_trainer
7
+ - axolotl
8
+ datasets:
9
+ - winglian/codeforces-cot-16k-context-topk64-prepared
10
+ model-index:
11
+ - name: outputs/out-kd-7b
12
+ results: []
13
+ ---
14
+
15
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
+ should probably proofread and complete it, then remove this comment. -->
17
+
18
+ [<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl)
19
+ <details><summary>See axolotl config</summary>
20
+
21
+ axolotl version: `0.8.0.dev0`
22
+ ```yaml
23
+ base_model: Qwen/Qwen2.5-Coder-7B-Instruct
24
+
25
+ plugins:
26
+ - axolotl.integrations.kd.KDPlugin
27
+ - axolotl.integrations.liger.LigerPlugin
28
+
29
+ liger_rms_norm: true
30
+ liger_glu_activation: true
31
+
32
+ # torch_compile: true
33
+
34
+ strict: false
35
+
36
+ chat_template_jinja: "{%- 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<think>' }}\n{%- endif %}\n"
37
+
38
+ kd_trainer: true
39
+ kd_ce_alpha: 0.2
40
+ kd_alpha: 0.8
41
+ kd_temperature: 1.0
42
+ # kd_zscore_base_temp: 1.0
43
+ kd_top_k_before_softmax: true
44
+
45
+ dataloader_prefetch_factor: 256
46
+ dataloader_num_workers: 4
47
+ dataloader_pin_memory: true
48
+
49
+ gc_steps: -1 # gc at the end of each epoch
50
+
51
+ datasets:
52
+ - field_messages: messages
53
+ message_field_content: content
54
+ message_field_role: role
55
+ logprobs_field: llm_text_generation_vllm_logprobs
56
+ path: winglian/codeforces-cot-16k-context-topk64-prepared
57
+ name: solutions_decontaminated
58
+ type: axolotl.integrations.kd.chat_template
59
+ split: train
60
+ temperature: 1.0
61
+
62
+ dataset_prepared_path: last_run_prepared
63
+ val_set_size: 0.0
64
+ output_dir: ./outputs/out-kd-7b
65
+ skip_prepare_dataset: true
66
+
67
+ sequence_len: 16384
68
+ sample_packing: true
69
+ pad_to_sequence_len: true
70
+
71
+ wandb_project: kd-7b-codeforces
72
+ wandb_entity: axolotl-ai
73
+ wandb_watch:
74
+ wandb_name:
75
+ wandb_log_model:
76
+
77
+ gradient_accumulation_steps: 8
78
+ micro_batch_size: 1
79
+ num_epochs: 10
80
+ optimizer: adamw_torch_fused
81
+ lr_scheduler: rex
82
+ learning_rate: 4e-5
83
+ save_safetensors: true
84
+
85
+ train_on_inputs: false
86
+ group_by_length: false
87
+ bf16: true
88
+ fp16:
89
+ tf32: true
90
+
91
+ gradient_checkpointing: offload
92
+ gradient_checkpointing_kwargs:
93
+ use_reentrant: false
94
+ early_stopping_patience:
95
+ resume_from_checkpoint:
96
+ logging_steps: 1
97
+ xformers_attention:
98
+ flash_attention: true
99
+
100
+ warmup_steps: 280
101
+ evals_per_epoch:
102
+ eval_table_size:
103
+ saves_per_epoch: 1
104
+ debug:
105
+ deepspeed: deepspeed_configs/zero2.json
106
+ weight_decay: 0.0
107
+ special_tokens:
108
+ pad_token: <|endoftext|>
109
+
110
+ ```
111
+
112
+ </details><br>
113
+
114
+ # outputs/out-kd-7b
115
+
116
+ This model is a fine-tuned version of [Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) on the winglian/codeforces-cot-16k-context-topk64-prepared dataset.
117
+
118
+ ## Model description
119
+
120
+ More information needed
121
+
122
+ ## Intended uses & limitations
123
+
124
+ More information needed
125
+
126
+ ## Training and evaluation data
127
+
128
+ More information needed
129
+
130
+ ## Training procedure
131
+
132
+ ### Training hyperparameters
133
+
134
+ The following hyperparameters were used during training:
135
+ - learning_rate: 4e-05
136
+ - train_batch_size: 1
137
+ - eval_batch_size: 1
138
+ - seed: 42
139
+ - distributed_type: multi-GPU
140
+ - num_devices: 8
141
+ - gradient_accumulation_steps: 8
142
+ - total_train_batch_size: 64
143
+ - total_eval_batch_size: 8
144
+ - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
145
+ - lr_scheduler_type: rex
146
+ - lr_scheduler_warmup_steps: 280
147
+ - num_epochs: 10.0
148
+
149
+ ### Training results
150
+
151
+
152
+
153
+ ### Framework versions
154
+
155
+ - Transformers 4.49.0
156
+ - Pytorch 2.5.1+cu124
157
+ - Datasets 3.2.0
158
+ - Tokenizers 0.21.0
model-00001-of-00004.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8e5b777611f921d6fd91f00536f59bc6e66373432e11217ae61e4d2388a671e2
3
  size 4877660776
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0a8c6b4b61864f33ff6cf32c4190745cafeae8453ee0d5eff30bcd1692a4de3
3
  size 4877660776
model-00002-of-00004.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fdecd6b6463de4bcc28f106f71066d02c76c2505f3081eb7327f1a32a27a61f7
3
  size 4932751008
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72347692641bb2da052989385467f22262bcfbcde430b91bd5d101f3c4634af2
3
  size 4932751008
model-00003-of-00004.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:873d6dc238a86fd494bbe418eb142ac2db38871ae24dae48f7558482b03a42c7
3
  size 4330865200
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a981e34e5fd00d9442ac405faf79a446e744e7af731ef76658a1036b0d14dd6
3
  size 4330865200
model-00004-of-00004.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:148a974b4a6c4e53a6591c4728a07d73b51dbcbe653f21cb191de11b06d65e17
3
  size 1089994880
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d8ccffead1f53d442090c03e0bae36be51cb744f940b518525505a264c66706
3
  size 1089994880