Text Generation
Transformers
Safetensors
llama
mergekit
Merge
text-generation-inference
zxc4wewewe commited on
Commit
b16c96f
·
verified ·
1 Parent(s): 75c6bd6

Upload 16 files

Browse files
.gitattributes CHANGED
@@ -1,36 +1,36 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,162 +1,162 @@
1
- ---
2
- license: llama3.1
3
- model-index:
4
- - name: Llama-3.1-8B-Lexi-Uncensored-V2
5
- results:
6
- - task:
7
- type: text-generation
8
- name: Text Generation
9
- dataset:
10
- name: IFEval (0-Shot)
11
- type: HuggingFaceH4/ifeval
12
- args:
13
- num_few_shot: 0
14
- metrics:
15
- - type: inst_level_strict_acc and prompt_level_strict_acc
16
- value: 77.92
17
- name: strict accuracy
18
- source:
19
- url: >-
20
- https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
21
- name: Open LLM Leaderboard
22
- - task:
23
- type: text-generation
24
- name: Text Generation
25
- dataset:
26
- name: BBH (3-Shot)
27
- type: BBH
28
- args:
29
- num_few_shot: 3
30
- metrics:
31
- - type: acc_norm
32
- value: 29.69
33
- name: normalized accuracy
34
- source:
35
- url: >-
36
- https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
37
- name: Open LLM Leaderboard
38
- - task:
39
- type: text-generation
40
- name: Text Generation
41
- dataset:
42
- name: MATH Lvl 5 (4-Shot)
43
- type: hendrycks/competition_math
44
- args:
45
- num_few_shot: 4
46
- metrics:
47
- - type: exact_match
48
- value: 16.92
49
- name: exact match
50
- source:
51
- url: >-
52
- https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
53
- name: Open LLM Leaderboard
54
- - task:
55
- type: text-generation
56
- name: Text Generation
57
- dataset:
58
- name: GPQA (0-shot)
59
- type: Idavidrein/gpqa
60
- args:
61
- num_few_shot: 0
62
- metrics:
63
- - type: acc_norm
64
- value: 4.36
65
- name: acc_norm
66
- source:
67
- url: >-
68
- https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
69
- name: Open LLM Leaderboard
70
- - task:
71
- type: text-generation
72
- name: Text Generation
73
- dataset:
74
- name: MuSR (0-shot)
75
- type: TAUR-Lab/MuSR
76
- args:
77
- num_few_shot: 0
78
- metrics:
79
- - type: acc_norm
80
- value: 7.77
81
- name: acc_norm
82
- source:
83
- url: >-
84
- https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
85
- name: Open LLM Leaderboard
86
- - task:
87
- type: text-generation
88
- name: Text Generation
89
- dataset:
90
- name: MMLU-PRO (5-shot)
91
- type: TIGER-Lab/MMLU-Pro
92
- config: main
93
- split: test
94
- args:
95
- num_few_shot: 5
96
- metrics:
97
- - type: acc
98
- value: 30.9
99
- name: accuracy
100
- source:
101
- url: >-
102
- https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
103
- name: Open LLM Leaderboard
104
- library_name: transformers
105
- base_model:
106
- - Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
107
- ---
108
-
109
- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/644ad182f434a6a63b18eee6/7mnEJyioRzQaWz8xLM4KI.png)
110
-
111
- VERSION 2 Update Notes:
112
- ---
113
- - More compliant
114
- - Smarter
115
- - For best response, use this system prompt (feel free to expand upon it as you wish):
116
-
117
- Think step by step with a logical reasoning and intellectual sense before you provide any response.
118
-
119
- - For more uncensored and compliant response, you can expand the system message differently, or simply enter a dot "." as system message.
120
-
121
- - IMPORTANT: Upon further investigation, the Q4 seems to have refusal issues sometimes.
122
- There seems to be some of the fine-tune loss happening due to the quantization. I will look into it for V3.
123
- Until then, I suggest you run F16 or Q8 if possible.
124
-
125
- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/644ad182f434a6a63b18eee6/zaHhRjsk3rvo_YewgXV2Z.png)
126
-
127
- GENERAL INFO:
128
- ---
129
-
130
- This model is based on Llama-3.1-8b-Instruct, and is governed by [META LLAMA 3.1 COMMUNITY LICENSE AGREEMENT](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE)
131
-
132
- Lexi is uncensored, which makes the model compliant. You are advised to implement your own alignment layer before exposing the model as a service. It will be highly compliant with any requests, even unethical ones.
133
-
134
- You are responsible for any content you create using this model. Please use it responsibly.
135
-
136
- Lexi is licensed according to Meta's Llama license. I grant permission for any use, including commercial, that falls within accordance with Meta's Llama-3.1 license.
137
-
138
- IMPORTANT:
139
- ---
140
- Use the same template as the official Llama 3.1 8B instruct.
141
- System tokens must be present during inference, even if you set an empty system message. If you are unsure, just add a short system message as you wish.
142
-
143
- FEEDBACK:
144
- ---
145
- If you find any issues or have suggestions for improvements, feel free to leave a review and I will look into it for upcoming improvements and next version.
146
-
147
-
148
- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/644ad182f434a6a63b18eee6/uqJv-R1LeJEfMxi1nmTH5.png)
149
-
150
-
151
- # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
152
- Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_Orenguteng__Llama-3.1-8B-Lexi-Uncensored-V2)
153
-
154
- | Metric |Value|
155
- |-------------------|----:|
156
- |Avg. |27.93|
157
- |IFEval (0-Shot) |77.92|
158
- |BBH (3-Shot) |29.69|
159
- |MATH Lvl 5 (4-Shot)|16.92|
160
- |GPQA (0-shot) | 4.36|
161
- |MuSR (0-shot) | 7.77|
162
  |MMLU-PRO (5-shot) |30.90|
 
