root commited on
Commit
f9746a3
·
1 Parent(s): 7bc20f7

model full update

Browse files
README.md CHANGED
@@ -1,8 +1,3 @@
1
- ---
2
- library_name: transformers
3
- tags: []
4
- ---
5
-
6
  # Model Card for Model ID
7
 
8
  <!-- Provide a quick summary of what the model is/does. -->
 
 
 
 
 
 
1
  # Model Card for Model ID
2
 
3
  <!-- Provide a quick summary of what the model is/does. -->
adapter_config.json DELETED
@@ -1,35 +0,0 @@
1
- {
2
- "alpha_pattern": {},
3
- "auto_mapping": {
4
- "base_model_class": "Qwen2ForCausalLM",
5
- "parent_library": "transformers.models.qwen2.modeling_qwen2"
6
- },
7
- "base_model_name_or_path": "Qwen/Qwen2.5-Coder-7B",
8
- "bias": "none",
9
- "eva_config": null,
10
- "exclude_modules": null,
11
- "fan_in_fan_out": false,
12
- "inference_mode": true,
13
- "init_lora_weights": true,
14
- "layer_replication": null,
15
- "layers_pattern": null,
16
- "layers_to_transform": null,
17
- "loftq_config": {},
18
- "lora_alpha": 32,
19
- "lora_bias": false,
20
- "lora_dropout": 0.1,
21
- "megatron_config": null,
22
- "megatron_core": "megatron.core",
23
- "modules_to_save": null,
24
- "peft_type": "LORA",
25
- "r": 8,
26
- "rank_pattern": {},
27
- "revision": null,
28
- "target_modules": [
29
- "q_proj",
30
- "v_proj"
31
- ],
32
- "task_type": null,
33
- "use_dora": false,
34
- "use_rslora": false
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
added_tokens.json CHANGED
@@ -1,6 +1,7 @@
1
  {
2
  "</tool_call>": 151658,
3
  "<tool_call>": 151657,
 
4
  "<|box_end|>": 151649,
5
  "<|box_start|>": 151648,
6
  "<|endoftext|>": 151643,
 
1
  {
2
  "</tool_call>": 151658,
3
  "<tool_call>": 151657,
4
+ "<|PAD_TOKEN|>": 151665,
5
  "<|box_end|>": 151649,
6
  "<|box_start|>": 151648,
7
  "<|endoftext|>": 151643,
config.json CHANGED
@@ -1,15 +1,46 @@
1
  {
2
- "model_type": "qwen2",
3
- "hidden_size": 4096,
4
- "num_attention_heads": 32,
5
- "num_hidden_layers": 40,
6
- "vocab_size": 65024,
7
- "bos_token_id": 1,
8
- "eos_token_id": 2,
9
- "pad_token_id": 0,
10
- "use_cache": true,
11
- "_name_or_path": "Qwen/Qwen2.5-Coder-7B-Instruct",
12
- "architectures": [
13
- "Qwen2ForCausalLM"
14
- ]
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  {
2
+ "_name_or_path": "unsloth/Qwen2.5-7B-Instruct-bnb-4bit",
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
+ "pad_token_id": 151665,
20
+ "quantization_config": {
21
+ "_load_in_4bit": true,
22
+ "_load_in_8bit": false,
23
+ "bnb_4bit_compute_dtype": "bfloat16",
24
+ "bnb_4bit_quant_storage": "uint8",
25
+ "bnb_4bit_quant_type": "nf4",
26
+ "bnb_4bit_use_double_quant": true,
27
+ "llm_int8_enable_fp32_cpu_offload": false,
28
+ "llm_int8_has_fp16_weight": false,
29
+ "llm_int8_skip_modules": null,
30
+ "llm_int8_threshold": 6.0,
31
+ "load_in_4bit": true,
32
+ "load_in_8bit": false,
33
+ "quant_method": "bitsandbytes"
34
+ },
35
+ "rms_norm_eps": 1e-06,
36
+ "rope_scaling": null,
37
+ "rope_theta": 1000000.0,
38
+ "sliding_window": null,
39
+ "tie_word_embeddings": false,
40
+ "torch_dtype": "bfloat16",
41
+ "transformers_version": "4.47.0",
42
+ "unsloth_fixed": true,
43
+ "use_cache": true,
44
+ "use_sliding_window": false,
45
+ "vocab_size": 152064
46
+ }
generation_config.json CHANGED
@@ -1,6 +1,15 @@
1
  {
2
  "bos_token_id": 151643,
3
- "eos_token_id": 151643,
4
- "max_new_tokens": 2048,
 
 
 
 
 
 
 
 
 
5
  "transformers_version": "4.47.0"
6
  }
 
1
  {
2
  "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "max_length": 32768,
9
+ "pad_token_id": 151665,
10
+ "repetition_penalty": 1.05,
11
+ "temperature": 0.1,
12
+ "top_k": 20,
13
+ "top_p": 0.1,
14
  "transformers_version": "4.47.0"
15
  }
adapter_model.safetensors → model-00001-of-00002.safetensors RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8d580a047c1eb6ec7d8c32af85f4deca1cf4e64eaa0c9bedeb25c4337b065007
3
- size 10107280
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f7e3bd33a6bb71b162985e0f590127f2ade8788698e502bb60d647b52891668
3
+ size 4457259166
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06006972c3be88e8a44fe21cfe2b0472b130780c781a741f8f90f1fe5ba3aae2
3
+ size 1089994880
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json CHANGED
@@ -15,14 +15,14 @@
15
  "<|video_pad|>"
16
  ],
17
  "eos_token": {
18
- "content": "<|endoftext|>",
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,
 
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": "<|PAD_TOKEN|>",
26
  "lstrip": false,
27
  "normalized": false,
28
  "rstrip": false,
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5e667a7d18d94098aefa2473386a7a3e456dff729cdf04a1f060f32b0d8b8fe7
3
- size 11422176
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fab42efe8d17406525a9154b728cf9e957629a8ed7ce997770efdd71128c6a1a
3
+ size 11422086
tokenizer_config.json CHANGED
@@ -177,6 +177,14 @@
177
  "rstrip": false,
178
  "single_word": false,
179
  "special": false
 
 
 
 
 
 
 
 
180
  }
181
  },
182
  "additional_special_tokens": [
@@ -195,21 +203,15 @@
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": "<|endoftext|>",
201
  "errors": "replace",
202
  "extra_special_tokens": {},
203
- "max_length": 1024,
204
- "model_max_length": 32768,
205
- "pad_to_multiple_of": null,
206
- "pad_token": "<|endoftext|>",
207
- "pad_token_type_id": 0,
208
- "padding_side": "right",
209
  "split_special_tokens": false,
210
- "stride": 0,
211
  "tokenizer_class": "Qwen2Tokenizer",
212
- "truncation_side": "right",
213
- "truncation_strategy": "longest_first",
214
  "unk_token": null
215
  }
 
177
  "rstrip": false,
178
  "single_word": false,
179
  "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<|PAD_TOKEN|>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": true
188
  }
189
  },
