shi-zheng-qxhs
commited on
Commit
•
b0ad3b9
1
Parent(s):
938b2ba
Upload folder using huggingface_hub
Browse files- added_tokens.json +6 -0
- config.json +38 -0
- generation_config.json +8 -0
- merges.txt +0 -0
- onnx/decoder_model.onnx +3 -0
- onnx/decoder_model_merged.onnx +3 -0
- onnx/decoder_model_merged_quantized.onnx +3 -0
- onnx/decoder_model_quantized.onnx +3 -0
- onnx/decoder_with_past_model.onnx +3 -0
- onnx/decoder_with_past_model_quantized.onnx +3 -0
- quantize_config.json +97 -0
- special_tokens_map.json +36 -0
- tokenizer.json +0 -0
- tokenizer_config.json +59 -0
- vocab.json +0 -0
added_tokens.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|assistant|>": 50260,
|
3 |
+
"<|end|>": 50259,
|
4 |
+
"<|system|>": 50258,
|
5 |
+
"<|user|>": 50257
|
6 |
+
}
|
config.json
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "shi-zheng-qxhs/gpt2_oasst2_curated",
|
3 |
+
"activation_function": "gelu_new",
|
4 |
+
"architectures": [
|
5 |
+
"GPT2LMHeadModel"
|
6 |
+
],
|
7 |
+
"attn_pdrop": 0.1,
|
8 |
+
"bos_token_id": 50256,
|
9 |
+
"embd_pdrop": 0.1,
|
10 |
+
"eos_token_id": 50256,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"layer_norm_epsilon": 1e-05,
|
13 |
+
"model_type": "gpt2",
|
14 |
+
"n_ctx": 1024,
|
15 |
+
"n_embd": 768,
|
16 |
+
"n_head": 12,
|
17 |
+
"n_inner": null,
|
18 |
+
"n_layer": 12,
|
19 |
+
"n_positions": 1024,
|
20 |
+
"reorder_and_upcast_attn": false,
|
21 |
+
"resid_pdrop": 0.1,
|
22 |
+
"scale_attn_by_inverse_layer_idx": false,
|
23 |
+
"scale_attn_weights": true,
|
24 |
+
"summary_activation": null,
|
25 |
+
"summary_first_dropout": 0.1,
|
26 |
+
"summary_proj_to_labels": true,
|
27 |
+
"summary_type": "cls_index",
|
28 |
+
"summary_use_proj": true,
|
29 |
+
"task_specific_params": {
|
30 |
+
"text-generation": {
|
31 |
+
"do_sample": true,
|
32 |
+
"max_length": 50
|
33 |
+
}
|
34 |
+
},
|
35 |
+
"transformers_version": "4.33.2",
|
36 |
+
"use_cache": true,
|
37 |
+
"vocab_size": 50261
|
38 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"eos_token_id": 50256,
|
3 |
+
"max_new_tokens": 128,
|
4 |
+
"pad_token_id": 50256,
|
5 |
+
"penalty_alpha": 0.6,
|
6 |
+
"top_k": 6,
|
7 |
+
"transformers_version": "4.33.2"
|
8 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
onnx/decoder_model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49a48cc1a692eeff98fb5da41b9dae5e6bf53923cebc405b6a5022791877332e
|
3 |
+
size 499288354
|
onnx/decoder_model_merged.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae3711989129bda1e163e75483108395619d30fe9e036527c4472c8ae0c7164f
|
3 |
+
size 500811604
|
onnx/decoder_model_merged_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e1714eedeba5ce5a8383ca07d9c40ffe26c5c1741dc1128eda372307d00628f4
|
3 |
+
size 128319015
|
onnx/decoder_model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b98139cff33249641e924b085e75f2b446aaad1a5460615b4c3eb1d5997f79a4
|
3 |
+
size 126560042
|
onnx/decoder_with_past_model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f5e732e37e26f44c1f87d934b5774ed5867bd202e15b995214e0a2de8118bc04
|
3 |
+
size 499295159
|
onnx/decoder_with_past_model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f29073b1b57b31d23d2836edea19e447c3b0678abf4c8f9c0043625f52bd3af6
|
3 |
+
size 126569089
|
quantize_config.json
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"per_channel": false,
|
3 |
+
"reduce_range": false,
|
4 |
+
"per_model_config": {
|
5 |
+
"decoder_model": {
|
6 |
+
"op_types": [
|
7 |
+
"Reshape",
|
8 |
+
"Unsqueeze",
|
9 |
+
"Pow",
|
10 |
+
"Where",
|
11 |
+
"Split",
|
12 |
+
"Sqrt",
|
13 |
+
"Squeeze",
|
14 |
+
"Slice",
|
15 |
+
"Softmax",
|
16 |
+
"Gather",
|
17 |
+
"Shape",
|
18 |
+
"ConstantOfShape",
|
19 |
+
"Add",
|
20 |
+
"Tanh",
|
21 |
+
"ReduceMean",
|
22 |
+
"Cast",
|
23 |
+
"Mul",
|
24 |
+
"Div",
|
25 |
+
"Sub",
|
26 |
+
"Range",
|
27 |
+
"Transpose",
|
28 |
+
"Concat",
|
29 |
+
"Gemm",
|
30 |
+
"Constant",
|
31 |
+
"MatMul"
|
32 |
+
],
|
33 |
+
"weight_type": "QInt8"
|
34 |
+
},
|
35 |
+
"decoder_with_past_model": {
|
36 |
+
"op_types": [
|
37 |
+
"Reshape",
|
38 |
+
"Unsqueeze",
|
39 |
+
"Pow",
|
40 |
+
"Where",
|
41 |
+
"Split",
|
42 |
+
"Sqrt",
|
43 |
+
"Squeeze",
|
44 |
+
"Slice",
|
45 |
+
"Softmax",
|
46 |
+
"Gather",
|
47 |
+
"Shape",
|
48 |
+
"ConstantOfShape",
|
49 |
+
"Add",
|
50 |
+
"Tanh",
|
51 |
+
"ReduceMean",
|
52 |
+
"Cast",
|
53 |
+
"Mul",
|
54 |
+
"Div",
|
55 |
+
"Sub",
|
56 |
+
"Range",
|
57 |
+
"Transpose",
|
58 |
+
"Concat",
|
59 |
+
"Gemm",
|
60 |
+
"Constant",
|
61 |
+
"MatMul"
|
62 |
+
],
|
63 |
+
"weight_type": "QInt8"
|
64 |
+
},
|
65 |
+
"decoder_model_merged": {
|
66 |
+
"op_types": [
|
67 |
+
"Reshape",
|
68 |
+
"Unsqueeze",
|
69 |
+
"Pow",
|
70 |
+
"Where",
|
71 |
+
"Split",
|
72 |
+
"Sqrt",
|
73 |
+
"Squeeze",
|
74 |
+
"Slice",
|
75 |
+
"Softmax",
|
76 |
+
"Gather",
|
77 |
+
"Shape",
|
78 |
+
"ConstantOfShape",
|
79 |
+
"Add",
|
80 |
+
"Tanh",
|
81 |
+
"ReduceMean",
|
82 |
+
"Cast",
|
83 |
+
"Mul",
|
84 |
+
"Div",
|
85 |
+
"Sub",
|
86 |
+
"Range",
|
87 |
+
"Transpose",
|
88 |
+
"Concat",
|
89 |
+
"Gemm",
|
90 |
+
"Constant",
|
91 |
+
"MatMul",
|
92 |
+
"If"
|
93 |
+
],
|
94 |
+
"weight_type": "QInt8"
|
95 |
+
}
|
96 |
+
}
|
97 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
{
|
4 |
+
"content": "<|user|>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false
|
9 |
+
},
|
10 |
+
{
|
11 |
+
"content": "<|system|>",
|
12 |
+
"lstrip": false,
|
13 |
+
"normalized": false,
|
14 |
+
"rstrip": false,
|
15 |
+
"single_word": false
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"content": "<|end|>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": false,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
},
|
24 |
+
{
|
25 |
+
"content": "<|assistant|>",
|
26 |
+
"lstrip": false,
|
27 |
+
"normalized": false,
|
28 |
+
"rstrip": false,
|
29 |
+
"single_word": false
|
30 |
+
}
|
31 |
+
],
|
32 |
+
"bos_token": "<|endoftext|>",
|
33 |
+
"eos_token": "<|endoftext|>",
|
34 |
+
"pad_token": "<|endoftext|>",
|
35 |
+
"unk_token": "<|endoftext|>"
|
36 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"50256": {
|
5 |
+
"content": "<|endoftext|>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"50257": {
|
13 |
+
"content": "<|user|>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": false,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"50258": {
|
21 |
+
"content": "<|system|>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": false,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"50259": {
|
29 |
+
"content": "<|end|>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": false,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"50260": {
|
37 |
+
"content": "<|assistant|>",
|
38 |
+
"lstrip": false,
|
39 |
+
"normalized": false,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"additional_special_tokens": [
|
46 |
+
"<|user|>",
|
47 |
+
"<|system|>",
|
48 |
+
"<|end|>",
|
49 |
+
"<|assistant|>"
|
50 |
+
],
|
51 |
+
"bos_token": "<|endoftext|>",
|
52 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'user' %}{{ '<|endoftext|><|user|>\n' + message['content'] + '<|end|>\n' }}{% elif message['role'] == 'system' %}{{ '<|system|>\n' + message['content'] + '<|end|>\n' }}{% elif message['role'] == 'assistant' %}{{ '<|assistant|>\n' + message['content'] + '<|end|><|endoftext|>\n' }}{% endif %}{% endfor %}",
|
53 |
+
"clean_up_tokenization_spaces": true,
|
54 |
+
"eos_token": "<|endoftext|>",
|
55 |
+
"model_max_length": 1024,
|
56 |
+
"pad_token": "<|endoftext|>",
|
57 |
+
"tokenizer_class": "GPT2Tokenizer",
|
58 |
+
"unk_token": "<|endoftext|>"
|
59 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|