1
+ ---
2
+ license: llama3.1
3
+ model-index:
4
+ - name: Llama-3.1-8B-Lexi-Uncensored-V2
5
+ results:
6
+ - task:
7
+ type: text-generation
8
+ name: Text Generation
9
+ dataset:
10
+ name: IFEval (0-Shot)
11
+ type: HuggingFaceH4/ifeval
12
+ args:
13
+ num_few_shot: 0
14
+ metrics:
15
+ - type: inst_level_strict_acc and prompt_level_strict_acc
16
+ value: 77.92
17
+ name: strict accuracy
18
+ source:
19
+ url: >-
20
+ https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
21
+ name: Open LLM Leaderboard
22
+ - task:
23
+ type: text-generation
24
+ name: Text Generation
25
+ dataset:
26
+ name: BBH (3-Shot)
27
+ type: BBH
28
+ args:
29
+ num_few_shot: 3
30
+ metrics:
31
+ - type: acc_norm
32
+ value: 29.69
33
+ name: normalized accuracy
34
+ source:
35
+ url: >-
36
+ https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
37
+ name: Open LLM Leaderboard
38
+ - task:
39
+ type: text-generation
40
+ name: Text Generation
41
+ dataset:
42
+ name: MATH Lvl 5 (4-Shot)
43
+ type: hendrycks/competition_math
44
+ args:
45
+ num_few_shot: 4
46
+ metrics:
47
+ - type: exact_match
48
+ value: 16.92
49
+ name: exact match
50
+ source:
51
+ url: >-
52
+ https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
53
+ name: Open LLM Leaderboard
54
+ - task:
55
+ type: text-generation
56
+ name: Text Generation
57
+ dataset:
58
+ name: GPQA (0-shot)
59
+ type: Idavidrein/gpqa
60
+ args:
61
+ num_few_shot: 0
62
+ metrics:
63
+ - type: acc_norm
64
+ value: 4.36
65
+ name: acc_norm
66
+ source:
67
+ url: >-
68
+ https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
69
+ name: Open LLM Leaderboard
70
+ - task:
71
+ type: text-generation
72
+ name: Text Generation
73
+ dataset:
74
+ name: MuSR (0-shot)
75
+ type: TAUR-Lab/MuSR
76
+ args:
77
+ num_few_shot: 0
78
+ metrics:
79
+ - type: acc_norm
80
+ value: 7.77
81
+ name: acc_norm
82
+ source:
83
+ url: >-
84
+ https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
85
+ name: Open LLM Leaderboard
86
+ - task:
87
+ type: text-generation
88
+ name: Text Generation
89
+ dataset:
90
+ name: MMLU-PRO (5-shot)
91
+ type: TIGER-Lab/MMLU-Pro
92
+ config: main
93
+ split: test
94
+ args:
95
+ num_few_shot: 5
96
+ metrics:
97
+ - type: acc
98
+ value: 30.9
99
+ name: accuracy
100
+ source:
101
+ url: >-
102
+ https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
103
+ name: Open LLM Leaderboard
104
+ library_name: transformers
105
+ base_model:
106
+ - Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
107
+ ---
108
+
109
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/644ad182f434a6a63b18eee6/7mnEJyioRzQaWz8xLM4KI.png)
110
+
111
+ VERSION 2 Update Notes:
112
+ ---
113
+ - More compliant
114
+ - Smarter
115
+ - For best response, use this system prompt (feel free to expand upon it as you wish):
116
+
117
+ Think step by step with a logical reasoning and intellectual sense before you provide any response.
118
+
119
+ - For more uncensored and compliant response, you can expand the system message differently, or simply enter a dot "." as system message.
120
+
121
+ - IMPORTANT: Upon further investigation, the Q4 seems to have refusal issues sometimes.
122
+ There seems to be some of the fine-tune loss happening due to the quantization. I will look into it for V3.
123
+ Until then, I suggest you run F16 or Q8 if possible.
124
+
125
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/644ad182f434a6a63b18eee6/zaHhRjsk3rvo_YewgXV2Z.png)
126
+
127
+ GENERAL INFO:
128
+ ---
129
+
130
+ This model is based on Llama-3.1-8b-Instruct, and is governed by [META LLAMA 3.1 COMMUNITY LICENSE AGREEMENT](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE)
131
+
132
+ Lexi is uncensored, which makes the model compliant. You are advised to implement your own alignment layer before exposing the model as a service. It will be highly compliant with any requests, even unethical ones.
133
+
134
+ You are responsible for any content you create using this model. Please use it responsibly.
135
+
136
+ Lexi is licensed according to Meta's Llama license. I grant permission for any use, including commercial, that falls within accordance with Meta's Llama-3.1 license.
137
+
138
+ IMPORTANT:
139
+ ---
140
+ Use the same template as the official Llama 3.1 8B instruct.
141
+ System tokens must be present during inference, even if you set an empty system message. If you are unsure, just add a short system message as you wish.
142
+
143
+ FEEDBACK:
144
+ ---
145
+ If you find any issues or have suggestions for improvements, feel free to leave a review and I will look into it for upcoming improvements and next version.
146
+
147
+
148
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/644ad182f434a6a63b18eee6/uqJv-R1LeJEfMxi1nmTH5.png)
149
+
150
+
151
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
152
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_Orenguteng__Llama-3.1-8B-Lexi-Uncensored-V2)
153
+
154
+ | Metric |Value|
155
+ |-------------------|----:|
156
+ |Avg. |27.93|
157
+ |IFEval (0-Shot) |77.92|
158
+ |BBH (3-Shot) |29.69|
159
+ |MATH Lvl 5 (4-Shot)|16.92|
160
+ |GPQA (0-shot) | 4.36|
161
+ |MuSR (0-shot) | 7.77|
162
  |MMLU-PRO (5-shot) |30.90|
