update v0.8 3bit model.
Browse files- config.json +30 -0
- configuration_baichuan.py +48 -0
- generation_config.json +15 -0
- gptq_model-3bit-128g.bin +3 -0
- gptq_model-4bit-128g.bin +3 -0
- quantize_config.json +11 -0
- special_tokens_map.json +24 -0
- tokenizer.model +3 -0
- tokenizer_config.json +46 -0
config.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"_name_or_path": "/home/sist/sakuraumi/code/chatgpt/BELLE/saved_models/sakura-13b-ft_1025_2epoch_baichuan2_chat_batched_3",
|
4 |
+
"architectures": [
|
5 |
+
"BaichuanForCausalLM"
|
6 |
+
],
|
7 |
+
"auto_map": {
|
8 |
+
"AutoConfig": "configuration_baichuan.BaichuanConfig",
|
9 |
+
"AutoModelForCausalLM": "baichuan-inc/Baichuan2-13B-Chat--modeling_baichuan.BaichuanForCausalLM"
|
10 |
+
},
|
11 |
+
"bos_token_id": 1,
|
12 |
+
"eos_token_id": 2,
|
13 |
+
"hidden_act": "silu",
|
14 |
+
"hidden_size": 5120,
|
15 |
+
"initializer_range": 0.02,
|
16 |
+
"intermediate_size": 13696,
|
17 |
+
"model_max_length": 4096,
|
18 |
+
"model_type": "baichuan",
|
19 |
+
"num_attention_heads": 40,
|
20 |
+
"num_hidden_layers": 40,
|
21 |
+
"pad_token_id": 0,
|
22 |
+
"rms_norm_eps": 1e-06,
|
23 |
+
"tie_word_embeddings": false,
|
24 |
+
"tokenizer_class": "BaichuanTokenizer",
|
25 |
+
"torch_dtype": "float16",
|
26 |
+
"transformers_version": "4.33.2",
|
27 |
+
"use_cache": false,
|
28 |
+
"vocab_size": 125696,
|
29 |
+
"z_loss_weight": 0
|
30 |
+
}
|
configuration_baichuan.py
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2023, Baichuan Intelligent Technology. All rights reserved.
|
2 |
+
|
3 |
+
from transformers.configuration_utils import PretrainedConfig
|
4 |
+
|
5 |
+
|
6 |
+
class BaichuanConfig(PretrainedConfig):
|
7 |
+
model_type = "baichuan"
|
8 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
9 |
+
|
10 |
+
def __init__(
|
11 |
+
self,
|
12 |
+
vocab_size=125696,
|
13 |
+
hidden_size=5120,
|
14 |
+
intermediate_size=13696,
|
15 |
+
num_hidden_layers=40,
|
16 |
+
num_attention_heads=40,
|
17 |
+
hidden_act="silu",
|
18 |
+
model_max_length=4096,
|
19 |
+
initializer_range=0.02,
|
20 |
+
rms_norm_eps=1e-6,
|
21 |
+
use_cache=True,
|
22 |
+
pad_token_id=0,
|
23 |
+
bos_token_id=1,
|
24 |
+
eos_token_id=2,
|
25 |
+
tie_word_embeddings=False,
|
26 |
+
gradient_checkpointing=False,
|
27 |
+
z_loss_weight=0,
|
28 |
+
**kwargs,
|
29 |
+
):
|
30 |
+
self.vocab_size = vocab_size
|
31 |
+
self.model_max_length = model_max_length
|
32 |
+
self.hidden_size = hidden_size
|
33 |
+
self.intermediate_size = intermediate_size
|
34 |
+
self.num_hidden_layers = num_hidden_layers
|
35 |
+
self.num_attention_heads = num_attention_heads
|
36 |
+
self.hidden_act = hidden_act
|
37 |
+
self.initializer_range = initializer_range
|
38 |
+
self.rms_norm_eps = rms_norm_eps
|
39 |
+
self.use_cache = use_cache
|
40 |
+
self.z_loss_weight = z_loss_weight
|
41 |
+
self.gradient_checkpointing = (gradient_checkpointing,)
|
42 |
+
super().__init__(
|
43 |
+
pad_token_id=pad_token_id,
|
44 |
+
bos_token_id=bos_token_id,
|
45 |
+
eos_token_id=eos_token_id,
|
46 |
+
tie_word_embeddings=tie_word_embeddings,
|
47 |
+
**kwargs,
|
48 |
+
)
|
generation_config.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"assistant_token_id": 196,
|
3 |
+
"bos_token_id": 1,
|
4 |
+
"do_sample": true,
|
5 |
+
"eos_token_id": 2,
|
6 |
+
"max_new_tokens": 1024,
|
7 |
+
"pad_token_id": 0,
|
8 |
+
"repetition_penalty": 1.0,
|
9 |
+
"temperature": 1,
|
10 |
+
"top_k": 40,
|
11 |
+
"top_p": 0.3,
|
12 |
+
"num_beams": 1,
|
13 |
+
"transformers_version": "4.33.3",
|
14 |
+
"user_token_id": 195
|
15 |
+
}
|
gptq_model-3bit-128g.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:58398428e7c962cbdf85a3430adf347a8da6e78ca098b6875de8c44d0bfda112
|
3 |
+
size 7547557411
|
gptq_model-4bit-128g.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f11ed179bf7c2d525915c3f6f831823f52debc5cd19ada26e695e47e39a07235
|
3 |
+
size 9136013235
|
quantize_config.json
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bits": 3,
|
3 |
+
"group_size": 128,
|
4 |
+
"damp_percent": 0.01,
|
5 |
+
"desc_act": false,
|
6 |
+
"static_groups": false,
|
7 |
+
"sym": true,
|
8 |
+
"true_sequential": true,
|
9 |
+
"model_name_or_path": null,
|
10 |
+
"model_file_base_name": null
|
11 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": true
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": true
|
15 |
+
},
|
16 |
+
"pad_token": "<unk>",
|
17 |
+
"unk_token": {
|
18 |
+
"content": "<unk>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": true,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": true
|
23 |
+
}
|
24 |
+
}
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:79452955be6b419a65984273a9f08af86042e1c2a75ee3ba989cbf620a133cc2
|
3 |
+
size 2001107
|
tokenizer_config.json
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"auto_map": {
|
5 |
+
"AutoTokenizer": [
|
6 |
+
"baichuan-inc/Baichuan2-13B-Chat--tokenization_baichuan.BaichuanTokenizer",
|
7 |
+
null
|
8 |
+
]
|
9 |
+
},
|
10 |
+
"bos_token": {
|
11 |
+
"__type": "AddedToken",
|
12 |
+
"content": "<s>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": true,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": true
|
17 |
+
},
|
18 |
+
"clean_up_tokenization_spaces": false,
|
19 |
+
"eos_token": {
|
20 |
+
"__type": "AddedToken",
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": true
|
26 |
+
},
|
27 |
+
"model_max_length": 4096,
|
28 |
+
"pad_token": {
|
29 |
+
"__type": "AddedToken",
|
30 |
+
"content": "<unk>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": true,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": true
|
35 |
+
},
|
36 |
+
"sp_model_kwargs": {},
|
37 |
+
"tokenizer_class": "BaichuanTokenizer",
|
38 |
+
"unk_token": {
|
39 |
+
"__type": "AddedToken",
|
40 |
+
"content": "<unk>",
|
41 |
+
"lstrip": false,
|
42 |
+
"normalized": true,
|
43 |
+
"rstrip": false,
|
44 |
+
"single_word": true
|
45 |
+
}
|
46 |
+
}
|