robertou2 commited on
Commit
6392807
·
verified ·
1 Parent(s): 4b29a74

Upload folder using huggingface_hub

Browse files
adapter_config.json CHANGED
@@ -23,9 +23,9 @@
23
  "rank_pattern": {},
24
  "revision": null,
25
  "target_modules": [
26
- "gate_up_proj",
27
  "o_proj",
28
  "down_proj",
 
29
  "qkv_proj"
30
  ],
31
  "task_type": "CAUSAL_LM",
 
23
  "rank_pattern": {},
24
  "revision": null,
25
  "target_modules": [
 
26
  "o_proj",
27
  "down_proj",
28
+ "gate_up_proj",
29
  "qkv_proj"
30
  ],
31
  "task_type": "CAUSAL_LM",
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9495e2b540639316ace83947ee2ed2f49ba81a9784ae9b080452d5953f2b59be
3
  size 184584072
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12728c115fb4a00b273de3ee6903acba7254398a2f989ed4a9987b61106f28b6
3
  size 184584072
added_tokens.json CHANGED
@@ -3,7 +3,6 @@
3
  "<|/tool|>": 200024,
4
  "<|assistant|>": 200019,
5
  "<|end|>": 200020,
6
- "<|im_end|>": 200029,
7
  "<|system|>": 200022,
8
  "<|tag|>": 200028,
9
  "<|tool_call|>": 200025,
 
3
  "<|/tool|>": 200024,
4
  "<|assistant|>": 200019,
5
  "<|end|>": 200020,
 
6
  "<|system|>": 200022,
7
  "<|tag|>": 200028,
8
  "<|tool_call|>": 200025,
chat_template.jinja CHANGED
@@ -1,54 +1 @@
1
- {%- if tools %}
2
- {{- '<|im_start|>system\n' }}
3
- {%- if messages[0]['role'] == 'system' %}
4
- {{- messages[0]['content'] }}
5
- {%- else %}
6
- {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
7
- {%- endif %}
8
- {{- "\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>" }}
9
- {%- for tool in tools %}
10
- {{- "\n" }}
11
- {{- tool | tojson }}
12
- {%- endfor %}
13
- {{- "\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" }}
14
- {%- else %}
15
- {%- if messages[0]['role'] == 'system' %}
16
- {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
- {%- else %}
18
- {{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
19
- {%- endif %}
20
- {%- endif %}
21
- {%- for message in messages %}
22
- {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
- {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
24
- {%- elif message.role == "assistant" %}
25
- {{- '<|im_start|>' + message.role }}
26
- {%- if message.content %}
27
- {{- '\n' + message.content }}
28
- {%- endif %}
29
- {%- for tool_call in message.tool_calls %}
30
- {%- if tool_call.function is defined %}
31
- {%- set tool_call = tool_call.function %}
32
- {%- endif %}
33
- {{- '\n<tool_call>\n{"name": "' }}
34
- {{- tool_call.name }}
35
- {{- '", "arguments": ' }}
36
- {{- tool_call.arguments | tojson }}
37
- {{- '}\n</tool_call>' }}
38
- {%- endfor %}
39
- {{- '<|im_end|>\n' }}
40
- {%- elif message.role == "tool" %}
41
- {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
- {{- '<|im_start|>user' }}
43
- {%- endif %}
44
- {{- '\n<tool_response>\n' }}
45
- {{- message.content }}
46
- {{- '\n</tool_response>' }}
47
- {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
- {{- '<|im_end|>\n' }}
49
- {%- endif %}
50
- {%- endif %}
51
- {%- endfor %}
52
- {%- if add_generation_prompt %}
53
- {{- '<|im_start|>assistant\n' }}
54
- {%- endif %}
 
1
+ {% for message in messages %}{% if message['role'] == 'system' and 'tools' in message and message['tools'] is not none %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|tool|>' + message['tools'] + '<|/tool|>' + '<|end|>' }}{% else %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|end|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
special_tokens_map.json CHANGED
@@ -7,7 +7,7 @@
7
  "single_word": false
8
  },
9
  "eos_token": {
10
- "content": "<|im_end|>",
11
  "lstrip": false,
12
  "normalized": false,
13
  "rstrip": false,
 
7
  "single_word": false
8
  },
9
  "eos_token": {
10
+ "content": "<|endoftext|>",
11
  "lstrip": false,
12
  "normalized": false,
13
  "rstrip": false,
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8799b7ce62bf40e724f80af87b9545f9d9043778f435040a6c08e834dc047b69
3
- size 15524282
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:382cc235b56c725945e149cc25f191da667c836655efd0857b004320e90e91ea
3
+ size 15524095
tokenizer_config.json CHANGED
@@ -98,19 +98,11 @@
98
  "rstrip": true,
99
  "single_word": false,
100
  "special": true
101
- },
102
- "200029": {
103
- "content": "<|im_end|>",
104
- "lstrip": false,
105
- "normalized": false,
106
- "rstrip": false,
107
- "single_word": false,
108
- "special": true
109
  }
110
  },
111
  "bos_token": "<|endoftext|>",
112
  "clean_up_tokenization_spaces": false,
113
- "eos_token": "<|im_end|>",
114
  "extra_special_tokens": {},
115
  "max_seq_length": 131072,
116
  "model_max_length": 131072,
 
98
  "rstrip": true,
99
  "single_word": false,
100
  "special": true
 
 
 
 
 
 
 
 
101
  }
102
  },
103
  "bos_token": "<|endoftext|>",
104
  "clean_up_tokenization_spaces": false,
105
+ "eos_token": "<|endoftext|>",
106
  "extra_special_tokens": {},
107
  "max_seq_length": 131072,
108
  "model_max_length": 131072,
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c17976ccc6c44ffaa7ddcd88be8df49d02604806cf911f1fb5c9afbffcd1e0a8
3
  size 5624
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c28ae3977602c49ab98a9435a94f55929df4491fd837a27dbd7dad384b2b3aa
3
  size 5624