config.json CHANGED
@@ -1,58 +1,39 @@
1
  {
2
- "_name_or_path": "meta-llama/meta-Llama-3.1-8B-Instruct",
3
  "architectures": [
4
  "LlamaForCausalLM"
5
  ],
6
  "attention_bias": false,
7
  "attention_dropout": 0.0,
8
  "bos_token_id": 128000,
9
- "eos_token_id": 128009,
10
- "head_dim": 128,
 
 
 
 
 
11
  "hidden_act": "silu",
12
- "hidden_size": 4096,
13
  "initializer_range": 0.02,
14
- "intermediate_size": 14336,
15
  "max_position_embeddings": 131072,
16
  "mlp_bias": false,
17
  "model_type": "llama",
18
  "num_attention_heads": 32,
19
- "num_hidden_layers": 32,
20
  "num_key_value_heads": 8,
21
- "pad_token_id": 128004,
22
  "pretraining_tp": 1,
23
- "quantization_config": {
24
- "_load_in_4bit": true,
25
- "_load_in_8bit": false,
26
- "bnb_4bit_compute_dtype": "bfloat16",
27
- "bnb_4bit_quant_storage": "uint8",
28
- "bnb_4bit_quant_type": "nf4",
29
- "bnb_4bit_use_double_quant": true,
30
- "llm_int8_enable_fp32_cpu_offload": false,
31
- "llm_int8_has_fp16_weight": false,
32
- "llm_int8_skip_modules": [
33
- "lm_head",
34
- "multi_modal_projector",
35
- "merger",
36
- "modality_projection"
37
- ],
38
- "llm_int8_threshold": 6.0,
39
- "load_in_4bit": true,
40
- "load_in_8bit": false,
41
- "quant_method": "bitsandbytes"
42
- },
43
  "rms_norm_eps": 1e-05,
44
  "rope_scaling": {
45
- "factor": 8.0,
46
  "high_freq_factor": 4.0,
47
  "low_freq_factor": 1.0,
48
  "original_max_position_embeddings": 8192,
49
  "rope_type": "llama3"
50
  },
51
  "rope_theta": 500000.0,
52
- "tie_word_embeddings": false,
53
- "torch_dtype": "bfloat16",
54
- "transformers_version": "4.49.0.dev0",
55
- "unsloth_fixed": true,
56
  "use_cache": true,
57
  "vocab_size": 128256
58
  }
 
