Upload 11 files
Browse files- .gitattributes +3 -0
- config.json +0 -0
- main_axcl_aarch64 +3 -0
- main_axcl_x86 +3 -0
- main_prefill +3 -0
- post_config.json +14 -0
- qwen2.5_tokenizer.py +133 -0
- qwen2.5_tokenizer/tokenizer.json +0 -0
- qwen2.5_tokenizer/tokenizer_config.json +207 -0
- run_qwen2.5_7b_gptq_int4_ax650.sh +14 -0
- run_qwen2.5_7b_gptq_int4_axcl_aarch64.sh +14 -0
- run_qwen2.5_7b_gptq_int4_axcl_x86.sh +14 -0
.gitattributes
CHANGED
@@ -34,3 +34,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
*.axmodel filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
*.axmodel filter=lfs diff=lfs merge=lfs -text
|
37 |
+
main_axcl_aarch64 filter=lfs diff=lfs merge=lfs -text
|
38 |
+
main_axcl_x86 filter=lfs diff=lfs merge=lfs -text
|
39 |
+
main_prefill filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
File without changes
|
main_axcl_aarch64
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bb111fc00c54abb6142a8f44df087bf104c8150a1cefa6be55c6b174b932c4ec
|
3 |
+
size 999008
|
main_axcl_x86
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6cba0be8df523e351789fcfa745772423096f52a3b0a760f8d8c9f5b8bb2ec82
|
3 |
+
size 1022384
|
main_prefill
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:90026f1e071aef781ccc9bc313db3805749b3e234bf03d578c9f97ae2e60abd2
|
3 |
+
size 953544
|
post_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"enable_temperature" : true,
|
3 |
+
"temperature" : 0.9,
|
4 |
+
|
5 |
+
"enable_repetition_penalty" : false,
|
6 |
+
"repetition_penalty" : 1.2,
|
7 |
+
"penalty_window" : 20,
|
8 |
+
|
9 |
+
"enable_top_p_sampling" : false,
|
10 |
+
"top_p" : 0.8,
|
11 |
+
|
12 |
+
"enable_top_k_sampling" : true,
|
13 |
+
"top_k" : 10
|
14 |
+
}
|
qwen2.5_tokenizer.py
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import AutoTokenizer, PreTrainedTokenizerFast
|
2 |
+
from http.server import HTTPServer, BaseHTTPRequestHandler
|
3 |
+
import json
|
4 |
+
import argparse
|
5 |
+
|
6 |
+
|
7 |
+
class Tokenizer_Http():
|
8 |
+
|
9 |
+
def __init__(self):
|
10 |
+
model_id = "qwen2.5_tokenizer"
|
11 |
+
self.tokenizer = AutoTokenizer.from_pretrained(model_id)
|
12 |
+
|
13 |
+
def encode(self, prompt):
|
14 |
+
messages = [
|
15 |
+
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
|
16 |
+
{"role": "user", "content": prompt}
|
17 |
+
]
|
18 |
+
text = self.tokenizer.apply_chat_template(
|
19 |
+
messages,
|
20 |
+
tokenize=False,
|
21 |
+
add_generation_prompt=True
|
22 |
+
)
|
23 |
+
print(text)
|
24 |
+
token_ids = self.tokenizer.encode(text)
|
25 |
+
return token_ids
|
26 |
+
|
27 |
+
def decode(self, token_ids):
|
28 |
+
return self.tokenizer.decode(token_ids)
|
29 |
+
|
30 |
+
@property
|
31 |
+
def bos_id(self):
|
32 |
+
return self.tokenizer.bos_token_id
|
33 |
+
|
34 |
+
@property
|
35 |
+
def eos_id(self):
|
36 |
+
return self.tokenizer.eos_token_id
|
37 |
+
|
38 |
+
@property
|
39 |
+
def bos_token(self):
|
40 |
+
return self.tokenizer.bos_token
|
41 |
+
|
42 |
+
@property
|
43 |
+
def eos_token(self):
|
44 |
+
return self.tokenizer.eos_token
|
45 |
+
|
46 |
+
|
47 |
+
tokenizer = Tokenizer_Http()
|
48 |
+
|
49 |
+
print(tokenizer.bos_id, tokenizer.bos_token, tokenizer.eos_id, tokenizer.eos_token)
|
50 |
+
print(tokenizer.encode("hello world"))
|
51 |
+
|
52 |
+
|
53 |
+
class Request(BaseHTTPRequestHandler):
|
54 |
+
#通过类继承,新定义类
|
55 |
+
timeout = 5
|
56 |
+
server_version = 'Apache'
|
57 |
+
|
58 |
+
def do_GET(self):
|
59 |
+
print(self.path)
|
60 |
+
#在新类中定义get的内容(当客户端向该服务端使用get请求时,本服务端将如下运行)
|
61 |
+
self.send_response(200)
|
62 |
+
self.send_header("type", "get") #设置响应头,可省略或设置多个
|
63 |
+
self.end_headers()
|
64 |
+
|
65 |
+
if self.path == '/bos_id':
|
66 |
+
bos_id = tokenizer.bos_id
|
67 |
+
# print(bos_id)
|
68 |
+
# to json
|
69 |
+
if bos_id is None:
|
70 |
+
msg = json.dumps({'bos_id': -1})
|
71 |
+
else:
|
72 |
+
msg = json.dumps({'bos_id': bos_id})
|
73 |
+
elif self.path == '/eos_id':
|
74 |
+
eos_id = tokenizer.eos_id
|
75 |
+
if eos_id is None:
|
76 |
+
msg = json.dumps({'eos_id': -1})
|
77 |
+
else:
|
78 |
+
msg = json.dumps({'eos_id': eos_id})
|
79 |
+
else:
|
80 |
+
msg = 'error'
|
81 |
+
|
82 |
+
print(msg)
|
83 |
+
msg = str(msg).encode() #转为str再转为byte格式
|
84 |
+
|
85 |
+
self.wfile.write(msg) #将byte格式的信息返回给客户端
|
86 |
+
|
87 |
+
def do_POST(self):
|
88 |
+
#在新类中定义post的内容(当客户端向该服务端使用post请求时,本服务端将如下运行)
|
89 |
+
data = self.rfile.read(int(
|
90 |
+
self.headers['content-length'])) #获取从客户端传入的参数(byte格式)
|
91 |
+
data = data.decode() #将byte格式转为str格式
|
92 |
+
|
93 |
+
self.send_response(200)
|
94 |
+
self.send_header("type", "post") #设置响应头,可省略或设置多个
|
95 |
+
self.end_headers()
|
96 |
+
|
97 |
+
if self.path == '/encode':
|
98 |
+
req = json.loads(data)
|
99 |
+
prompt = req['text']
|
100 |
+
|
101 |
+
token_ids = tokenizer.encode(prompt)
|
102 |
+
if token_ids is None:
|
103 |
+
msg = json.dumps({'token_ids': -1})
|
104 |
+
else:
|
105 |
+
msg = json.dumps({'token_ids': token_ids})
|
106 |
+
|
107 |
+
elif self.path == '/decode':
|
108 |
+
req = json.loads(data)
|
109 |
+
token_ids = req['token_ids']
|
110 |
+
text = tokenizer.decode(token_ids)
|
111 |
+
if text is None:
|
112 |
+
msg = json.dumps({'text': ""})
|
113 |
+
else:
|
114 |
+
msg = json.dumps({'text': text})
|
115 |
+
else:
|
116 |
+
msg = 'error'
|
117 |
+
print(msg)
|
118 |
+
msg = str(msg).encode() #转为str再转为byte格式
|
119 |
+
|
120 |
+
self.wfile.write(msg) #将byte格式的信息返回给客户端
|
121 |
+
|
122 |
+
|
123 |
+
if __name__ == "__main__":
|
124 |
+
|
125 |
+
args = argparse.ArgumentParser()
|
126 |
+
args.add_argument('--host', type=str, default='localhost')
|
127 |
+
args.add_argument('--port', type=int, default=8080)
|
128 |
+
args = args.parse_args()
|
129 |
+
|
130 |
+
host = (args.host, args.port) #设定地址与端口号,'localhost'等价于'127.0.0.1'
|
131 |
+
print('http://%s:%s' % host)
|
132 |
+
server = HTTPServer(host, Request) #根据地址端口号和新定义的类,创建服务器实例
|
133 |
+
server.serve_forever() #开启服务
|
qwen2.5_tokenizer/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
qwen2.5_tokenizer/tokenizer_config.json
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
},
|
182 |
+
"additional_special_tokens": [
|
183 |
+
"<|im_start|>",
|
184 |
+
"<|im_end|>",
|
185 |
+
"<|object_ref_start|>",
|
186 |
+
"<|object_ref_end|>",
|
187 |
+
"<|box_start|>",
|
188 |
+
"<|box_end|>",
|
189 |
+
"<|quad_start|>",
|
190 |
+
"<|quad_end|>",
|
191 |
+
"<|vision_start|>",
|
192 |
+
"<|vision_end|>",
|
193 |
+
"<|vision_pad|>",
|
194 |
+
"<|image_pad|>",
|
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": "<|im_end|>",
|
201 |
+
"errors": "replace",
|
202 |
+
"model_max_length": 131072,
|
203 |
+
"pad_token": "<|endoftext|>",
|
204 |
+
"split_special_tokens": false,
|
205 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
206 |
+
"unk_token": null
|
207 |
+
}
|
run_qwen2.5_7b_gptq_int4_ax650.sh
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
./main_prefill \
|
2 |
+
--template_filename_axmodel "qwen2.5-7b-gptq-int4-ax650/qwen2_p128_l%d_together.axmodel" \
|
3 |
+
--axmodel_num 28 \
|
4 |
+
--tokenizer_type 2 \
|
5 |
+
--filename_tokenizer_model "http://127.0.0.1:12345" \
|
6 |
+
--bos 0 --eos 0 \
|
7 |
+
--filename_post_axmodel "qwen2.5-7b-gptq-int4-ax650/qwen2_post.axmodel" \
|
8 |
+
--filename_tokens_embed "qwen2.5-7b-gptq-int4-ax650/model.embed_tokens.weight.bfloat16.bin" \
|
9 |
+
--tokens_embed_num 152064 \
|
10 |
+
--tokens_embed_size 3584 \
|
11 |
+
--use_mmap_load_embed 1 \
|
12 |
+
--live_print 1 \
|
13 |
+
--continue 1 \
|
14 |
+
--prompt "$1"
|
run_qwen2.5_7b_gptq_int4_axcl_aarch64.sh
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
./main_axcl_aarch64 \
|
2 |
+
--template_filename_axmodel "qwen2.5-7b-gptq-int4-ax650/qwen2_p128_l%d_together.axmodel" \
|
3 |
+
--axmodel_num 28 \
|
4 |
+
--tokenizer_type 2 \
|
5 |
+
--filename_tokenizer_model "http://127.0.0.1:12345" \
|
6 |
+
--bos 0 --eos 0 \
|
7 |
+
--filename_post_axmodel "qwen2.5-7b-gptq-int4-ax650/qwen2_post.axmodel" \
|
8 |
+
--filename_tokens_embed "qwen2.5-7b-gptq-int4-ax650/model.embed_tokens.weight.bfloat16.bin" \
|
9 |
+
--tokens_embed_num 152064 \
|
10 |
+
--tokens_embed_size 3584 \
|
11 |
+
--use_mmap_load_embed 0 \
|
12 |
+
--live_print 1 \
|
13 |
+
--continue 1 \
|
14 |
+
--prompt "$1"
|
run_qwen2.5_7b_gptq_int4_axcl_x86.sh
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
./main_axcl_x86 \
|
2 |
+
--template_filename_axmodel "qwen2.5-7b-gptq-int4-ax650/qwen2_p128_l%d_together.axmodel" \
|
3 |
+
--axmodel_num 28 \
|
4 |
+
--tokenizer_type 2 \
|
5 |
+
--filename_tokenizer_model "http://127.0.0.1:12345" \
|
6 |
+
--bos 0 --eos 0 \
|
7 |
+
--filename_post_axmodel "qwen2.5-7b-gptq-int4-ax650/qwen2_post.axmodel" \
|
8 |
+
--filename_tokens_embed "qwen2.5-7b-gptq-int4-ax650/model.embed_tokens.weight.bfloat16.bin" \
|
9 |
+
--tokens_embed_num 152064 \
|
10 |
+
--tokens_embed_size 3584 \
|
11 |
+
--use_mmap_load_embed 0 \
|
12 |
+
--live_print 1 \
|
13 |
+
--continue 1 \
|
14 |
+
--prompt "$1"
|