190
  "additional_special_tokens": [
 
203
  "<|video_pad|>"
204
  ],
205
  "bos_token": null,
206
+ "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 Python expert.\nReturn ONLY the function implementation with no additional text or explanations.\n\nHere are some examples:\n\nex.1\n\n\nquery:\nwrite a function def analyze_nested_json(data, key_paths, value_types) to:\nAnalyzes a nested JSON structure to extract values at specified keys and categorize them based on their types.\n\nThe function should output with:\ndict: A dictionary mapping types to lists of extracted values.\n\nYou should start with:\n\\`\\`\\`\nimport json\nimport defaultdict\nimport chain\nimport pandas as pd\nimport numpy as np\ndef analyze_nested_json(data, key_paths, value_types) \\`\\`\\`\n\n\nresponse:\nimport json\nfrom collections import defaultdict\nfrom itertools import chain\nimport pandas as pd\nimport numpy as np\n\ndef analyze_nested_json(data, key_paths, value_types):\n \"\"\"\n Analyzes a nested JSON structure to extract values at specified keys and categorize them based on their types.\n \n Parameters:\n - data (dict): A nested JSON data structure.\n - key_paths (List[str]): Paths to keys in the JSON structure.\n - value_types (List[type]): Types to categorize the extracted values.\n \n Requirements:\n - json\n - collections\n - itertools\n - pandas\n - numpy\n \n Example:\n >>> data = {\n ... \"root\": {\n ... \"child1\": {\"name\": \"Alice\", \"age\": 30, \"is_student\": False},\n ... \"child2\": {\"name\": \"Bob\", \"age\": 25, \"is_student\": True},\n ... \"child3\": {\"name\": \"Charlie\", \"age\": 35, \"is_student\": False},\n ... \"child4\": {\"name\": \"David\", \"age\": 22, \"is_student\": True}\n ... }\n ... }\n >>> key_paths = [\"root.child1.age\", \"root.child2.is_student\", \"root.child3.name\"]\n >>> value_types = [int, bool, str]\n >>> result = analyze_nested_json(data, key_paths, value_types)\n >>> print(result)\n {\n \\'int\\': [30, 25, 35, 22],\n \\'bool\\': [False, True, False, True],\n \\'str\\': [\\'Alice\\', \\'Bob\\', \\'Charlie\\', \\'David\\']\n }\n \n Returns:\n dict: A dictionary mapping types to lists of extracted values.\n \"\"\"\n \n def get_value_from_path(data, path):\n keys = path.split(\\'.\\')\n value = data\n for key in keys:\n value = value.get(key)\n if value is None:\n return None\n return value\n \n categorized_values = defaultdict(list)\n \n for key_path, value_type in zip(key_paths, value_types):\n value = get_value_from_path(data, key_path)\n if isinstance(value, value_type):\n categorized_values[str(value_type)].append(value)\n \n return dict(categorized_values)\n\n' }}\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 Python expert.\nReturn ONLY the function implementation with no additional text or explanations.\n\nHere are some examples:\n\nex.1\n\n\nquery:\nwrite a function def analyze_nested_json(data, key_paths, value_types) to:\nAnalyzes a nested JSON structure to extract values at specified keys and categorize them based on their types.\n\nThe function should output with:\ndict: A dictionary mapping types to lists of extracted values.\n\nYou should start with:\n\\`\\`\\`\nimport json\nimport defaultdict\nimport chain\nimport pandas as pd\nimport numpy as np\ndef analyze_nested_json(data, key_paths, value_types) \\`\\`\\`\n\n\nresponse:\nimport json\nfrom collections import defaultdict\nfrom itertools import chain\nimport pandas as pd\nimport numpy as np\n\ndef analyze_nested_json(data, key_paths, value_types):\n \"\"\"\n Analyzes a nested JSON structure to extract values at specified keys and categorize them based on their types.\n \n Parameters:\n - data (dict): A nested JSON data structure.\n - key_paths (List[str]): Paths to keys in the JSON structure.\n - value_types (List[type]): Types to categorize the extracted values.\n \n Requirements:\n - json\n - collections\n - itertools\n - pandas\n - numpy\n \n Example:\n >>> data = {\n ... \"root\": {\n ... \"child1\": {\"name\": \"Alice\", \"age\": 30, \"is_student\": False},\n ... \"child2\": {\"name\": \"Bob\", \"age\": 25, \"is_student\": True},\n ... \"child3\": {\"name\": \"Charlie\", \"age\": 35, \"is_student\": False},\n ... \"child4\": {\"name\": \"David\", \"age\": 22, \"is_student\": True}\n ... }\n ... }\n >>> key_paths = [\"root.child1.age\", \"root.child2.is_student\", \"root.child3.name\"]\n >>> value_types = [int, bool, str]\n >>> result = analyze_nested_json(data, key_paths, value_types)\n >>> print(result)\n {\n \\'int\\': [30, 25, 35, 22],\n \\'bool\\': [False, True, False, True],\n \\'str\\': [\\'Alice\\', \\'Bob\\', \\'Charlie\\', \\'David\\']\n }\n \n Returns:\n dict: A dictionary mapping types to lists of extracted values.\n \"\"\"\n \n def get_value_from_path(data, path):\n keys = path.split(\\'.\\')\n value = data\n for key in keys:\n value = value.get(key)\n if value is None:\n return None\n return value\n \n categorized_values = defaultdict(list)\n \n for key_path, value_type in zip(key_paths, value_types):\n value = get_value_from_path(data, key_path)\n if isinstance(value, value_type):\n categorized_values[str(value_type)].append(value)\n \n return dict(categorized_values)\n\n<|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",
207
  "clean_up_tokenization_spaces": false,
208
+ "eos_token": "<|im_end|>",
209
  "errors": "replace",
210
  "extra_special_tokens": {},
211
+ "model_max_length": 131072,
212
+ "pad_token": "<|PAD_TOKEN|>",
213
+ "padding_side": "left",
 
 
 
214
  "split_special_tokens": false,
 
215
  "tokenizer_class": "Qwen2Tokenizer",
 
 
216
  "unk_token": null
217
  }