1
  {
 
2
  "architectures": [
3
  "LlamaForCausalLM"
4
  ],
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
7
  "bos_token_id": 128000,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": [
10
+ 128001,
11
+ 128008,
12
+ 128009
13
+ ],
14
+ "head_dim": 64,
15
  "hidden_act": "silu",
16
+ "hidden_size": 2048,
17
  "initializer_range": 0.02,
18
+ "intermediate_size": 8192,
19
  "max_position_embeddings": 131072,
20
  "mlp_bias": false,
21
  "model_type": "llama",
22
  "num_attention_heads": 32,
23
+ "num_hidden_layers": 16,
24
  "num_key_value_heads": 8,
 
25
  "pretraining_tp": 1,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  "rms_norm_eps": 1e-05,
27
  "rope_scaling": {
28
+ "factor": 32.0,
29
  "high_freq_factor": 4.0,
30
  "low_freq_factor": 1.0,
31
  "original_max_position_embeddings": 8192,
32
  "rope_type": "llama3"
33
  },
34
  "rope_theta": 500000.0,
35
+ "tie_word_embeddings": true,
36
+ "transformers_version": "4.57.1",
 
 
37
  "use_cache": true,
38
  "vocab_size": 128256
39
  }
generation_config.json CHANGED
@@ -10,5 +10,5 @@
10
  "pad_token_id": 128004,
11
  "temperature": 0.6,
12
  "top_p": 0.9,
13
- "transformers_version": "4.49.0.dev0"
14
  }
 
10
  "pad_token_id": 128004,
11
  "temperature": 0.6,
12
  "top_p": 0.9,
13
+ "transformers_version": "4.44.0.dev0"
14
  }
