Aarifkhan commited on
Commit
1fae015
1 Parent(s): 04d7b93

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ model-index:
4
+ - name: HelpingAI-3B
5
+ results:
6
+ - task:
7
+ type: text-generation
8
+ name: Text Generation
9
+ dataset:
10
+ name: AI2 Reasoning Challenge (25-Shot)
11
+ type: ai2_arc
12
+ config: ARC-Challenge
13
+ split: test
14
+ args:
15
+ num_few_shot: 25
16
+ metrics:
17
+ - type: acc_norm
18
+ value: 50.6
19
+ name: normalized accuracy
20
+ source:
21
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Abhaykoul/HelpingAI-3B
22
+ name: Open LLM Leaderboard
23
+ - task:
24
+ type: text-generation
25
+ name: Text Generation
26
+ dataset:
27
+ name: HellaSwag (10-Shot)
28
+ type: hellaswag
29
+ split: validation
30
+ args:
31
+ num_few_shot: 10
32
+ metrics:
33
+ - type: acc_norm
34
+ value: 76.64
35
+ name: normalized accuracy
36
+ source:
37
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Abhaykoul/HelpingAI-3B
38
+ name: Open LLM Leaderboard
39
+ - task:
40
+ type: text-generation
41
+ name: Text Generation
42
+ dataset:
43
+ name: MMLU (5-Shot)
44
+ type: cais/mmlu
45
+ config: all
46
+ split: test
47
+ args:
48
+ num_few_shot: 5
49
+ metrics:
50
+ - type: acc
51
+ value: 46.82
52
+ name: accuracy
53
+ source:
54
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Abhaykoul/HelpingAI-3B
55
+ name: Open LLM Leaderboard
56
+ - task:
57
+ type: text-generation
58
+ name: Text Generation
59
+ dataset:
60
+ name: TruthfulQA (0-shot)
61
+ type: truthful_qa
62
+ config: multiple_choice
63
+ split: validation
64
+ args:
65
+ num_few_shot: 0
66
+ metrics:
67
+ - type: mc2
68
+ value: 55.62
69
+ source:
70
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Abhaykoul/HelpingAI-3B
71
+ name: Open LLM Leaderboard
72
+ - task:
73
+ type: text-generation
74
+ name: Text Generation
75
+ dataset:
76
+ name: Winogrande (5-shot)
77
+ type: winogrande
78
+ config: winogrande_xl
79
+ split: validation
80
+ args:
81
+ num_few_shot: 5
82
+ metrics:
83
+ - type: acc
84
+ value: 67.8
85
+ name: accuracy
86
+ source:
87
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Abhaykoul/HelpingAI-3B
88
+ name: Open LLM Leaderboard
89
+ - task:
90
+ type: text-generation
91
+ name: Text Generation
92
+ dataset:
93
+ name: GSM8k (5-shot)
94
+ type: gsm8k
95
+ config: main
96
+ split: test
97
+ args:
98
+ num_few_shot: 5
99
+ metrics:
100
+ - type: acc
101
+ value: 36.09
102
+ name: accuracy
103
+ source:
104
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Abhaykoul/HelpingAI-3B
105
+ name: Open LLM Leaderboard
106
+ ---
107
+ # HelpingAI-3B
108
+ # Subscribe to my YouTube channel
109
+ [Subscribe](https://youtube.com/@OEvortex)
110
+
111
+ GGUF version Comming soon
112
+
113
+ HelpingAI-3b is a new HelpingAI model that can assist with day todays tasks. It's trained on a diverse range of datasets
114
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
115
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_Abhaykoul__HelpingAI-3B)
116
+ | Metric |Value|
117
+ |---------------------------------|----:|
118
+ |Avg. |55.59|
119
+ |AI2 Reasoning Challenge (25-Shot)|50.60|
120
+ |HellaSwag (10-Shot) |76.64|
121
+ |MMLU (5-Shot) |46.82|
122
+ |TruthfulQA (0-shot) |55.62|
123
+ |Winogrande (5-shot) |67.80|
124
+ |GSM8k (5-shot) |36.09|
125
+
config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Abhaykoul/HelpingAI-3B",
3
+ "architectures": [
4
+ "HelpingAIForCausalLM"
5
+ ],
6
+ "auto_map": {
7
+ "AutoConfig": "configuration_HelpingAI.HelpingAIConfig",
8
+ "AutoModelForCausalLM": "modeling_HelpingAI.HelpingAIForCausalLM"
9
+ },
10
+ "attention_dropout": 0.0,
11
+ "bos_token_id": 0,
12
+ "eos_token_id": 0,
13
+ "hidden_act": "silu",
14
+ "hidden_dropout": 0.0,
15
+ "hidden_size": 2560,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 6912,
18
+ "layer_norm_eps": 1e-05,
19
+ "max_position_embeddings": 4096,
20
+ "model_type": "HelpingAI",
21
+ "num_attention_heads": 32,
22
+ "num_hidden_layers": 32,
23
+ "num_key_value_heads": 32,
24
+ "partial_rotary_factor": 0.25,
25
+ "rope_scaling": null,
26
+ "rope_theta": 10000,
27
+ "tie_word_embeddings": false,
28
+ "torch_dtype": "float16",
29
+ "transformers_version": "4.40.0.dev0",
30
+ "use_cache": false,
31
+ "use_qkv_bias": false,
32
+ "vocab_size": 50304
33
+ }
configuration_HelpingAI.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2024 The HuggingFace Inc. team. All rights reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """ HelpingAI model configuration"""
16
+
17
+ from transformers.configuration_utils import PretrainedConfig
18
+
19
+ class HelpingAIConfig(PretrainedConfig):
20
+ model_type = "HelpingAI"
21
+ def __init__(
22
+ self,
23
+ vocab_size=50304,
24
+ hidden_size=2560,
25
+ intermediate_size=6912,
26
+ num_hidden_layers=32,
27
+ num_attention_heads=32,
28
+ num_key_value_heads=32,
29
+ head_dim=256,
30
+ hidden_act="silu",
31
+ max_position_embeddings=4096,
32
+ initializer_range=0.02,
33
+ rms_norm_eps=1e-6,
34
+ use_cache=True,
35
+ hidden_activation=None,
36
+ rope_theta=10000,
37
+ attention_bias=False,
38
+ attention_dropout=0.0,
39
+ num_experts_per_tok=2,
40
+ num_local_experts=8,
41
+ router_aux_loss_coef=0.02,
42
+ output_router_logits=False,
43
+ **kwargs,
44
+ ):
45
+ self.vocab_size = vocab_size
46
+ self.max_position_embeddings = max_position_embeddings
47
+ self.hidden_size = hidden_size
48
+ self.intermediate_size = intermediate_size
49
+ self.num_hidden_layers = num_hidden_layers
50
+ self.num_attention_heads = num_attention_heads
51
+ self.head_dim = head_dim
52
+ self.hidden_act = hidden_act
53
+ self.hidden_activation = hidden_activation
54
+ self.num_key_value_heads = num_key_value_heads
55
+ self.initializer_range = initializer_range
56
+ self.rms_norm_eps = rms_norm_eps
57
+ self.use_cache = use_cache
58
+ self.rope_theta = rope_theta
59
+ self.attention_bias = attention_bias
60
+ self.attention_dropout = attention_dropout
61
+ self.num_experts_per_tok = num_experts_per_tok
62
+ self.num_local_experts = num_local_experts
63
+ self.router_aux_loss_coef = router_aux_loss_coef
64
+ self.output_router_logits = output_router_logits
65
+ super().__init__(**kwargs)
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "do_sample": true,
5
+ "eos_token_id": 50279,
6
+ "transformers_version": "4.40.0.dev0"
7
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:548fb2af7e55cd3f4fb621e426ef7f1caa33a6d0e32e3b1ca0a4b3353a90ae70
3
+ size 4980711896
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:027f22912349e2d2c1c55b06725b3f1db869e8a3ce0cd254db3fcb9f905670a1
3
+ size 610215192
model.safetensors.index.json ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 5590886400
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00002-of-00002.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00002.safetensors",
8
+ "model.layers.0.input_layernorm.bias": "model-00001-of-00002.safetensors",
9
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
10
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
11
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
12
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
13
+ "model.layers.0.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
14
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
15
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
16
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
17
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
18
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
19
+ "model.layers.1.input_layernorm.bias": "model-00001-of-00002.safetensors",
20
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
21
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
22
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
23
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
24
+ "model.layers.1.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
25
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
26
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
27
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
28
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
29
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
30
+ "model.layers.10.input_layernorm.bias": "model-00001-of-00002.safetensors",
31
+ "model.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
32
+ "model.layers.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
33
+ "model.layers.10.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
34
+ "model.layers.10.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
35
+ "model.layers.10.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
36
+ "model.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
37
+ "model.layers.10.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
38
+ "model.layers.10.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
39
+ "model.layers.10.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
40
+ "model.layers.10.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
41
+ "model.layers.11.input_layernorm.bias": "model-00001-of-00002.safetensors",
42
+ "model.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
43
+ "model.layers.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
44
+ "model.layers.11.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
45
+ "model.layers.11.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
46
+ "model.layers.11.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
47
+ "model.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
48
+ "model.layers.11.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
49
+ "model.layers.11.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
50
+ "model.layers.11.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
51
+ "model.layers.11.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
52
+ "model.layers.12.input_layernorm.bias": "model-00001-of-00002.safetensors",
53
+ "model.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
54
+ "model.layers.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
55
+ "model.layers.12.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
56
+ "model.layers.12.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
57
+ "model.layers.12.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
58
+ "model.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
59
+ "model.layers.12.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
60
+ "model.layers.12.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
61
+ "model.layers.12.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
62
+ "model.layers.12.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
63
+ "model.layers.13.input_layernorm.bias": "model-00001-of-00002.safetensors",
64
+ "model.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
65
+ "model.layers.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
66
+ "model.layers.13.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
67
+ "model.layers.13.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
68
+ "model.layers.13.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
69
+ "model.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
70
+ "model.layers.13.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
71
+ "model.layers.13.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
72
+ "model.layers.13.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
73
+ "model.layers.13.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
74
+ "model.layers.14.input_layernorm.bias": "model-00001-of-00002.safetensors",
75
+ "model.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
76
+ "model.layers.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
77
+ "model.layers.14.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
78
+ "model.layers.14.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
79
+ "model.layers.14.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
80
+ "model.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
81
+ "model.layers.14.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
82
+ "model.layers.14.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
83
+ "model.layers.14.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
84
+ "model.layers.14.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
85
+ "model.layers.15.input_layernorm.bias": "model-00001-of-00002.safetensors",
86
+ "model.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
87
+ "model.layers.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
88
+ "model.layers.15.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
89
+ "model.layers.15.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
90
+ "model.layers.15.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
91
+ "model.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
92
+ "model.layers.15.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
93
+ "model.layers.15.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
94
+ "model.layers.15.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
95
+ "model.layers.15.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
96
+ "model.layers.16.input_layernorm.bias": "model-00001-of-00002.safetensors",
97
+ "model.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
98
+ "model.layers.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
99
+ "model.layers.16.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
100
+ "model.layers.16.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
101
+ "model.layers.16.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
102
+ "model.layers.16.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
103
+ "model.layers.16.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
104
+ "model.layers.16.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
105
+ "model.layers.16.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
106
+ "model.layers.16.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
107
+ "model.layers.17.input_layernorm.bias": "model-00001-of-00002.safetensors",
108
+ "model.layers.17.input_layernorm.weight": "model-00001-of-00002.safetensors",
109
+ "model.layers.17.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
110
+ "model.layers.17.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
111
+ "model.layers.17.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
112
+ "model.layers.17.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
113
+ "model.layers.17.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
114
+ "model.layers.17.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
115
+ "model.layers.17.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
116
+ "model.layers.17.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
117
+ "model.layers.17.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
118
+ "model.layers.18.input_layernorm.bias": "model-00001-of-00002.safetensors",
119
+ "model.layers.18.input_layernorm.weight": "model-00001-of-00002.safetensors",
120
+ "model.layers.18.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
121
+ "model.layers.18.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
122
+ "model.layers.18.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
123
+ "model.layers.18.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
124
+ "model.layers.18.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
125
+ "model.layers.18.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
126
+ "model.layers.18.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
127
+ "model.layers.18.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
128
+ "model.layers.18.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
129
+ "model.layers.19.input_layernorm.bias": "model-00001-of-00002.safetensors",
130
+ "model.layers.19.input_layernorm.weight": "model-00001-of-00002.safetensors",
131
+ "model.layers.19.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
132
+ "model.layers.19.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
133
+ "model.layers.19.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
134
+ "model.layers.19.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
135
+ "model.layers.19.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
136
+ "model.layers.19.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
137
+ "model.layers.19.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
138
+ "model.layers.19.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
139
+ "model.layers.19.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
140
+ "model.layers.2.input_layernorm.bias": "model-00001-of-00002.safetensors",
141
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
142
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
143
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
144
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
145
+ "model.layers.2.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
146
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
147
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
148
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
149
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
150
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
151
+ "model.layers.20.input_layernorm.bias": "model-00001-of-00002.safetensors",
152
+ "model.layers.20.input_layernorm.weight": "model-00001-of-00002.safetensors",
153
+ "model.layers.20.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
154
+ "model.layers.20.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
155
+ "model.layers.20.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
156
+ "model.layers.20.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
157
+ "model.layers.20.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
158
+ "model.layers.20.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
159
+ "model.layers.20.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
160
+ "model.layers.20.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
161
+ "model.layers.20.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
162
+ "model.layers.21.input_layernorm.bias": "model-00001-of-00002.safetensors",
163
+ "model.layers.21.input_layernorm.weight": "model-00001-of-00002.safetensors",
164
+ "model.layers.21.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
165
+ "model.layers.21.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
166
+ "model.layers.21.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
167
+ "model.layers.21.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
168
+ "model.layers.21.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
169
+ "model.layers.21.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
170
+ "model.layers.21.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
171
+ "model.layers.21.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
172
+ "model.layers.21.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
173
+ "model.layers.22.input_layernorm.bias": "model-00001-of-00002.safetensors",
174
+ "model.layers.22.input_layernorm.weight": "model-00001-of-00002.safetensors",
175
+ "model.layers.22.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
176
+ "model.layers.22.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
177
+ "model.layers.22.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
178
+ "model.layers.22.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
179
+ "model.layers.22.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
180
+ "model.layers.22.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
181
+ "model.layers.22.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
182
+ "model.layers.22.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
183
+ "model.layers.22.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
184
+ "model.layers.23.input_layernorm.bias": "model-00001-of-00002.safetensors",
185
+ "model.layers.23.input_layernorm.weight": "model-00001-of-00002.safetensors",
186
+ "model.layers.23.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
187
+ "model.layers.23.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
188
+ "model.layers.23.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
189
+ "model.layers.23.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
190
+ "model.layers.23.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
191
+ "model.layers.23.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
192
+ "model.layers.23.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
193
+ "model.layers.23.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
194
+ "model.layers.23.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
195
+ "model.layers.24.input_layernorm.bias": "model-00001-of-00002.safetensors",
196
+ "model.layers.24.input_layernorm.weight": "model-00001-of-00002.safetensors",
197
+ "model.layers.24.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
198
+ "model.layers.24.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
199
+ "model.layers.24.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
200
+ "model.layers.24.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
201
+ "model.layers.24.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
202
+ "model.layers.24.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
203
+ "model.layers.24.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
204
+ "model.layers.24.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
205
+ "model.layers.24.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
206
+ "model.layers.25.input_layernorm.bias": "model-00001-of-00002.safetensors",
207
+ "model.layers.25.input_layernorm.weight": "model-00001-of-00002.safetensors",
208
+ "model.layers.25.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
209
+ "model.layers.25.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
210
+ "model.layers.25.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
211
+ "model.layers.25.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
212
+ "model.layers.25.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
213
+ "model.layers.25.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
214
+ "model.layers.25.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
215
+ "model.layers.25.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
216
+ "model.layers.25.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
217
+ "model.layers.26.input_layernorm.bias": "model-00001-of-00002.safetensors",
218
+ "model.layers.26.input_layernorm.weight": "model-00001-of-00002.safetensors",
219
+ "model.layers.26.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
220
+ "model.layers.26.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
221
+ "model.layers.26.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
222
+ "model.layers.26.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
223
+ "model.layers.26.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
224
+ "model.layers.26.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
225
+ "model.layers.26.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
226
+ "model.layers.26.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
227
+ "model.layers.26.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
228
+ "model.layers.27.input_layernorm.bias": "model-00001-of-00002.safetensors",
229
+ "model.layers.27.input_layernorm.weight": "model-00001-of-00002.safetensors",
230
+ "model.layers.27.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
231
+ "model.layers.27.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
232
+ "model.layers.27.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
233
+ "model.layers.27.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
234
+ "model.layers.27.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
235
+ "model.layers.27.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
236
+ "model.layers.27.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
237
+ "model.layers.27.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
238
+ "model.layers.27.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
239
+ "model.layers.28.input_layernorm.bias": "model-00001-of-00002.safetensors",
240
+ "model.layers.28.input_layernorm.weight": "model-00001-of-00002.safetensors",
241
+ "model.layers.28.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
242
+ "model.layers.28.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
243
+ "model.layers.28.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
244
+ "model.layers.28.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
245
+ "model.layers.28.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
246
+ "model.layers.28.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
247
+ "model.layers.28.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
248
+ "model.layers.28.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
249
+ "model.layers.28.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
250
+ "model.layers.29.input_layernorm.bias": "model-00002-of-00002.safetensors",
251
+ "model.layers.29.input_layernorm.weight": "model-00002-of-00002.safetensors",
252
+ "model.layers.29.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
253
+ "model.layers.29.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
254
+ "model.layers.29.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
255
+ "model.layers.29.post_attention_layernorm.bias": "model-00002-of-00002.safetensors",
256
+ "model.layers.29.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
257
+ "model.layers.29.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
258
+ "model.layers.29.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
259
+ "model.layers.29.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
260
+ "model.layers.29.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
261
+ "model.layers.3.input_layernorm.bias": "model-00001-of-00002.safetensors",
262
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
263
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
264
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
265
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
266
+ "model.layers.3.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
267
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
268
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
269
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
270
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
271
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
272
+ "model.layers.30.input_layernorm.bias": "model-00002-of-00002.safetensors",
273
+ "model.layers.30.input_layernorm.weight": "model-00002-of-00002.safetensors",
274
+ "model.layers.30.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
275
+ "model.layers.30.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
276
+ "model.layers.30.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
277
+ "model.layers.30.post_attention_layernorm.bias": "model-00002-of-00002.safetensors",
278
+ "model.layers.30.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
279
+ "model.layers.30.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
280
+ "model.layers.30.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
281
+ "model.layers.30.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
282
+ "model.layers.30.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
283
+ "model.layers.31.input_layernorm.bias": "model-00002-of-00002.safetensors",
284
+ "model.layers.31.input_layernorm.weight": "model-00002-of-00002.safetensors",
285
+ "model.layers.31.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
286
+ "model.layers.31.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
287
+ "model.layers.31.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
288
+ "model.layers.31.post_attention_layernorm.bias": "model-00002-of-00002.safetensors",
289
+ "model.layers.31.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
290
+ "model.layers.31.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
291
+ "model.layers.31.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
292
+ "model.layers.31.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
293
+ "model.layers.31.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
294
+ "model.layers.4.input_layernorm.bias": "model-00001-of-00002.safetensors",
295
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00002.safetensors",
296
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
297
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
298
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
299
+ "model.layers.4.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
300
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
301
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
302
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
303
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
304
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
305
+ "model.layers.5.input_layernorm.bias": "model-00001-of-00002.safetensors",
306
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00002.safetensors",
307
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
308
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
309
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
310
+ "model.layers.5.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
311
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
312
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
313
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
314
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
315
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
316
+ "model.layers.6.input_layernorm.bias": "model-00001-of-00002.safetensors",
317
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00002.safetensors",
318
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
319
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
320
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
321
+ "model.layers.6.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
322
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
323
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
324
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
325
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
326
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
327
+ "model.layers.7.input_layernorm.bias": "model-00001-of-00002.safetensors",
328
+ "model.layers.7.input_layernorm.weight": "model-00001-of-00002.safetensors",
329
+ "model.layers.7.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
330
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
331
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
332
+ "model.layers.7.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
333
+ "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
334
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
335
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
336
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
337
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
338
+ "model.layers.8.input_layernorm.bias": "model-00001-of-00002.safetensors",
339
+ "model.layers.8.input_layernorm.weight": "model-00001-of-00002.safetensors",
340
+ "model.layers.8.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
341
+ "model.layers.8.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
342
+ "model.layers.8.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
343
+ "model.layers.8.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
344
+ "model.layers.8.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
345
+ "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
346
+ "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
347
+ "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
348
+ "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
349
+ "model.layers.9.input_layernorm.bias": "model-00001-of-00002.safetensors",
350
+ "model.layers.9.input_layernorm.weight": "model-00001-of-00002.safetensors",
351
+ "model.layers.9.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
352
+ "model.layers.9.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
353
+ "model.layers.9.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
354
+ "model.layers.9.post_attention_layernorm.bias": "model-00001-of-00002.safetensors",
355
+ "model.layers.9.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
356
+ "model.layers.9.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
357
+ "model.layers.9.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
358
+ "model.layers.9.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
359
+ "model.layers.9.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
360
+ "model.norm.bias": "model-00002-of-00002.safetensors",
361
+ "model.norm.weight": "model-00002-of-00002.safetensors"
362
+ }
363
+ }
modeling_HelpingAI.py ADDED
@@ -0,0 +1,670 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """ HelpingAI model . """
2
+ from typing import Optional, Tuple, Union
3
+ import math
4
+
5
+ import torch
6
+ import torch.utils.checkpoint
7
+ from transformers import AutoModel, AutoModelForCausalLM
8
+ from torch import nn
9
+ from torch.nn import CrossEntropyLoss
10
+ from transformers.modeling_outputs import (
11
+ BaseModelOutputWithPast,
12
+ CausalLMOutputWithPast,
13
+ )
14
+ from transformers.modeling_utils import PreTrainedModel
15
+ from transformers.utils import logging
16
+ from .configuration_HelpingAI import HelpingAIConfig
17
+
18
+
19
+ logger = logging.get_logger(__name__)
20
+
21
+
22
+ # Copied from transformers.models.bart.modeling_bart._make_causal_mask
23
+ def _make_causal_mask(
24
+ input_ids_shape: torch.Size,
25
+ dtype: torch.dtype,
26
+ device: torch.device,
27
+ past_key_values_length: int = 0,
28
+ ):
29
+ """Make causal mask used for bi-directional self-attention."""
30
+ batch_size, tgt_len = input_ids_shape
31
+ mask = torch.full((tgt_len, tgt_len), torch.finfo(torch.float16).min, device=device)
32
+ mask_cond = torch.arange(mask.size(-1), device=device)
33
+ mask.masked_fill_(mask_cond < (mask_cond + 1).view(mask.size(-1), 1), 0)
34
+ mask = mask.to(dtype)
35
+ if past_key_values_length > 0:
36
+ mask = torch.cat([torch.zeros(tgt_len, past_key_values_length, dtype=dtype, device=device), mask], dim=-1)
37
+ return mask[None, None, :, :].expand(batch_size, 1, tgt_len, tgt_len + past_key_values_length)
38
+
39
+
40
+ # Copied from transformers.models.bart.modeling_bart._expand_mask
41
+ def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Optional[int] = None):
42
+ """Expands attention_mask from `[batch_size, seq_len]` to `[batch_size, 1, tgt_seq_len, src_seq_len]`."""
43
+ batch_size, src_len = mask.size()
44
+ tgt_len = tgt_len if tgt_len is not None else src_len
45
+
46
+ expanded_mask = mask[:, None, None, :].expand(batch_size, 1, tgt_len, src_len).to(dtype)
47
+ inverted_mask = 1.0 - expanded_mask
48
+
49
+ return inverted_mask.masked_fill(
50
+ inverted_mask.to(torch.bool), torch.finfo(dtype).min
51
+ )
52
+
53
+
54
+ class RotaryEmbedding(nn.Module):
55
+ def __init__(
56
+ self,
57
+ dim: int,
58
+ max_position_embeddings: int,
59
+ base: int = 10_000,
60
+ device: Optional[torch.device] = None,
61
+ ):
62
+ super().__init__()
63
+
64
+ self.dim = dim
65
+ self.max_position_embeddings = max_position_embeddings
66
+ self.base = base
67
+ inv_freq = 1.0 / (self.base ** (torch.arange(0, self.dim, 2, device=device, dtype=torch.float32) / self.dim))
68
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
69
+
70
+ # Build here to make `torch.jit.trace` work.
71
+ self._set_cos_sin_cache(
72
+ seq_len=max_position_embeddings, device=self.inv_freq.device, dtype=torch.get_default_dtype(),
73
+ )
74
+
75
+ def _set_cos_sin_cache(self, seq_len: int, device: torch.device, dtype: torch.dtype):
76
+ self.max_seq_len_cached = seq_len
77
+ t = torch.arange(self.max_seq_len_cached, device=device, dtype=torch.float32)
78
+
79
+ # Don't do einsum, it converts fp32 to fp16 under AMP
80
+ # freqs = torch.einsum("i,j->ij", t, self.inv_freq)
81
+ freqs = torch.outer(t, self.inv_freq)
82
+ # Different from paper, but it uses a different permutation in order to obtain the same calculation
83
+ emb = torch.cat((freqs, freqs), dim=-1)
84
+ self.register_buffer("cos_cached", emb.cos()[None, None, :, :].to(dtype), persistent=False)
85
+ self.register_buffer("sin_cached", emb.sin()[None, None, :, :].to(dtype), persistent=False)
86
+
87
+ def forward(self, x: torch.Tensor, seq_len: Optional[int] = None):
88
+ # x: [batch_size, num_heads, seq_len, head_size]
89
+ if seq_len > self.max_seq_len_cached:
90
+ self._set_cos_sin_cache(seq_len=seq_len, device=x.device, dtype=torch.get_default_dtype())
91
+ return (
92
+ self.cos_cached[:, :, :seq_len, ...].to(dtype=x.dtype),
93
+ self.sin_cached[:, :, :seq_len, ...].to(dtype=x.dtype),
94
+ )
95
+
96
+
97
+ def rotate_half(x: torch.Tensor):
98
+ """Rotates half the hidden dims of the input."""
99
+ x1, x2 = torch.chunk(x, 2, dim=-1)
100
+ return torch.cat((-x2, x1), dim=-1)
101
+
102
+
103
+ def apply_rotary_pos_emb(q, k, cos, sin, position_ids):
104
+ # The first two dimensions of cos and sin are always 1, so we can `squeeze` them.
105
+ cos = cos.squeeze(1).squeeze(0) # [seq_len, dim]
106
+ sin = sin.squeeze(1).squeeze(0) # [seq_len, dim]
107
+ cos = cos[position_ids].unsqueeze(1) # [batch_size, 1, seq_len, dim]
108
+ sin = sin[position_ids].unsqueeze(1) # [batch_size, 1, seq_len, dim]
109
+ q_embed = (q * cos) + (rotate_half(q) * sin)
110
+ k_embed = (k * cos) + (rotate_half(k) * sin)
111
+ return q_embed, k_embed
112
+
113
+
114
+ class MLP(nn.Module):
115
+ def __init__(self, config: HelpingAIConfig):
116
+ super().__init__()
117
+ self.config = config
118
+ self.hidden_size = config.hidden_size
119
+ self.intermediate_size = config.intermediate_size
120
+ self.gate_proj = nn.Linear(config.hidden_size, config.intermediate_size, bias=False)
121
+ self.up_proj = nn.Linear(config.hidden_size, config.intermediate_size, bias=False)
122
+ self.down_proj = nn.Linear(config.intermediate_size, config.hidden_size, bias=False)
123
+ self.act_fn = nn.SiLU()
124
+
125
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
126
+ return self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
127
+
128
+
129
+ def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
130
+ """
131
+ This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch,
132
+ num_key_value_heads, seqlen, head_dim) to (batch, num_attention_heads, seqlen, head_dim)
133
+ """
134
+ batch, num_key_value_heads, slen, head_dim = hidden_states.shape
135
+ if n_rep == 1:
136
+ return hidden_states
137
+ hidden_states = hidden_states[:, :, None, :, :].expand(batch, num_key_value_heads, n_rep, slen, head_dim)
138
+ return hidden_states.reshape(batch, num_key_value_heads * n_rep, slen, head_dim)
139
+
140
+
141
+ class Attention(nn.Module):
142
+ def __init__(self, config: HelpingAIConfig):
143
+ super().__init__()
144
+ self.config = config
145
+ self.hidden_size = config.hidden_size
146
+ self.num_heads = config.num_attention_heads
147
+ self.head_dim = self.hidden_size // self.num_heads
148
+ self.num_key_value_heads = config.num_key_value_heads
149
+ self.num_key_value_groups = self.num_heads // self.num_key_value_heads
150
+ self.max_position_embeddings = config.max_position_embeddings
151
+
152
+ if (self.head_dim * self.num_heads) != self.hidden_size:
153
+ raise ValueError(
154
+ f"hidden_size must be divisible by num_heads (got `hidden_size`: {self.hidden_size}"
155
+ f" and `num_heads`: {self.num_heads})."
156
+ )
157
+ self.q_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=False)
158
+ self.k_proj = nn.Linear(self.hidden_size, self.num_key_value_heads * self.head_dim, bias=False)
159
+ self.v_proj = nn.Linear(self.hidden_size, self.num_key_value_heads * self.head_dim, bias=False)
160
+ self.o_proj = nn.Linear(self.hidden_size, self.hidden_size, bias=False)
161
+
162
+ self._init_rope()
163
+
164
+ def _init_rope(self):
165
+ self.rotary_ndims = int(self.head_dim * self.config.rope_pct)
166
+ self.rotary_emb = RotaryEmbedding(
167
+ self.rotary_ndims,
168
+ max_position_embeddings=self.config.max_position_embeddings,
169
+ base=self.config.rope_theta,
170
+ )
171
+
172
+ def forward(
173
+ self,
174
+ hidden_states: torch.FloatTensor,
175
+ attention_mask: torch.FloatTensor,
176
+ position_ids: torch.LongTensor,
177
+ past_key_value: Optional[Tuple[torch.Tensor]] = None,
178
+ output_attentions: Optional[bool] = False,
179
+ use_cache: Optional[bool] = False,
180
+ ) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
181
+ bsz, q_len, _ = hidden_states.size()
182
+
183
+ query_states = self.q_proj(hidden_states)
184
+ key_states = self.k_proj(hidden_states)
185
+ value_states = self.v_proj(hidden_states)
186
+
187
+ query_states = query_states.view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
188
+ key_states = key_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
189
+ value_states = value_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
190
+
191
+ query_rot = query_states[..., : self.rotary_ndims]
192
+ query_pass = query_states[..., self.rotary_ndims :]
193
+ key_rot = key_states[..., : self.rotary_ndims]
194
+ key_pass = key_states[..., self.rotary_ndims :]
195
+
196
+ kv_seq_len = key_states.shape[-2]
197
+ if past_key_value is not None:
198
+ kv_seq_len += past_key_value[0].shape[-2]
199
+ cos, sin = self.rotary_emb(value_states, seq_len=kv_seq_len)
200
+ query_states, key_states = apply_rotary_pos_emb(query_rot, key_rot, cos, sin, position_ids)
201
+
202
+ # [batch_size, num_heads, seq_len, head_dim]
203
+ query_states = torch.cat((query_states, query_pass), dim=-1)
204
+ key_states = torch.cat((key_states, key_pass), dim=-1)
205
+
206
+ if past_key_value is not None:
207
+ # Reuse k, v, self_attention
208
+ key_states = torch.cat((past_key_value[0], key_states), dim=2)
209
+ value_states = torch.cat((past_key_value[1], value_states), dim=2)
210
+
211
+ past_key_value = (key_states, value_states) if use_cache else None
212
+
213
+ # Repeat k/v heads if n_kv_heads < n_heads
214
+ key_states = repeat_kv(key_states, self.num_key_value_groups)
215
+ value_states = repeat_kv(value_states, self.num_key_value_groups)
216
+
217
+ attn_weights = torch.matmul(query_states, key_states.transpose(2, 3)) / math.sqrt(self.head_dim)
218
+
219
+ if attn_weights.size() != (bsz, self.num_heads, q_len, kv_seq_len):
220
+ raise ValueError(
221
+ f"Attention weights should be of size {(bsz, self.num_heads, q_len, kv_seq_len)}, but is"
222
+ f" {attn_weights.size()}"
223
+ )
224
+
225
+ if attention_mask is not None:
226
+ if attention_mask.size() != (bsz, 1, q_len, kv_seq_len):
227
+ raise ValueError(
228
+ f"Attention mask should be of size {(bsz, 1, q_len, kv_seq_len)}, but is {attention_mask.size()}"
229
+ )
230
+ attn_weights = attn_weights + attention_mask
231
+
232
+ # Upcast attention to fp32
233
+ attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query_states.dtype)
234
+ attn_output = torch.matmul(attn_weights, value_states)
235
+
236
+ if attn_output.size() != (bsz, self.num_heads, q_len, self.head_dim):
237
+ raise ValueError(
238
+ f"`attn_output` should be of size {(bsz, self.num_heads, q_len, self.head_dim)}, but is"
239
+ f" {attn_output.size()}"
240
+ )
241
+
242
+ # Merge heads
243
+ attn_output = attn_output.transpose(1, 2).contiguous()
244
+ attn_output = attn_output.reshape(bsz, q_len, self.hidden_size)
245
+
246
+ # Final linear projection
247
+ attn_output = self.o_proj(attn_output)
248
+
249
+ if not output_attentions:
250
+ attn_weights = None
251
+
252
+ return attn_output, attn_weights, past_key_value
253
+
254
+
255
+ class DecoderLayer(nn.Module):
256
+ def __init__(self, config: HelpingAIConfig):
257
+ super().__init__()
258
+ self.self_attn = Attention(config)
259
+ self.mlp = MLP(config)
260
+ self.input_layernorm = nn.LayerNorm(config.hidden_size, eps=config.norm_eps)
261
+ self.post_attention_layernorm = nn.LayerNorm(config.hidden_size, eps=config.norm_eps)
262
+
263
+ def forward(
264
+ self,
265
+ hidden_states: Optional[torch.FloatTensor],
266
+ attention_mask: Optional[torch.FloatTensor] = None,
267
+ position_ids: Optional[torch.LongTensor] = None,
268
+ past_key_value: Optional[Tuple[torch.Tensor]] = None,
269
+ output_attentions: Optional[bool] = False,
270
+ use_cache: Optional[bool] = False,
271
+ ) -> Union[Tuple[torch.Tensor], Optional[Tuple[torch.Tensor, Tuple[torch.FloatTensor, ...]]]]:
272
+ residual = hidden_states
273
+
274
+ hidden_states = self.input_layernorm(hidden_states)
275
+
276
+ # Self Attention
277
+ hidden_states, self_attn_weights, present_key_value = self.self_attn(
278
+ hidden_states=hidden_states,
279
+ attention_mask=attention_mask,
280
+ position_ids=position_ids,
281
+ past_key_value=past_key_value,
282
+ output_attentions=output_attentions,
283
+ use_cache=use_cache,
284
+ )
285
+ hidden_states = residual + hidden_states
286
+
287
+ # Fully Connected
288
+ residual = hidden_states
289
+ hidden_states = self.post_attention_layernorm(hidden_states)
290
+ hidden_states = self.mlp(hidden_states)
291
+ hidden_states = residual + hidden_states
292
+
293
+ outputs = (hidden_states,)
294
+
295
+ if output_attentions:
296
+ outputs += (self_attn_weights,)
297
+
298
+ if use_cache:
299
+ outputs += (present_key_value,)
300
+
301
+ return outputs
302
+
303
+
304
+ class HelpingAIPreTrainedModel(PreTrainedModel):
305
+ """An abstract class to handle weights initialization and a simple interface
306
+ for downloading and loading pretrained models.
307
+ """
308
+
309
+ config_class = HelpingAIConfig
310
+ base_model_prefix = "transformer"
311
+ supports_gradient_checkpointing = True
312
+ _no_split_modules = ["DecoderLayer"]
313
+ _skip_keys_device_placement = "past_key_values"
314
+
315
+ def _init_weights(self, module: nn.Module):
316
+ """Initialize the weights"""
317
+ if isinstance(module, nn.Linear):
318
+ module.weight.data.normal_(mean=0.0, std=self.config.initializer_range)
319
+ if module.bias is not None:
320
+ module.bias.data.zero_()
321
+ elif isinstance(module, nn.Embedding):
322
+ module.weight.data.normal_(mean=0.0, std=self.config.initializer_range)
323
+ if module.padding_idx is not None:
324
+ module.weight.data[module.padding_idx].zero_()
325
+ elif isinstance(module, nn.LayerNorm):
326
+ module.bias.data.zero_()
327
+ module.weight.data.fill_(1.0)
328
+
329
+ def _set_gradient_checkpointing(self, module: nn.Module, value=False):
330
+ if isinstance(module, HelpingAIModel):
331
+ module.gradient_checkpointing = value
332
+
333
+
334
+ class HelpingAIModel(HelpingAIPreTrainedModel):
335
+ def __init__(self, config: HelpingAIConfig):
336
+ super().__init__(config)
337
+ self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, config.pad_token_id)
338
+ self.layers = nn.ModuleList([DecoderLayer(config) for _ in range(config.num_hidden_layers)])
339
+ self.norm = nn.LayerNorm(config.hidden_size, eps=config.norm_eps)
340
+
341
+ self.gradient_checkpointing = False
342
+ # Initialize weights and apply final processing
343
+ self.post_init()
344
+
345
+ def get_input_embeddings(self):
346
+ return self.embed_tokens
347
+
348
+ def set_input_embeddings(self, value: nn.Module):
349
+ self.embed_tokens = value
350
+
351
+ # Copied from transformers.models.bart.modeling_bart.BartDecoder._prepare_decoder_attention_mask
352
+ def _prepare_decoder_attention_mask(
353
+ self,
354
+ attention_mask: torch.Tensor,
355
+ input_shape: torch.Size,
356
+ inputs_embeds: torch.Tensor,
357
+ past_key_values_length: int,
358
+ ):
359
+ # Create causal mask
360
+ # [batch_size, seq_len] -> [batch_size, 1, tgt_seq_len, src_seq_len]
361
+ combined_attention_mask = None
362
+ if input_shape[-1] > 1:
363
+ combined_attention_mask = _make_causal_mask(
364
+ input_shape,
365
+ inputs_embeds.dtype,
366
+ device=inputs_embeds.device,
367
+ past_key_values_length=past_key_values_length,
368
+ )
369
+
370
+ if attention_mask is not None:
371
+ # [batch_size, seq_len] -> [batch_size, 1, tgt_seq_len, src_seq_len]
372
+ expanded_attn_mask = _expand_mask(
373
+ attention_mask, inputs_embeds.dtype, tgt_len=input_shape[-1]
374
+ ).to(inputs_embeds.device)
375
+ combined_attention_mask = expanded_attn_mask if combined_attention_mask is None else expanded_attn_mask + combined_attention_mask
376
+
377
+ return combined_attention_mask
378
+
379
+ def forward(
380
+ self,
381
+ input_ids: Optional[torch.LongTensor] = None,
382
+ attention_mask: Optional[torch.FloatTensor] = None,
383
+ position_ids: Optional[torch.LongTensor] = None,
384
+ past_key_values: Optional[Tuple[Tuple[torch.FloatTensor]]] = None,
385
+ inputs_embeds: Optional[torch.FloatTensor] = None,
386
+ use_cache: Optional[bool] = None,
387
+ output_attentions: Optional[bool] = None,
388
+ output_hidden_states: Optional[bool] = None,
389
+ return_dict: Optional[bool] = None,
390
+ ) -> Union[Tuple, BaseModelOutputWithPast]:
391
+ output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
392
+ output_hidden_states = output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
393
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
394
+
395
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
396
+
397
+ # Retrieve input_ids and inputs_embeds
398
+ if input_ids is not None and inputs_embeds is not None:
399
+ raise ValueError(
400
+ "You cannot specify both decoder_input_ids and decoder_inputs_embeds at the same time"
401
+ )
402
+ elif input_ids is not None:
403
+ batch_size, seq_length = input_ids.shape
404
+ elif inputs_embeds is not None:
405
+ batch_size, seq_length, _ = inputs_embeds.shape
406
+ else:
407
+ raise ValueError(
408
+ "You have to specify either decoder_input_ids or decoder_inputs_embeds"
409
+ )
410
+
411
+ seq_length_with_past = seq_length
412
+ past_key_values_length = 0
413
+
414
+ if past_key_values is not None:
415
+ past_key_values_length = past_key_values[0][0].shape[2]
416
+ seq_length_with_past = seq_length_with_past + past_key_values_length
417
+
418
+ if position_ids is None:
419
+ device = input_ids.device if input_ids is not None else inputs_embeds.device
420
+ position_ids = torch.arange(
421
+ past_key_values_length,
422
+ seq_length + past_key_values_length,
423
+ dtype=torch.long,
424
+ device=device,
425
+ )
426
+ position_ids = position_ids.unsqueeze(0).view(-1, seq_length)
427
+ else:
428
+ position_ids = position_ids.view(-1, seq_length).long()
429
+
430
+ if inputs_embeds is None:
431
+ inputs_embeds = self.embed_tokens(input_ids)
432
+ # Embed positions
433
+ if attention_mask is None:
434
+ attention_mask = torch.ones(
435
+ (batch_size, seq_length_with_past),
436
+ dtype=torch.bool,
437
+ device=inputs_embeds.device,
438
+ )
439
+ attention_mask = self._prepare_decoder_attention_mask(
440
+ attention_mask,
441
+ (batch_size, seq_length),
442
+ inputs_embeds,
443
+ past_key_values_length,
444
+ )
445
+
446
+ hidden_states = inputs_embeds
447
+
448
+ if self.gradient_checkpointing and self.training:
449
+ if use_cache:
450
+ logger.warning(
451
+ "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`..."
452
+ )
453
+ use_cache = False
454
+
455
+ # Decoder layers
456
+ all_hidden_states = () if output_hidden_states else None
457
+ all_self_attns = () if output_attentions else None
458
+ next_decoder_cache = () if use_cache else None
459
+
460
+ for idx, decoder_layer in enumerate(self.layers):
461
+ if output_hidden_states:
462
+ all_hidden_states += (hidden_states,)
463
+
464
+ past_key_value = (
465
+ past_key_values[idx] if past_key_values is not None else None
466
+ )
467
+
468
+ if self.gradient_checkpointing and self.training:
469
+
470
+ def create_custom_forward(module):
471
+ def custom_forward(*inputs):
472
+ # None for past_key_value
473
+ return module(*inputs, past_key_value, output_attentions)
474
+
475
+ return custom_forward
476
+
477
+ layer_outputs = torch.utils.checkpoint.checkpoint(
478
+ create_custom_forward(decoder_layer),
479
+ hidden_states,
480
+ attention_mask,
481
+ position_ids,
482
+ )
483
+ else:
484
+ layer_outputs = decoder_layer(
485
+ hidden_states,
486
+ attention_mask=attention_mask,
487
+ position_ids=position_ids,
488
+ past_key_value=past_key_value,
489
+ output_attentions=output_attentions,
490
+ use_cache=use_cache,
491
+ )
492
+
493
+ hidden_states = layer_outputs[0]
494
+
495
+ if use_cache:
496
+ next_decoder_cache += (layer_outputs[2 if output_attentions else 1],)
497
+
498
+ if output_attentions:
499
+ all_self_attns += (layer_outputs[1],)
500
+
501
+ hidden_states = self.norm(hidden_states)
502
+
503
+ # Add hidden states from the last decoder layer
504
+ if output_hidden_states:
505
+ all_hidden_states += (hidden_states,)
506
+
507
+ next_cache = next_decoder_cache if use_cache else None
508
+ if not return_dict:
509
+ return tuple(
510
+ v
511
+ for v in [hidden_states, next_cache, all_hidden_states, all_self_attns]
512
+ if v is not None
513
+ )
514
+ return BaseModelOutputWithPast(
515
+ last_hidden_state=hidden_states,
516
+ past_key_values=next_cache,
517
+ hidden_states=all_hidden_states,
518
+ attentions=all_self_attns,
519
+ )
520
+
521
+
522
+ class HelpingAIForCausalLM(HelpingAIPreTrainedModel):
523
+ _tied_weights_keys = ["lm_head.weight"]
524
+
525
+ def __init__(self, config: HelpingAIConfig):
526
+ super().__init__(config)
527
+
528
+ self.model = HelpingAIModel(config)
529
+ self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
530
+
531
+ # Initialize weights and apply final processing
532
+ self.post_init()
533
+
534
+ def get_input_embeddings(self):
535
+ return self.model.embed_tokens
536
+
537
+ def set_input_embeddings(self, value):
538
+ self.model.embed_tokens = value
539
+
540
+ def get_output_embeddings(self):
541
+ return self.lm_head
542
+
543
+ def set_output_embeddings(self, new_embeddings: nn.Module):
544
+ self.lm_head = new_embeddings
545
+
546
+ def get_decoder(self):
547
+ return self.transformer
548
+
549
+ def set_decoder(self, decoder):
550
+ self.transformer = decoder
551
+
552
+ def forward(
553
+ self,
554
+ input_ids: Optional[torch.LongTensor] = None,
555
+ attention_mask: Optional[torch.FloatTensor] = None,
556
+ position_ids: Optional[torch.LongTensor] = None,
557
+ past_key_values: Optional[Tuple[Tuple[torch.FloatTensor]]] = None,
558
+ inputs_embeds: Optional[torch.FloatTensor] = None,
559
+ labels: Optional[torch.LongTensor] = None,
560
+ use_cache: Optional[bool] = None,
561
+ output_attentions: Optional[bool] = None,
562
+ output_hidden_states: Optional[bool] = None,
563
+ return_dict: Optional[bool] = None,
564
+ ) -> Union[Tuple, CausalLMOutputWithPast]:
565
+ output_attentions = (
566
+ output_attentions
567
+ if output_attentions is not None
568
+ else self.config.output_attentions
569
+ )
570
+ output_hidden_states = (
571
+ output_hidden_states
572
+ if output_hidden_states is not None
573
+ else self.config.output_hidden_states
574
+ )
575
+ return_dict = (
576
+ return_dict if return_dict is not None else self.config.use_return_dict
577
+ )
578
+
579
+ # decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
580
+ outputs = self.model(
581
+ input_ids,
582
+ attention_mask=attention_mask,
583
+ position_ids=position_ids,
584
+ past_key_values=past_key_values,
585
+ inputs_embeds=inputs_embeds,
586
+ use_cache=use_cache,
587
+ output_attentions=output_attentions,
588
+ output_hidden_states=output_hidden_states,
589
+ return_dict=return_dict,
590
+ )
591
+
592
+ hidden_states = outputs[0]
593
+ logits = self.lm_head(hidden_states).float()
594
+
595
+ loss = None
596
+ if labels is not None:
597
+ # Shift so that tokens < n predict n
598
+ shift_logits = logits[..., :-1, :].contiguous()
599
+ shift_labels = labels[..., 1:].contiguous()
600
+ # Flatten the tokens
601
+ loss_fct = CrossEntropyLoss()
602
+ shift_logits = shift_logits.view(-1, self.config.vocab_size)
603
+ shift_labels = shift_labels.view(-1)
604
+ # Enable model parallelism
605
+ shift_labels = shift_labels.to(shift_logits.device)
606
+ loss = loss_fct(shift_logits, shift_labels)
607
+
608
+ if not return_dict:
609
+ output = (logits,) + outputs[1:]
610
+ return (loss,) + output if loss is not None else output
611
+
612
+ return CausalLMOutputWithPast(
613
+ loss=loss,
614
+ logits=logits,
615
+ past_key_values=outputs.past_key_values,
616
+ hidden_states=outputs.hidden_states,
617
+ attentions=outputs.attentions,
618
+ )
619
+
620
+ def prepare_inputs_for_generation(
621
+ self,
622
+ input_ids,
623
+ past_key_values: Optional[torch.Tensor] = None,
624
+ attention_mask: Optional[torch.Tensor] = None,
625
+ inputs_embeds: Optional[torch.Tensor] = None,
626
+ **kwargs,
627
+ ):
628
+ # Trim decoder_input_ids if past is used
629
+ if past_key_values and past_key_values[0] is not None:
630
+ input_ids = input_ids[:, -1:]
631
+
632
+ position_ids = kwargs.get("position_ids", None)
633
+ if attention_mask is not None and position_ids is None:
634
+ # Create position_ids on the fly for batch generation
635
+ position_ids = attention_mask.long().cumsum(-1) - 1
636
+ position_ids.masked_fill_(attention_mask == 0, 1)
637
+ if past_key_values:
638
+ position_ids = position_ids[:, -1].unsqueeze(-1)
639
+
640
+ # If `inputs_embeds` are passed, we only want to use them in the 1st generation step
641
+ if inputs_embeds is not None and past_key_values is None:
642
+ model_inputs = {"inputs_embeds": inputs_embeds}
643
+ else:
644
+ model_inputs = {"input_ids": input_ids}
645
+
646
+ model_inputs.update(
647
+ {
648
+ "attention_mask": attention_mask,
649
+ "past_key_values": past_key_values,
650
+ "use_cache": kwargs.get("use_cache"),
651
+ "position_ids": position_ids,
652
+ }
653
+ )
654
+ return model_inputs
655
+
656
+ @staticmethod
657
+ def _reorder_cache(past_key_values, beam_idx):
658
+ reordered_past = ()
659
+ for layer_past in past_key_values:
660
+ reordered_past += (
661
+ tuple(
662
+ past_state.index_select(0, beam_idx.to(past_state.device))
663
+ for past_state in layer_past
664
+ ),
665
+ )
666
+ return reordered_past
667
+
668
+
669
+ HelpingAIConfig.register_for_auto_class()
670
+ HelpingAIForCausalLM.register_for_auto_class("AutoModelForCausalLM")
pytorch_model-00001-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:361d6c21db6b96e9b5d58cd4f94cf7bb27d0d07adf920acdd4a1482492aeaf8f
3
+ size 4980790208
pytorch_model-00002-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f887f588172383b8e1409cc486c5263dad4b5e20499f0feed2a2f3e6c1520aad
3
+ size 610222598
pytorch_model.bin.index.json ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 5590886400
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "pytorch_model-00002-of-00002.bin",
7
+ "model.embed_tokens.weight": "pytorch_model-00001-of-00002.bin",
8
+ "model.layers.0.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
9
+ "model.layers.0.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
10
+ "model.layers.0.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
11
+ "model.layers.0.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
12
+ "model.layers.0.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
13
+ "model.layers.0.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
14
+ "model.layers.0.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
15
+ "model.layers.0.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
16
+ "model.layers.0.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
17
+ "model.layers.0.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
18
+ "model.layers.0.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
19
+ "model.layers.1.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
20
+ "model.layers.1.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
21
+ "model.layers.1.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
22
+ "model.layers.1.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
23
+ "model.layers.1.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
24
+ "model.layers.1.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
25
+ "model.layers.1.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
26
+ "model.layers.1.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
27
+ "model.layers.1.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
28
+ "model.layers.1.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
29
+ "model.layers.1.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
30
+ "model.layers.10.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
31
+ "model.layers.10.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
32
+ "model.layers.10.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
33
+ "model.layers.10.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
34
+ "model.layers.10.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
35
+ "model.layers.10.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
36
+ "model.layers.10.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
37
+ "model.layers.10.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
38
+ "model.layers.10.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
39
+ "model.layers.10.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
40
+ "model.layers.10.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
41
+ "model.layers.11.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
42
+ "model.layers.11.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
43
+ "model.layers.11.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
44
+ "model.layers.11.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
45
+ "model.layers.11.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
46
+ "model.layers.11.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
47
+ "model.layers.11.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
48
+ "model.layers.11.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
49
+ "model.layers.11.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
50
+ "model.layers.11.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
51
+ "model.layers.11.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
52
+ "model.layers.12.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
53
+ "model.layers.12.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
54
+ "model.layers.12.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
55
+ "model.layers.12.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
56
+ "model.layers.12.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
57
+ "model.layers.12.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
58
+ "model.layers.12.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
59
+ "model.layers.12.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
60
+ "model.layers.12.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
61
+ "model.layers.12.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
62
+ "model.layers.12.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
63
+ "model.layers.13.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
64
+ "model.layers.13.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
65
+ "model.layers.13.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
66
+ "model.layers.13.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
67
+ "model.layers.13.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
68
+ "model.layers.13.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
69
+ "model.layers.13.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
70
+ "model.layers.13.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
71
+ "model.layers.13.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
72
+ "model.layers.13.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
73
+ "model.layers.13.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
74
+ "model.layers.14.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
75
+ "model.layers.14.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
76
+ "model.layers.14.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
77
+ "model.layers.14.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
78
+ "model.layers.14.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
79
+ "model.layers.14.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
80
+ "model.layers.14.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
81
+ "model.layers.14.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
82
+ "model.layers.14.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
83
+ "model.layers.14.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
84
+ "model.layers.14.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
85
+ "model.layers.15.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
86
+ "model.layers.15.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
87
+ "model.layers.15.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
88
+ "model.layers.15.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
89
+ "model.layers.15.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
90
+ "model.layers.15.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
91
+ "model.layers.15.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
92
+ "model.layers.15.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
93
+ "model.layers.15.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
94
+ "model.layers.15.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
95
+ "model.layers.15.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
96
+ "model.layers.16.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
97
+ "model.layers.16.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
98
+ "model.layers.16.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
99
+ "model.layers.16.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
100
+ "model.layers.16.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
101
+ "model.layers.16.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
102
+ "model.layers.16.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
103
+ "model.layers.16.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
104
+ "model.layers.16.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
105
+ "model.layers.16.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
106
+ "model.layers.16.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
107
+ "model.layers.17.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
108
+ "model.layers.17.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
109
+ "model.layers.17.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
110
+ "model.layers.17.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
111
+ "model.layers.17.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
112
+ "model.layers.17.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
113
+ "model.layers.17.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
114
+ "model.layers.17.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
115
+ "model.layers.17.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
116
+ "model.layers.17.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
117
+ "model.layers.17.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
118
+ "model.layers.18.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
119
+ "model.layers.18.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
120
+ "model.layers.18.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
121
+ "model.layers.18.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
122
+ "model.layers.18.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
123
+ "model.layers.18.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
124
+ "model.layers.18.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
125
+ "model.layers.18.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
126
+ "model.layers.18.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
127
+ "model.layers.18.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
128
+ "model.layers.18.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
129
+ "model.layers.19.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
130
+ "model.layers.19.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
131
+ "model.layers.19.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
132
+ "model.layers.19.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
133
+ "model.layers.19.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
134
+ "model.layers.19.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
135
+ "model.layers.19.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
136
+ "model.layers.19.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
137
+ "model.layers.19.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
138
+ "model.layers.19.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
139
+ "model.layers.19.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
140
+ "model.layers.2.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
141
+ "model.layers.2.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
142
+ "model.layers.2.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
143
+ "model.layers.2.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
144
+ "model.layers.2.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
145
+ "model.layers.2.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
146
+ "model.layers.2.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
147
+ "model.layers.2.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
148
+ "model.layers.2.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
149
+ "model.layers.2.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
150
+ "model.layers.2.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
151
+ "model.layers.20.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
152
+ "model.layers.20.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
153
+ "model.layers.20.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
154
+ "model.layers.20.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
155
+ "model.layers.20.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
156
+ "model.layers.20.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
157
+ "model.layers.20.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
158
+ "model.layers.20.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
159
+ "model.layers.20.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
160
+ "model.layers.20.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
161
+ "model.layers.20.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
162
+ "model.layers.21.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
163
+ "model.layers.21.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
164
+ "model.layers.21.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
165
+ "model.layers.21.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
166
+ "model.layers.21.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
167
+ "model.layers.21.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
168
+ "model.layers.21.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
169
+ "model.layers.21.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
170
+ "model.layers.21.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
171
+ "model.layers.21.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
172
+ "model.layers.21.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
173
+ "model.layers.22.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
174
+ "model.layers.22.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
175
+ "model.layers.22.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
176
+ "model.layers.22.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
177
+ "model.layers.22.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
178
+ "model.layers.22.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
179
+ "model.layers.22.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
180
+ "model.layers.22.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
181
+ "model.layers.22.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
182
+ "model.layers.22.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
183
+ "model.layers.22.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
184
+ "model.layers.23.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
185
+ "model.layers.23.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
186
+ "model.layers.23.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
187
+ "model.layers.23.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
188
+ "model.layers.23.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
189
+ "model.layers.23.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
190
+ "model.layers.23.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
191
+ "model.layers.23.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
192
+ "model.layers.23.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
193
+ "model.layers.23.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
194
+ "model.layers.23.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
195
+ "model.layers.24.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
196
+ "model.layers.24.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
197
+ "model.layers.24.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
198
+ "model.layers.24.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
199
+ "model.layers.24.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
200
+ "model.layers.24.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
201
+ "model.layers.24.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
202
+ "model.layers.24.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
203
+ "model.layers.24.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
204
+ "model.layers.24.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
205
+ "model.layers.24.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
206
+ "model.layers.25.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
207
+ "model.layers.25.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
208
+ "model.layers.25.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
209
+ "model.layers.25.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
210
+ "model.layers.25.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
211
+ "model.layers.25.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
212
+ "model.layers.25.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
213
+ "model.layers.25.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
214
+ "model.layers.25.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
215
+ "model.layers.25.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
216
+ "model.layers.25.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
217
+ "model.layers.26.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
218
+ "model.layers.26.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
219
+ "model.layers.26.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
220
+ "model.layers.26.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
221
+ "model.layers.26.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
222
+ "model.layers.26.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
223
+ "model.layers.26.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
224
+ "model.layers.26.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
225
+ "model.layers.26.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
226
+ "model.layers.26.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
227
+ "model.layers.26.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
228
+ "model.layers.27.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
229
+ "model.layers.27.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
230
+ "model.layers.27.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
231
+ "model.layers.27.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
232
+ "model.layers.27.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
233
+ "model.layers.27.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
234
+ "model.layers.27.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
235
+ "model.layers.27.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
236
+ "model.layers.27.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
237
+ "model.layers.27.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
238
+ "model.layers.27.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
239
+ "model.layers.28.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
240
+ "model.layers.28.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
241
+ "model.layers.28.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
242
+ "model.layers.28.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
243
+ "model.layers.28.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
244
+ "model.layers.28.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
245
+ "model.layers.28.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
246
+ "model.layers.28.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
247
+ "model.layers.28.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
248
+ "model.layers.28.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
249
+ "model.layers.28.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
250
+ "model.layers.29.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
251
+ "model.layers.29.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
252
+ "model.layers.29.mlp.down_proj.weight": "pytorch_model-00002-of-00002.bin",
253
+ "model.layers.29.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
254
+ "model.layers.29.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
255
+ "model.layers.29.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
256
+ "model.layers.29.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
257
+ "model.layers.29.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
258
+ "model.layers.29.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
259
+ "model.layers.29.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
260
+ "model.layers.29.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
261
+ "model.layers.3.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
262
+ "model.layers.3.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
263
+ "model.layers.3.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
264
+ "model.layers.3.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
265
+ "model.layers.3.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
266
+ "model.layers.3.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
267
+ "model.layers.3.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
268
+ "model.layers.3.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
269
+ "model.layers.3.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
270
+ "model.layers.3.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
271
+ "model.layers.3.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
272
+ "model.layers.30.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
273
+ "model.layers.30.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
274
+ "model.layers.30.mlp.down_proj.weight": "pytorch_model-00002-of-00002.bin",
275
+ "model.layers.30.mlp.gate_proj.weight": "pytorch_model-00002-of-00002.bin",
276
+ "model.layers.30.mlp.up_proj.weight": "pytorch_model-00002-of-00002.bin",
277
+ "model.layers.30.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
278
+ "model.layers.30.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
279
+ "model.layers.30.self_attn.k_proj.weight": "pytorch_model-00002-of-00002.bin",
280
+ "model.layers.30.self_attn.o_proj.weight": "pytorch_model-00002-of-00002.bin",
281
+ "model.layers.30.self_attn.q_proj.weight": "pytorch_model-00002-of-00002.bin",
282
+ "model.layers.30.self_attn.v_proj.weight": "pytorch_model-00002-of-00002.bin",
283
+ "model.layers.31.input_layernorm.bias": "pytorch_model-00002-of-00002.bin",
284
+ "model.layers.31.input_layernorm.weight": "pytorch_model-00002-of-00002.bin",
285
+ "model.layers.31.mlp.down_proj.weight": "pytorch_model-00002-of-00002.bin",
286
+ "model.layers.31.mlp.gate_proj.weight": "pytorch_model-00002-of-00002.bin",
287
+ "model.layers.31.mlp.up_proj.weight": "pytorch_model-00002-of-00002.bin",
288
+ "model.layers.31.post_attention_layernorm.bias": "pytorch_model-00002-of-00002.bin",
289
+ "model.layers.31.post_attention_layernorm.weight": "pytorch_model-00002-of-00002.bin",
290
+ "model.layers.31.self_attn.k_proj.weight": "pytorch_model-00002-of-00002.bin",
291
+ "model.layers.31.self_attn.o_proj.weight": "pytorch_model-00002-of-00002.bin",
292
+ "model.layers.31.self_attn.q_proj.weight": "pytorch_model-00002-of-00002.bin",
293
+ "model.layers.31.self_attn.v_proj.weight": "pytorch_model-00002-of-00002.bin",
294
+ "model.layers.4.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
295
+ "model.layers.4.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
296
+ "model.layers.4.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
297
+ "model.layers.4.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
298
+ "model.layers.4.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
299
+ "model.layers.4.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
300
+ "model.layers.4.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
301
+ "model.layers.4.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
302
+ "model.layers.4.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
303
+ "model.layers.4.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
304
+ "model.layers.4.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
305
+ "model.layers.5.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
306
+ "model.layers.5.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
307
+ "model.layers.5.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
308
+ "model.layers.5.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
309
+ "model.layers.5.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
310
+ "model.layers.5.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
311
+ "model.layers.5.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
312
+ "model.layers.5.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
313
+ "model.layers.5.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
314
+ "model.layers.5.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
315
+ "model.layers.5.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
316
+ "model.layers.6.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
317
+ "model.layers.6.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
318
+ "model.layers.6.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
319
+ "model.layers.6.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
320
+ "model.layers.6.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
321
+ "model.layers.6.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
322
+ "model.layers.6.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
323
+ "model.layers.6.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
324
+ "model.layers.6.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
325
+ "model.layers.6.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
326
+ "model.layers.6.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
327
+ "model.layers.7.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
328
+ "model.layers.7.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
329
+ "model.layers.7.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
330
+ "model.layers.7.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
331
+ "model.layers.7.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
332
+ "model.layers.7.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
333
+ "model.layers.7.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
334
+ "model.layers.7.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
335
+ "model.layers.7.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
336
+ "model.layers.7.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
337
+ "model.layers.7.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
338
+ "model.layers.8.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
339
+ "model.layers.8.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
340
+ "model.layers.8.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
341
+ "model.layers.8.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
342
+ "model.layers.8.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
343
+ "model.layers.8.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
344
+ "model.layers.8.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
345
+ "model.layers.8.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
346
+ "model.layers.8.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
347
+ "model.layers.8.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
348
+ "model.layers.8.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
349
+ "model.layers.9.input_layernorm.bias": "pytorch_model-00001-of-00002.bin",
350
+ "model.layers.9.input_layernorm.weight": "pytorch_model-00001-of-00002.bin",
351
+ "model.layers.9.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
352
+ "model.layers.9.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
353
+ "model.layers.9.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
354
+ "model.layers.9.post_attention_layernorm.bias": "pytorch_model-00001-of-00002.bin",
355
+ "model.layers.9.post_attention_layernorm.weight": "pytorch_model-00001-of-00002.bin",
356
+ "model.layers.9.self_attn.k_proj.weight": "pytorch_model-00001-of-00002.bin",
357
+ "model.layers.9.self_attn.o_proj.weight": "pytorch_model-00001-of-00002.bin",
358
+ "model.layers.9.self_attn.q_proj.weight": "pytorch_model-00001-of-00002.bin",
359
+ "model.layers.9.self_attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
360
+ "model.norm.bias": "pytorch_model-00002-of-00002.bin",
361
+ "model.norm.weight": "pytorch_model-00002-of-00002.bin"
362
+ }
363
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<|endoftext|>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<|padding|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "50254": {
21
+ "content": " ",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": false
27
+ },
28
+ "50255": {
29
+ "content": " ",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": false
35
+ },
36
+ "50256": {
37
+ "content": " ",
38
+ "lstrip": false,
39
+ "normalized": true,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": false
43
+ },
44
+ "50257": {
45
+ "content": " ",
46
+ "lstrip": false,
47
+ "normalized": true,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": false
51
+ },
52
+ "50258": {
53
+ "content": " ",
54
+ "lstrip": false,
55
+ "normalized": true,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": false
59
+ },
60
+ "50259": {
61
+ "content": " ",
62
+ "lstrip": false,
63
+ "normalized": true,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": false
67
+ },
68
+ "50260": {
69
+ "content": " ",
70
+ "lstrip": false,
71
+ "normalized": true,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": false
75
+ },
76
+ "50261": {
77
+ "content": " ",
78
+ "lstrip": false,
79
+ "normalized": true,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": false
83
+ },
84
+ "50262": {
85
+ "content": " ",
86
+ "lstrip": false,
87
+ "normalized": true,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": false
91
+ },
92
+ "50263": {
93
+ "content": " ",
94
+ "lstrip": false,
95
+ "normalized": true,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": false
99
+ },
100
+ "50264": {
101
+ "content": " ",
102
+ "lstrip": false,
103
+ "normalized": true,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": false
107
+ },
108
+ "50265": {
109
+ "content": " ",
110
+ "lstrip": false,
111
+ "normalized": true,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": false
115
+ },
116
+ "50266": {
117
+ "content": " ",
118
+ "lstrip": false,
119
+ "normalized": true,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": false
123
+ },
124
+ "50267": {
125
+ "content": " ",
126
+ "lstrip": false,
127
+ "normalized": true,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": false
131
+ },
132
+ "50268": {
133
+ "content": " ",
134
+ "lstrip": false,
135
+ "normalized": true,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": false
139
+ },
140
+ "50269": {
141
+ "content": " ",
142
+ "lstrip": false,
143
+ "normalized": true,
144
+ "rstrip": false,
145
+ "single_word": false,
146
+ "special": false
147
+ },
148
+ "50270": {
149
+ "content": " ",
150
+ "lstrip": false,
151
+ "normalized": true,
152
+ "rstrip": false,
153
+ "single_word": false,
154
+ "special": false
155
+ },
156
+ "50271": {
157
+ "content": " ",
158
+ "lstrip": false,
159
+ "normalized": true,
160
+ "rstrip": false,
161
+ "single_word": false,
162
+ "special": false
163
+ },
164
+ "50272": {
165
+ "content": " ",
166
+ "lstrip": false,
167
+ "normalized": true,
168
+ "rstrip": false,
169
+ "single_word": false,
170
+ "special": false
171
+ },
172
+ "50273": {
173
+ "content": " ",
174
+ "lstrip": false,
175
+ "normalized": true,
176
+ "rstrip": false,
177
+ "single_word": false,
178
+ "special": false
179
+ },
180
+ "50274": {
181
+ "content": " ",
182
+ "lstrip": false,
183
+ "normalized": true,
184
+ "rstrip": false,
185
+ "single_word": false,
186
+ "special": false
187
+ },
188
+ "50275": {
189
+ "content": " ",
190
+ "lstrip": false,
191
+ "normalized": true,
192
+ "rstrip": false,
193
+ "single_word": false,
194
+ "special": false
195
+ },
196
+ "50276": {
197
+ "content": " ",
198
+ "lstrip": false,
199
+ "normalized": true,
200
+ "rstrip": false,
201
+ "single_word": false,
202
+ "special": false
203
+ },
204
+ "50277": {
205
+ "content": "<|pad|>",
206
+ "lstrip": false,
207
+ "normalized": true,
208
+ "rstrip": false,
209
+ "single_word": false,
210
+ "special": false
211
+ },
212
+ "50278": {
213
+ "content": "<|im_start|>",
214
+ "lstrip": false,
215
+ "normalized": true,
216
+ "rstrip": false,
217
+ "single_word": false,
218
+ "special": false
219
+ },
220
+ "50279": {
221
+ "content": "<|im_end|>",
222
+ "lstrip": false,
223
+ "normalized": true,
224
+ "rstrip": false,
225
+ "single_word": false,
226
+ "special": false
227
+ },
228
+ "50280": {
229
+ "content": "[PAD]",
230
+ "lstrip": false,
231
+ "normalized": false,
232
+ "rstrip": false,
233
+ "single_word": false,
234
+ "special": true
235
+ }
236
+ },
237
+ "bos_token": "<|endoftext|>",
238
+ "clean_up_tokenization_spaces": true,
239
+ "eos_token": "<|endoftext|>",
240
+ "model_max_length": 1000000000000000019884624838656,
241
+ "pad_token": "[PAD]",
242
+ "tokenizer_class": "GPTNeoXTokenizer",
243
+ "unk_token": "<|endoftext|>"
244
+ }