Upload 38 files
Browse files- .gitattributes +29 -0
- TinySwallow-1.5B-Instruct-ax630c/added_tokens.json +24 -0
- TinySwallow-1.5B-Instruct-ax630c/generation_config.json +14 -0
- TinySwallow-1.5B-Instruct-ax630c/model.embed_tokens.weight.bfloat16.bin +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l0_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l10_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l11_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l12_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l13_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l14_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l15_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l16_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l17_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l18_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l19_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l1_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l20_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l21_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l22_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l23_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l24_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l25_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l26_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l27_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l2_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l3_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l4_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l5_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l6_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l7_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l8_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l9_together.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/qwen2_post.axmodel +3 -0
- TinySwallow-1.5B-Instruct-ax630c/special_tokens_map.json +31 -0
- TinySwallow-1.5B-Instruct-ax630c/tokenizer.json +0 -0
- TinySwallow-1.5B-Instruct-ax630c/tokenizer_config.json +207 -0
- TinySwallow-1.5B-Instruct-ax630c/vocab.json +0 -0
- run_TinySwallow_1.5B_prefill_ax630c.sh +14 -0
- tinyswallow_tokenizer.py +120 -0
.gitattributes
CHANGED
@@ -33,3 +33,32 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip 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 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l0_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
37 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l1_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
38 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l10_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
39 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l11_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
40 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l12_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
41 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l13_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
42 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l14_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
43 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l15_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
44 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l16_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
45 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l17_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
46 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l18_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
47 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l19_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
48 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l2_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
49 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l20_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
50 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l21_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
51 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l22_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
52 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l23_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
53 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l24_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
54 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l25_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
55 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l26_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
56 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l27_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
57 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l3_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
58 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l4_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
59 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l5_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
60 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l6_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
61 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l7_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
62 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l8_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
63 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l9_together.axmodel filter=lfs diff=lfs merge=lfs -text
|
64 |
+
TinySwallow-1.5B-Instruct-ax630c/qwen2_post.axmodel filter=lfs diff=lfs merge=lfs -text
|
TinySwallow-1.5B-Instruct-ax630c/added_tokens.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</tool_call>": 151658,
|
3 |
+
"<tool_call>": 151657,
|
4 |
+
"<|box_end|>": 151649,
|
5 |
+
"<|box_start|>": 151648,
|
6 |
+
"<|endoftext|>": 151643,
|
7 |
+
"<|file_sep|>": 151664,
|
8 |
+
"<|fim_middle|>": 151660,
|
9 |
+
"<|fim_pad|>": 151662,
|
10 |
+
"<|fim_prefix|>": 151659,
|
11 |
+
"<|fim_suffix|>": 151661,
|
12 |
+
"<|im_end|>": 151645,
|
13 |
+
"<|im_start|>": 151644,
|
14 |
+
"<|image_pad|>": 151655,
|
15 |
+
"<|object_ref_end|>": 151647,
|
16 |
+
"<|object_ref_start|>": 151646,
|
17 |
+
"<|quad_end|>": 151651,
|
18 |
+
"<|quad_start|>": 151650,
|
19 |
+
"<|repo_name|>": 151663,
|
20 |
+
"<|video_pad|>": 151656,
|
21 |
+
"<|vision_end|>": 151653,
|
22 |
+
"<|vision_pad|>": 151654,
|
23 |
+
"<|vision_start|>": 151652
|
24 |
+
}
|
TinySwallow-1.5B-Instruct-ax630c/generation_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token_id": 151643,
|
3 |
+
"do_sample": true,
|
4 |
+
"eos_token_id": [
|
5 |
+
151645,
|
6 |
+
151643
|
7 |
+
],
|
8 |
+
"pad_token_id": 151643,
|
9 |
+
"repetition_penalty": 1.1,
|
10 |
+
"temperature": 0.7,
|
11 |
+
"top_k": 20,
|
12 |
+
"top_p": 0.8,
|
13 |
+
"transformers_version": "4.41.2"
|
14 |
+
}
|
TinySwallow-1.5B-Instruct-ax630c/model.embed_tokens.weight.bfloat16.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:47be7228eb1738b5051685c8ded39e45ca67d05bb5e857862715da278a9dad55
|
3 |
+
size 466747392
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l0_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d95dabd8391d529cd7bf1f3c352d25846af7acbe5643dbd09c27d4b7e31c9ec5
|
3 |
+
size 49919320
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l10_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4eb93f516dacd565759b8bdca746563d946aea5c816805729d3dd0b182ca7058
|
3 |
+
size 49919512
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l11_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b19a9eb01b0eecb8916cd6ba6b265531ce922d504d329c93ebb37ed9a36d13fa
|
3 |
+
size 49919240
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l12_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:08b066a9197ca710f020ead56d4bc1b573e335d3e00c273ff3376839a34d0d97
|
3 |
+
size 49919480
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l13_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:40f3d1d302e44e1a223f4aba7f9f657c952cfb539731596a6fdf72879ee0d099
|
3 |
+
size 49919416
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l14_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:27a88a9a0489525fba109df6e35614378477aa0925aac140b320494cb1914d56
|
3 |
+
size 49919392
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l15_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dbbafab16e20e9b5452aafa88522af079915707d76366c3023ae967c3bd40370
|
3 |
+
size 49919592
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l16_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e45bec764790d636b2631d5b31c6a5e28c57834a32d52bd8c048d02bb462dbee
|
3 |
+
size 49919192
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l17_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0a79b21091a45d2fbe32e9bbb07138b0c637b950923c692d067f94a6953d98c2
|
3 |
+
size 49919520
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l18_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:64b44f4f93b7cb6e449236e7c39695d0071721ae4fdaf0f80384af0f33b38e2b
|
3 |
+
size 49919392
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l19_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ead3c4b30d4d8e718fc8fa8fbcdb8a8d24263b12585bfc9ceb9e027840ad000f
|
3 |
+
size 49919448
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l1_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4c3a930dd1ad67d0a8fb5ff27e5f1f7e099d60caa99bfcc8a4a5896356dac1d1
|
3 |
+
size 49919288
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l20_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8a65f8db05117af695a7dafb91b433a0ffc870408738d0990710e311330a7ef3
|
3 |
+
size 49919088
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l21_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:64ff558fac2efaa4b1643b0e745a28b24db3f7a24540da82a0c8847184cf810e
|
3 |
+
size 49919576
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l22_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aa279b5931436da9fae5fe7e9515dffd8ca28f8a7a9a22035b6b77acbab1c98d
|
3 |
+
size 49919096
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l23_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e860c6201b693b38b37ab516ee9a82a4304d4118b1757317e4b89e24a9d2d12f
|
3 |
+
size 49919304
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l24_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ceb27bdbca0b2961f79a4dbbba229d6d766eb3b5f187b389c65dc32e3fbf209b
|
3 |
+
size 49919560
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l25_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:719726adeafb46dbac082e5886c3c12fa694eb12fac35dd90aa30f103ca5cf91
|
3 |
+
size 49919496
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l26_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c3107e976552557b691b0bbec2d2c071aed93ba949ec45b144d32d768915de44
|
3 |
+
size 49919144
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l27_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:73460b8859cecd4140821098aa529e91fd53ba79d74d1eb35a39334941840e62
|
3 |
+
size 49919568
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l2_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:52911398c6ce896c71e0dcd51f77976f2d9f7733aaddff7f2ae9c82476b1aef0
|
3 |
+
size 49919472
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l3_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d78128086596a7f701ba02cb643ceae7367ee5186bfae4e36ad5e690ce95e0a3
|
3 |
+
size 49919592
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l4_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:28d5e139444b7d0e2cf982a20c8180f0d5893c2b59a9b5117a07ac504def956f
|
3 |
+
size 49919456
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l5_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:79fd918c39cacce0a6c7dd3ad95bac154d315606c27c05d59c2efebfdc6c6965
|
3 |
+
size 49919360
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l6_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a71e3e8eb37a83e383765cda0f8dd697ed7b01084d4a54ed7d181e52040e00f9
|
3 |
+
size 49919648
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l7_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0912faada8ff476a5fe3d9245db7b74d4bbf97614715a3e364cd0d920fd3f625
|
3 |
+
size 49919344
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l8_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c1c622748d1adbff170767a86d117b6ae2f50b9de9eb84ed533d3e6caf5567e2
|
3 |
+
size 49919240
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l9_together.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2273a2d59a5d695caf171657f154e8da4efccb68426d9bb2c68f990b1bc3a2c9
|
3 |
+
size 49919560
|
TinySwallow-1.5B-Instruct-ax630c/qwen2_post.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0c880e8c94c155d9e28a36a729af91cab9d0947ff63033a995889fa4f93cd4a4
|
3 |
+
size 237152504
|
TinySwallow-1.5B-Instruct-ax630c/special_tokens_map.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_start|>",
|
4 |
+
"<|im_end|>",
|
5 |
+
"<|object_ref_start|>",
|
6 |
+
"<|object_ref_end|>",
|
7 |
+
"<|box_start|>",
|
8 |
+
"<|box_end|>",
|
9 |
+
"<|quad_start|>",
|
10 |
+
"<|quad_end|>",
|
11 |
+
"<|vision_start|>",
|
12 |
+
"<|vision_end|>",
|
13 |
+
"<|vision_pad|>",
|
14 |
+
"<|image_pad|>",
|
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": "<|endoftext|>",
|
26 |
+
"lstrip": false,
|
27 |
+
"normalized": false,
|
28 |
+
"rstrip": false,
|
29 |
+
"single_word": false
|
30 |
+
}
|
31 |
+
}
|
TinySwallow-1.5B-Instruct-ax630c/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
TinySwallow-1.5B-Instruct-ax630c/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 {{- 'あなたは、Sakana AI株式会社が開発したTinySwallowです。小型ながら、誠実で優秀なアシスタントです。' }}\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\\nあなたは、Sakana AI株式会社が開発したTinySwallowです。小型ながら、誠実で優秀なアシスタントです。<|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 |
+
}
|
TinySwallow-1.5B-Instruct-ax630c/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
run_TinySwallow_1.5B_prefill_ax630c.sh
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
./main_prefill \
|
2 |
+
--template_filename_axmodel "TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l%d_together.axmodel" \
|
3 |
+
--axmodel_num 28 \
|
4 |
+
--tokenizer_type 2 \
|
5 |
+
--filename_tokenizer_model "http://localhost:8080" \
|
6 |
+
--bos 0 --eos 0 \
|
7 |
+
--filename_post_axmodel "TinySwallow-1.5B-Instruct-ax630c/qwen2_post.axmodel" \
|
8 |
+
--filename_tokens_embed "TinySwallow-1.5B-Instruct-ax630c/model.embed_tokens.weight.bfloat16.bin" \
|
9 |
+
--tokens_embed_num 151936 \
|
10 |
+
--tokens_embed_size 1536 \
|
11 |
+
--use_mmap_load_embed 1 \
|
12 |
+
--live_print 1 \
|
13 |
+
--continue 1 \
|
14 |
+
--prompt "$1"
|
tinyswallow_tokenizer.py
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# license: bsd-3-clause
|
2 |
+
# origin: https://huggingface.co/AXERA-TECH/DeepSeek-R1-Distill-Qwen-1.5B/blob/main/deepseek-r1_tokenizer.py
|
3 |
+
|
4 |
+
from transformers import AutoTokenizer
|
5 |
+
from http.server import HTTPServer, BaseHTTPRequestHandler
|
6 |
+
import json
|
7 |
+
import argparse
|
8 |
+
|
9 |
+
|
10 |
+
class Tokenizer_Http:
|
11 |
+
def __init__(self):
|
12 |
+
model_id = "TinySwallow-1.5B-Instruct-ax630c"
|
13 |
+
self.tokenizer = AutoTokenizer.from_pretrained(model_id)
|
14 |
+
|
15 |
+
def encode(self, prompt):
|
16 |
+
messages = [
|
17 |
+
{"role": "system", "content": "あなたは、Sakana AI株式会社が開発したTinySwallowです。小型ながら、誠実で優秀なアシスタントです。"},
|
18 |
+
{"role": "user", "content": prompt}
|
19 |
+
]
|
20 |
+
text = self.tokenizer.apply_chat_template(
|
21 |
+
messages,
|
22 |
+
tokenize=False,
|
23 |
+
add_generation_prompt=True
|
24 |
+
)
|
25 |
+
print(text)
|
26 |
+
token_ids = self.tokenizer.encode(text)
|
27 |
+
return token_ids
|
28 |
+
|
29 |
+
def decode(self, token_ids):
|
30 |
+
return self.tokenizer.decode(token_ids)
|
31 |
+
|
32 |
+
@property
|
33 |
+
def bos_id(self):
|
34 |
+
return self.tokenizer.bos_token_id
|
35 |
+
|
36 |
+
@property
|
37 |
+
def eos_id(self):
|
38 |
+
return self.tokenizer.eos_token_id
|
39 |
+
|
40 |
+
@property
|
41 |
+
def bos_token(self):
|
42 |
+
return self.tokenizer.bos_token
|
43 |
+
|
44 |
+
@property
|
45 |
+
def eos_token(self):
|
46 |
+
return self.tokenizer.eos_token
|
47 |
+
|
48 |
+
|
49 |
+
tokenizer = Tokenizer_Http()
|
50 |
+
|
51 |
+
print(tokenizer.bos_id, tokenizer.bos_token, tokenizer.eos_id, tokenizer.eos_token)
|
52 |
+
print(tokenizer.encode("hello world"))
|
53 |
+
|
54 |
+
|
55 |
+
class Request(BaseHTTPRequestHandler):
|
56 |
+
timeout = 5
|
57 |
+
server_version = 'Apache'
|
58 |
+
|
59 |
+
def _set_headers(self):
|
60 |
+
self.send_response(200)
|
61 |
+
self.send_header("Content-Type", "application/json; charset=utf-8")
|
62 |
+
self.end_headers()
|
63 |
+
|
64 |
+
def do_GET(self):
|
65 |
+
print(self.path)
|
66 |
+
self._set_headers()
|
67 |
+
|
68 |
+
if self.path == '/bos_id':
|
69 |
+
bos_id = tokenizer.bos_id
|
70 |
+
msg = json.dumps({'bos_id': bos_id if bos_id is not None else -1}, ensure_ascii=False)
|
71 |
+
elif self.path == '/eos_id':
|
72 |
+
eos_id = tokenizer.eos_id
|
73 |
+
msg = json.dumps({'eos_id': eos_id if eos_id is not None else -1}, ensure_ascii=False)
|
74 |
+
else:
|
75 |
+
msg = json.dumps({'error': 'Invalid path'}, ensure_ascii=False)
|
76 |
+
|
77 |
+
print(msg)
|
78 |
+
self.wfile.write(msg.encode('utf-8'))
|
79 |
+
|
80 |
+
def do_POST(self):
|
81 |
+
content_length = int(self.headers['Content-Length'])
|
82 |
+
data = self.rfile.read(content_length).decode('utf-8')
|
83 |
+
|
84 |
+
self._set_headers()
|
85 |
+
|
86 |
+
try:
|
87 |
+
req = json.loads(data)
|
88 |
+
except json.JSONDecodeError:
|
89 |
+
msg = json.dumps({'error': 'Invalid JSON'}, ensure_ascii=False)
|
90 |
+
self.wfile.write(msg.encode('utf-8'))
|
91 |
+
return
|
92 |
+
|
93 |
+
if self.path == '/encode':
|
94 |
+
prompt = req.get('text', '')
|
95 |
+
token_ids = tokenizer.encode(prompt)
|
96 |
+
msg = json.dumps({'token_ids': token_ids if token_ids else -1}, ensure_ascii=False)
|
97 |
+
|
98 |
+
elif self.path == '/decode':
|
99 |
+
token_ids = req.get('token_ids', [])
|
100 |
+
text = tokenizer.decode(token_ids)
|
101 |
+
msg = json.dumps({'text': text if text else ""}, ensure_ascii=False)
|
102 |
+
|
103 |
+
else:
|
104 |
+
msg = json.dumps({'error': 'Invalid path'}, ensure_ascii=False)
|
105 |
+
|
106 |
+
print(msg)
|
107 |
+
self.wfile.write(msg.encode('utf-8'))
|
108 |
+
|
109 |
+
|
110 |
+
if __name__ == "__main__":
|
111 |
+
parser = argparse.ArgumentParser()
|
112 |
+
parser.add_argument('--host', type=str, default='localhost')
|
113 |
+
parser.add_argument('--port', type=int, default=8080)
|
114 |
+
args = parser.parse_args()
|
115 |
+
|
116 |
+
host = (args.host, args.port)
|
117 |
+
print(f'http://{host[0]}:{host[1]}')
|
118 |
+
server = HTTPServer(host, Request)
|
119 |
+
server.serve_forever()
|
120 |
+
|