main.py ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import torch
3
+ from datasets import load_dataset
4
+ from transformers import (
5
+ AutoTokenizer,
6
+ AutoModelForCausalLM,
7
+ TrainingArguments,
8
+ Trainer,
9
+ DataCollatorForLanguageModeling,
10
+ )
11
+
12
+ # ─── Configuration ───────────────────────────────────────────────────────────
13
+ MODEL_NAME = "zxc4wewewe/blackthinking" # lightweight model suitable for CPU
14
+ MAX_LENGTH = 512 # max token length per example
15
+ OUTPUT_DIR = "./results"
16
+ NUM_EPOCHS = 3
17
+ BATCH_SIZE = 2 # small batch for CPU training
18
+ LEARNING_RATE = 5e-5
19
+ LOGGING_STEPS = 50
20
+
21
+ # ─── 1. Load dataset from Hugging Face Hub ───────────────────────────────────
22
+ dataset = load_dataset("zxc4wewewe/offsec")
23
+ print(f"Train: {len(dataset['train'])} examples | Test: {len(dataset['test'])} examples")
24
+ print(f"Columns: {dataset['train'].column_names}")
25
+
26
+
27
+ # ─── 2. Format & tokenize ────────────────────────────────────────────────────
28
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
29
+
30
+ # GPT-2 has no pad token by default — use eos_token
31
+ if tokenizer.pad_token is None:
32
+ tokenizer.pad_token = tokenizer.eos_token
33
+
34
+
35
+ def format_and_tokenize(examples):
36
+ """Combine prompt + response into a single text and tokenize."""
37
+ texts = [
38
+ f"{prompt}{response}{tokenizer.eos_token}"
39
+ for prompt, response in zip(examples["prompt"], examples["response"])
40
+ ]
41
+ tokenized = tokenizer(
42
+ texts,
43
+ truncation=True,
44
+ max_length=MAX_LENGTH,
45
+ padding="max_length",
46
+ )
47
+ # For causal LM, labels = input_ids (the model learns to predict next token)
48
+ tokenized["labels"] = tokenized["input_ids"].copy()
49
+ return tokenized
50
+
51
+
52
+ tokenized_dataset = dataset.map(
53
+ format_and_tokenize,
54
+ batched=True,
55
+ remove_columns=dataset["train"].column_names,
56
+ desc="Tokenizing",
57
+ )
58
+
59
+ print(f"Tokenized train: {len(tokenized_dataset['train'])} examples")
60
+
61
+
62
+ # ─── 3. Model ────────────────────────────────────────────────────────────────
63
+ model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
64
+ model.resize_token_embeddings(len(tokenizer))
65
+
66
+ data_collator = DataCollatorForLanguageModeling(
67
+ tokenizer=tokenizer,
68
+ mlm=False, # causal LM, not masked LM
69
+ )
70
+
71
+
72
+ # ─── 4. Training ─────────────────────────────────────────────────────────────
73
+ training_args = TrainingArguments(
74
+ output_dir=OUTPUT_DIR,
75
+ overwrite_output_dir=True,
76
+ num_train_epochs=NUM_EPOCHS,
77
+ per_device_train_batch_size=BATCH_SIZE,
78
+ per_device_eval_batch_size=BATCH_SIZE,
79
+ eval_strategy="epoch",
80
+ save_strategy="epoch",
81
+ learning_rate=LEARNING_RATE,
82
+ weight_decay=0.01,
83
+ logging_dir="./logs",
84
+ logging_steps=LOGGING_STEPS,
85
+ load_best_model_at_end=True,
86
+ save_total_limit=2,
87
+ fp16=False, # CPU-only
88
+ report_to="none",
89
+ )
90
+
91
+ trainer = Trainer(
92
+ model=model,
93
+ args=training_args,
94
+ train_dataset=tokenized_dataset["train"],
95
+ eval_dataset=tokenized_dataset["test"],
96
+ data_collator=data_collator,
97
+ )
98
+
99
+ print("Starting training...")
100
+ trainer.train()
101
+
102
+ # Save final model
103
+ trainer.save_model(f"{OUTPUT_DIR}/final_model")
104
+ tokenizer.save_pretrained(f"{OUTPUT_DIR}/final_model")
105
+ print(f"Model saved to {OUTPUT_DIR}/final_model")
106
+
107
+
108
+ # ─── 5. Inference ────────────────────────────────────────────────────────────
109
+ def generate_response(prompt_text, max_new_tokens=256):
110
+ """Generate a response given a prompt."""
111
+ inputs = tokenizer(prompt_text, return_tensors="pt")
112
+ with torch.no_grad():
113
+ output_ids = model.generate(
114
+ **inputs,
115
+ max_new_tokens=max_new_tokens,
116
+ do_sample=True,
117
+ temperature=0.7,
118
+ top_p=0.9,
119
+ pad_token_id=tokenizer.eos_token_id,
120
+ )
121
+ # Decode only the generated part (skip the prompt tokens)
122
+ generated = output_ids[0][inputs["input_ids"].shape[1]:]
123
+ return tokenizer.decode(generated, skip_special_tokens=True)
124
+
125
+
126
+ # Example usage (uncomment to test after training):
127
+ sample_prompt = dataset["test"][0]["prompt"]
128
+ print("Prompt:", sample_prompt[:200], "...")
129
+ print("Generated:", generate_response(sample_prompt))
mergekit_config.yml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dtype: float32
2
+ out_dtype: bfloat16
3
+ merge_method: arcee_fusion
4
+ base_model: Novaciano/Eurinoferus-3.2-1B
5
+ models:
6
+ - model: Novaciano/Eurinoferus-3.2-1B
7
+ parameters:
8
+ weight:
9
+ - filter: mlp
10
+ value: [1, 2]
11
+ - value: 1
12
+ - model: cazzz307/Abliterated-Llama-3.2-1B-Instruct
13
+ parameters:
14
+ weight:
15
+ - filter: lm_head
16
+ value: 1
17
+ - value: [1, 0.5]
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d36fef000d013936684c2f5f0b1e020ecd6656d63721c572400238832bc7d53d
3
+ size 525336712
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2292b5ed5e2a16aba7bb3603279757106bf414ffba2a65aeb6034ed54517d954
3
+ size 993038112
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d978697993397fe090eff4c0c1923b153a88909d2f13c8bac392cfde71abf0e1
3
+ size 992031192
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cd276c8ee78d33bc56ec60e957c9ddb5d073b7a66ca6fa44408b21dc7a7fcbd
3
+ size 486576120
model.safetensors.index.json CHANGED
@@ -1,298 +1 @@
1
- {
2
- "metadata": {
3
- "total_size": 16060522496
4
- },
5
- "weight_map": {
6
- "lm_head.weight": "model-00004-of-00004.safetensors",
7
- "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
- "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
- "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
- "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
- "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
- "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
- "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
14
- "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
15
- "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
16
- "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
17
- "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
18
- "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
19
- "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
20
- "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
21
- "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
22
- "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
23
- "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
24
- "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
25
- "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
26
- "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
27
- "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
28
- "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
29
- "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
30
- "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
31
- "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
32
- "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
33
- "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
34
- "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
35
- "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
36
- "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
37
- "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
38
- "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
39
- "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
40
- "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
41
- "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
42
- "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
43
- "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
- "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
- "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
- "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
- "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
- "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
- "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
50
- "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
51
- "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
52
- "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
53
- "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
54
- "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
55
- "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
56
- "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
57
- "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
58
- "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
59
- "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
60
- "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
61
- "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
62
- "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
63
- "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
64
- "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
65
- "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
66
- "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
67
- "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
68
- "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
69
- "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
70
- "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
71
- "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
72
- "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
73
- "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
74
- "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
75
- "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
76
- "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
77
- "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
78
- "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
79
- "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
- "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
- "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
- "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
- "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
- "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
- "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
86
- "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
87
- "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
88
- "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
89
- "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
90
- "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
91
- "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
92
- "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
93
- "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
94
- "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
95
- "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
96
- "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
97
- "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
98
- "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
99
- "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
100
- "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
101
- "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
102
- "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
103
- "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
104
- "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
105
- "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
106
- "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
107
- "model.layers.19.input_layernorm.weight": "model-00002-of-00004.safetensors",
108
- "model.layers.19.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
109
- "model.layers.19.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
110
- "model.layers.19.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
111
- "model.layers.19.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
112
- "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
113
- "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
114
- "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
115
- "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
- "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
117
- "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
118
- "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
119
- "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
120
- "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
121
- "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
122
- "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
123
- "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
124
- "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
125
- "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
126
- "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
127
- "model.layers.20.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
128
- "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
129
- "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
130
- "model.layers.20.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
131
- "model.layers.20.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
132
- "model.layers.20.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
133
- "model.layers.20.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
134
- "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
135
- "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
136
- "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
137
- "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
138
- "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
139
- "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
140
- "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
141
- "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
142
- "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
143
- "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
144
- "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
145
- "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
146
- "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
147
- "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
148
- "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
149
- "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
150
- "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
151
- "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
- "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
153
- "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
154
- "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
155
- "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
156
- "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
157
- "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
158
- "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
159
- "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
160
- "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
161
- "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
162
- "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
163
- "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
164
- "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
165
- "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
166
- "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
167
- "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
168
- "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
169
- "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
170
- "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
171
- "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
172
- "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
173
- "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
174
- "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
175
- "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
176
- "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
177
- "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
178
- "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
179
- "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
180
- "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
181
- "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
182
- "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
183
- "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
184
- "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
185
- "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
186
- "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
187
- "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
- "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
- "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
- "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
- "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
- "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
- "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
194
- "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
195
- "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
196
- "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
197
- "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
198
- "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
199
- "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
200
- "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
201
- "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
202
- "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
203
- "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
204
- "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
205
- "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
206
- "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
207
- "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
208
- "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
209
- "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
210
- "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
211
- "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
212
- "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
213
- "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
214
- "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
215
- "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
216
- "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
217
- "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
218
- "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
219
- "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
220
- "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
221
- "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
222
- "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
223
- "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
224
- "model.layers.30.input_layernorm.weight": "model-00003-of-00004.safetensors",
225
- "model.layers.30.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
226
- "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
- "model.layers.30.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
228
- "model.layers.30.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
229
- "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
230
- "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
231
- "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
232
- "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
233
- "model.layers.31.input_layernorm.weight": "model-00004-of-00004.safetensors",
234
- "model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
235
- "model.layers.31.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
236
- "model.layers.31.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
237
- "model.layers.31.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
238
- "model.layers.31.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
239
- "model.layers.31.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
240
- "model.layers.31.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
241
- "model.layers.31.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
242
- "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
243
- "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
244
- "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
245
- "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
246
- "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
247
- "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
248
- "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
249
- "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
250
- "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
251
- "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
252
- "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
253
- "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
254
- "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
255
- "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
256
- "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
257
- "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
258
- "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
259
- "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
260
- "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
- "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
- "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
- "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
- "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
- "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
266
- "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
267
- "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
268
- "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
269
- "model.layers.7.input_layernorm.weight": "model-00001-of-00004.safetensors",
270
- "model.layers.7.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
271
- "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
272
- "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
273
- "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
274
- "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
275
- "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
276
- "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
277
- "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
278
- "model.layers.8.input_layernorm.weight": "model-00001-of-00004.safetensors",
279
- "model.layers.8.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
280
- "model.layers.8.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
281
- "model.layers.8.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
282
- "model.layers.8.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
283
- "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
284
- "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
285
- "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
286
- "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
287
- "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
288
- "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
289
- "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
290
- "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
291
- "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
292
- "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
293
- "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
294
- "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
295
- "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
296
- "model.norm.weight": "model-00004-of-00004.safetensors"
297
- }
298
- }
 
