tuanpasg commited on
Commit
f6c1cc0
·
verified ·
1 Parent(s): eb2ea9f

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,7 +1,8 @@
1
  ---
2
  base_model:
3
- - Qwen/Qwen2.5-Math-1.5B
4
  - Qwen/Qwen2.5-Coder-1.5B
 
 
5
  library_name: transformers
6
  tags:
7
  - mergekit
@@ -15,13 +16,13 @@ This is a merge of pre-trained language models created using [mergekit](https://
15
  ## Merge Details
16
  ### Merge Method
17
 
18
- This model was merged using the [linear](https://arxiv.org/abs/2203.05482) merge method.
19
 
20
  ### Models Merged
21
 
22
  The following models were included in the merge:
23
- * [Qwen/Qwen2.5-Math-1.5B](https://huggingface.co/Qwen/Qwen2.5-Math-1.5B)
24
  * [Qwen/Qwen2.5-Coder-1.5B](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B)
 
25
 
26
  ### Configuration
27
 
@@ -31,10 +32,17 @@ The following YAML configuration was used to produce this model:
31
  models:
32
  - model: Qwen/Qwen2.5-Coder-1.5B
33
  parameters:
 
34
  weight: 0.9
35
  - model: Qwen/Qwen2.5-Math-1.5B
36
  parameters:
 
37
  weight: 0.1
38
- merge_method: linear
39
- dtype: bfloat16
 
 
 
 
 
40
  ```
 
1
  ---
2
  base_model:
 
3
  - Qwen/Qwen2.5-Coder-1.5B
4
+ - Qwen/Qwen2.5-1.5B
5
+ - Qwen/Qwen2.5-Math-1.5B
6
  library_name: transformers
7
  tags:
8
  - mergekit
 
16
  ## Merge Details
17
  ### Merge Method
18
 
19
+ This model was merged using the [TIES](https://arxiv.org/abs/2306.01708) merge method using [Qwen/Qwen2.5-1.5B](https://huggingface.co/Qwen/Qwen2.5-1.5B) as a base.
20
 
21
  ### Models Merged
22
 
23
  The following models were included in the merge:
 
24
  * [Qwen/Qwen2.5-Coder-1.5B](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B)
25
+ * [Qwen/Qwen2.5-Math-1.5B](https://huggingface.co/Qwen/Qwen2.5-Math-1.5B)
26
 
27
  ### Configuration
28
 
 
32
  models:
33
  - model: Qwen/Qwen2.5-Coder-1.5B
34
  parameters:
35
+ density: 0.5
36
  weight: 0.9
37
  - model: Qwen/Qwen2.5-Math-1.5B
38
  parameters:
39
+ density: 0.5
40
  weight: 0.1
41
+
42
+ merge_method: ties
43
+ base_model: Qwen/Qwen2.5-1.5B
44
+ parameters:
45
+ normalize: false
46
+ int8_mask: true
47
+ dtype: float16
48
  ```
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "Qwen/Qwen2.5-Math-1.5B",
3
  "architectures": [
4
  "Qwen2ForCausalLM"
5
  ],
@@ -10,18 +10,18 @@
10
  "hidden_size": 1536,
11
  "initializer_range": 0.02,
12
  "intermediate_size": 8960,
13
- "max_position_embeddings": 4096,
14
- "max_window_layers": 21,
15
  "model_type": "qwen2",
16
  "num_attention_heads": 12,
17
  "num_hidden_layers": 28,
18
  "num_key_value_heads": 2,
19
  "rms_norm_eps": 1e-06,
20
  "rope_scaling": null,
21
- "rope_theta": 10000,
22
  "sliding_window": null,
23
  "tie_word_embeddings": true,
24
- "torch_dtype": "bfloat16",
25
  "transformers_version": "4.45.1",
26
  "use_cache": true,
27
  "use_mrope": false,
 
1
  {
2
+ "_name_or_path": "Qwen/Qwen2.5-1.5B",
3
  "architectures": [
4
  "Qwen2ForCausalLM"
5
  ],
 
10
  "hidden_size": 1536,
11
  "initializer_range": 0.02,
12
  "intermediate_size": 8960,
13
+ "max_position_embeddings": 131072,
14
+ "max_window_layers": 28,
15
  "model_type": "qwen2",
16
  "num_attention_heads": 12,
17
  "num_hidden_layers": 28,
18
  "num_key_value_heads": 2,
19
  "rms_norm_eps": 1e-06,
20
  "rope_scaling": null,
21
+ "rope_theta": 1000000.0,
22
  "sliding_window": null,
23
  "tie_word_embeddings": true,
24
+ "torch_dtype": "float16",
25
  "transformers_version": "4.45.1",
26
  "use_cache": true,
27
  "use_mrope": false,
mergekit_config.yml CHANGED
@@ -1,9 +1,16 @@
1
  models:
2
  - model: Qwen/Qwen2.5-Coder-1.5B
3
  parameters:
 
4
  weight: 0.9
5
  - model: Qwen/Qwen2.5-Math-1.5B
6
  parameters:
 
7
  weight: 0.1
8
- merge_method: linear
9
- dtype: bfloat16
 
 
 
 
 
 
1
  models:
2
  - model: Qwen/Qwen2.5-Coder-1.5B
3
  parameters:
4
+ density: 0.5
5
  weight: 0.9
6
  - model: Qwen/Qwen2.5-Math-1.5B
7
  parameters:
8
+ density: 0.5
9
  weight: 0.1
10
+
11
+ merge_method: ties
12
+ base_model: Qwen/Qwen2.5-1.5B
13
+ parameters:
14
+ normalize: false
15
+ int8_mask: true
16
+ dtype: float16
model-00001-of-00001.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:72e3e0c85d521d81f7dcc872b9710e25b8f5a0470ea2edc7b127050680238175
3
- size 3554214752
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52bb27a6a10362ed99ec8c0480e93fdbb17ebc73c411d16aa78e944aadc9b24a
3
+ size 3554214416
tokenizer_config.json CHANGED
@@ -195,7 +195,7 @@
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 {{- 'Please reason step by step, and put your final answer within \\\\boxed{}.' }}\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\\nPlease reason step by step, and put your final answer within \\\\boxed{}.<|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": "<|endoftext|>",
201
  "errors": "replace",
 
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 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 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": "<|endoftext|>",
201
  "errors": "replace",