1
+ {"metadata": {"mergekit_version": "0.1.3"}, "weight_map": {"model.embed_tokens.weight": "model-00001-of-00004.safetensors", "lm_head.weight": "model-00002-of-00004.safetensors", "model.layers.0.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.0.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.0.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.0.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.0.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.0.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.0.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.0.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.0.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.1.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.1.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.1.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.1.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.1.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.1.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.1.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.1.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.1.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.11.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.11.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.11.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.12.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.12.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.12.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.12.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.12.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.12.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.12.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.12.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.12.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.13.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.13.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.13.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.13.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.13.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.13.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.13.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.13.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.13.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.14.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.14.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.14.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.14.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.14.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.14.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.14.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.14.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.14.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.15.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.15.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.15.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.15.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.15.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.15.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.15.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.15.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.15.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.2.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.2.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.2.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.2.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.2.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.2.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.2.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.2.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.2.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.3.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.3.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.4.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.4.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.5.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.5.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.6.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.6.mlp.down_proj.weight": "model-00004-of-00004.safetensors", "model.layers.6.mlp.gate_proj.weight": "model-00004-of-00004.safetensors", "model.layers.6.mlp.up_proj.weight": "model-00004-of-00004.safetensors", "model.layers.6.post_attention_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.6.self_attn.k_proj.weight": "model-00004-of-00004.safetensors", "model.layers.6.self_attn.o_proj.weight": "model-00004-of-00004.safetensors", "model.layers.6.self_attn.q_proj.weight": "model-00004-of-00004.safetensors", "model.layers.6.self_attn.v_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.input_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.7.mlp.down_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.mlp.gate_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.mlp.up_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.post_attention_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.7.self_attn.k_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.self_attn.o_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.self_attn.q_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.self_attn.v_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.input_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.8.mlp.down_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.mlp.gate_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.mlp.up_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.post_attention_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.8.self_attn.k_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.self_attn.o_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.self_attn.q_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.self_attn.v_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.input_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.9.mlp.down_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.mlp.gate_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.mlp.up_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.post_attention_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.9.self_attn.k_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.self_attn.o_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.self_attn.q_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.self_attn.v_proj.weight": "model-00004-of-00004.safetensors", "model.norm.weight": "model-00004-of-00004.safetensors"}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
special_tokens_map.json CHANGED
@@ -14,7 +14,7 @@
14
  "single_word": false
15
  },
16
  "pad_token": {
17
- "content": "<|finetune_right_pad_id|>",
18
  "lstrip": false,
19
  "normalized": false,
20
  "rstrip": false,
 
14
  "single_word": false
15
  },
16
  "pad_token": {
17
+ "content": "<|eot_id|>",
18
  "lstrip": false,
19
  "normalized": false,
20
  "rstrip": false,
tokenizer_config.json CHANGED
@@ -1,5 +1,4 @@
1
  {
2
- "add_bos_token": true,
3
  "added_tokens_decoder": {
4
  "128000": {
5
  "content": "<|begin_of_text|>",
@@ -2051,7 +2050,7 @@
2051
  }
2052
  },
2053
  "bos_token": "<|begin_of_text|>",
2054
- "chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- set date_string = \"26 Jul 2024\" %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n{%- endif %}\n\n{#- System message + builtin tools #}\n{{- \"<|start_header_id|>system<|end_header_id|>\\n\\n\" }}\n{%- if builtin_tools is defined or tools is not none %}\n {{- \"Environment: ipython\\n\" }}\n{%- endif %}\n{%- if builtin_tools is defined %}\n {{- \"Tools: \" + builtin_tools | reject('equalto', 'code_interpreter') | join(\", \") + \"\\n\\n\"}}\n{%- endif %}\n{{- \"Cutting Knowledge Date: December 2023\\n\" }}\n{{- \"Today Date: \" + date_string + \"\\n\\n\" }}\n{%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n{%- endif %}\n{{- system_message }}\n{{- \"<|eot_id|>\" }}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|start_header_id|>user<|end_header_id|>\\n\\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\\n\\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot_id|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n'+ message['content'] | trim + '<|eot_id|>' }}\n {%- elif 'tool_calls' in message %}\n {%- if not message.tool_calls|length == 1 %}\n {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\n {%- endif %}\n {%- set tool_call = message.tool_calls[0].function %}\n {%- if builtin_tools is defined and tool_call.name in builtin_tools %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- \"<|python_tag|>\" + tool_call.name + \".call(\" }}\n {%- for arg_name, arg_val in tool_call.arguments | items %}\n {{- arg_name + '=\"' + arg_val + '\"' }}\n {%- if not loop.last %}\n {{- \", \" }}\n {%- endif %}\n {%- endfor %}\n {{- \")\" }}\n {%- else %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- '{\"name\": \"' + tool_call.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- \"}\" }}\n {%- endif %}\n {%- if builtin_tools is defined %}\n {#- This means we're in ipython mode #}\n {{- \"<|eom_id|>\" }}\n {%- else %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|start_header_id|>ipython<|end_header_id|>\\n\\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}\n{%- endif %}\n",
2055
  "clean_up_tokenization_spaces": true,
2056
  "eos_token": "<|eot_id|>",
2057
  "extra_special_tokens": {},
@@ -2060,8 +2059,8 @@
2060
  "attention_mask"
2061
  ],
2062
  "model_max_length": 131072,
2063
- "pad_token": "<|finetune_right_pad_id|>",
2064
  "padding_side": "left",
2065
- "tokenizer_class": "PreTrainedTokenizer",
2066
- "unk_token": null
2067
  }
 
1
  {
 
2
  "added_tokens_decoder": {
3
  "128000": {
4
  "content": "<|begin_of_text|>",
 
2050
  }
2051
  },
2052
  "bos_token": "<|begin_of_text|>",
2053
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ '<|begin_of_text|>' + '<|start_header_id|>system<|end_header_id|>\\n\\n' + system_message + '<|eot_id|>' }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|start_header_id|>user<|end_header_id|>\\n\\n' + content + '<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\n' }}{% elif message['role'] == 'assistant' %}{{ content + '<|eot_id|>' }}{% endif %}{% endfor %}",
2054
  "clean_up_tokenization_spaces": true,
2055
  "eos_token": "<|eot_id|>",
2056
  "extra_special_tokens": {},
 
2059
  "attention_mask"
2060
  ],
2061
  "model_max_length": 131072,
2062
+ "pad_token": "<|eot_id|>",
2063
  "padding_side": "left",
2064
+ "split_special_tokens": false,
2065
+ "tokenizer_class": "PreTrainedTokenizer"
2066
  }