intervitens commited on
Commit
4c58e5f
1 Parent(s): 29159d0

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: peft
3
+ tags:
4
+ - generated_from_trainer
5
+ base_model: intervitens/internlm2-base-20b-llama
6
+ model-index:
7
+ - name: internlm-limarp-lora
8
+ results: []
9
+ ---
10
+
11
+ Don't use this yet, there's a problem with the llamafied internlm2 tokenizer.
12
+ Prompt format: ChatML.
13
+
14
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
15
+ <details><summary>See axolotl config</summary>
16
+
17
+ axolotl version: `0.3.0`
18
+ ```yaml
19
+ base_model: /data/internlm2-base-20b-llama
20
+ model_type: LlamaForCausalLM
21
+ tokenizer_type: LlamaTokenizer
22
+ is_llama_derived_model: true
23
+
24
+ load_in_8bit: true
25
+ load_in_4bit: false
26
+ strict: false
27
+
28
+ datasets:
29
+ - path: /data/train-all-8k.jsonl
30
+ type: completion
31
+ dataset_prepared_path:
32
+ val_set_size: 0.05
33
+ output_dir: /data/internlm-limarp-lora-out
34
+
35
+ sequence_len: 8192
36
+ sample_packing: true
37
+ pad_to_sequence_len: true
38
+
39
+ adapter: lora
40
+ lora_model_dir:
41
+ lora_r: 128
42
+ lora_alpha: 64
43
+ lora_dropout: 0.05
44
+ lora_target_linear: true
45
+ lora_fan_in_fan_out:
46
+
47
+ gradient_accumulation_steps: 4
48
+ micro_batch_size: 2
49
+ num_epochs: 4
50
+ optimizer: adamw_bnb_8bit
51
+ lr_scheduler: cosine
52
+ learning_rate: 0.00002
53
+
54
+ train_on_inputs: false
55
+ group_by_length: false
56
+ bf16: true
57
+ fp16: false
58
+ tf32: false
59
+
60
+ gradient_checkpointing: true
61
+ gradient_checkpointing_kwargs:
62
+ early_stopping_patience:
63
+ resume_from_checkpoint:
64
+ local_rank:
65
+ logging_steps: 1
66
+ xformers_attention:
67
+ flash_attention: true
68
+ s2_attention:
69
+
70
+ warmup_steps: 10
71
+ evals_per_epoch: 4
72
+ eval_table_size:
73
+ eval_table_max_new_tokens: 128
74
+ saves_per_epoch: 1
75
+ debug:
76
+ deepspeed:
77
+ weight_decay: 0.0
78
+ fsdp:
79
+ fsdp_config:
80
+ special_tokens:
81
+ bos_token: "<s>"
82
+ eos_token: "</s>"
83
+ unk_token: "<unk>"
84
+
85
+ ```
86
+
87
+ </details><br>
88
+
89
+ # internlm-limarp-lora
90
+
91
+ This model was trained from scratch on the None dataset.
92
+ It achieves the following results on the evaluation set:
93
+ - Loss: 2.1216
94
+
95
+ ## Model description
96
+
97
+ More information needed
98
+
99
+ ## Intended uses & limitations
100
+
101
+ More information needed
102
+
103
+ ## Training and evaluation data
104
+
105
+ More information needed
106
+
107
+ ## Training procedure
108
+
109
+
110
+ The following `bitsandbytes` quantization config was used during training:
111
+ - quant_method: bitsandbytes
112
+ - load_in_8bit: True
113
+ - load_in_4bit: False
114
+ - llm_int8_threshold: 6.0
115
+ - llm_int8_skip_modules: None
116
+ - llm_int8_enable_fp32_cpu_offload: False
117
+ - llm_int8_has_fp16_weight: False
118
+ - bnb_4bit_quant_type: fp4
119
+ - bnb_4bit_use_double_quant: False
120
+ - bnb_4bit_compute_dtype: float32
121
+
122
+ ### Training hyperparameters
123
+
124
+ The following hyperparameters were used during training:
125
+ - learning_rate: 2e-05
126
+ - train_batch_size: 2
127
+ - eval_batch_size: 2
128
+ - seed: 42
129
+ - gradient_accumulation_steps: 4
130
+ - total_train_batch_size: 8
131
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
132
+ - lr_scheduler_type: cosine
133
+ - lr_scheduler_warmup_steps: 10
134
+ - num_epochs: 4
135
+
136
+ ### Training results
137
+
138
+ | Training Loss | Epoch | Step | Validation Loss |
139
+ |:-------------:|:-----:|:----:|:---------------:|
140
+ | 2.3563 | 0.01 | 1 | 2.3995 |
141
+ | 2.1815 | 0.25 | 37 | 2.2693 |
142
+ | 2.1364 | 0.51 | 74 | 2.1684 |
143
+ | 2.1355 | 0.76 | 111 | 2.1526 |
144
+ | 2.1624 | 1.03 | 148 | 2.1435 |
145
+ | 2.1326 | 1.28 | 185 | 2.1367 |
146
+ | 1.9987 | 1.54 | 222 | 2.1330 |
147
+ | 2.0494 | 1.79 | 259 | 2.1291 |
148
+ | 2.0505 | 2.04 | 296 | 2.1266 |
149
+ | 2.075 | 2.3 | 333 | 2.1243 |
150
+ | 2.0183 | 2.55 | 370 | 2.1229 |
151
+ | 2.1047 | 2.81 | 407 | 2.1227 |
152
+ | 2.1309 | 3.06 | 444 | 2.1218 |
153
+ | 2.1249 | 3.31 | 481 | 2.1214 |
154
+ | 2.1423 | 3.57 | 518 | 2.1214 |
155
+ | 2.0913 | 3.82 | 555 | 2.1216 |
156
+
157
+
158
+ ### Framework versions
159
+
160
+ - PEFT 0.7.0
161
+ - Transformers 4.37.0.dev0
162
+ - Pytorch 2.0.1+cu118
163
+ - Datasets 2.16.1
164
+ - Tokenizers 0.15.0
adapter_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "/data/internlm2-base-20b-llama",
5
+ "bias": "none",
6
+ "fan_in_fan_out": null,
7
+ "inference_mode": true,
8
+ "init_lora_weights": true,
9
+ "layers_pattern": null,
10
+ "layers_to_transform": null,
11
+ "loftq_config": {},
12
+ "lora_alpha": 64,
13
+ "lora_dropout": 0.05,
14
+ "megatron_config": null,
15
+ "megatron_core": "megatron.core",
16
+ "modules_to_save": null,
17
+ "peft_type": "LORA",
18
+ "r": 128,
19
+ "rank_pattern": {},
20
+ "revision": null,
21
+ "target_modules": [
22
+ "o_proj",
23
+ "down_proj",
24
+ "gate_proj",
25
+ "q_proj",
26
+ "up_proj",
27
+ "v_proj",
28
+ "k_proj"
29
+ ],
30
+ "task_type": "CAUSAL_LM"
31
+ }
adapter_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80794ab16f86bb53e211129f7c7c5c7f8c6c42a0257c7ee9941c9a38d5558e4d
3
+ size 2617488333
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/data/internlm2-base-20b-llama",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bias": false,
9
+ "bos_token_id": 1,
10
+ "eos_token_id": 2,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 6144,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 16384,
15
+ "max_position_embeddings": 32768,
16
+ "model_type": "llama",
17
+ "num_attention_heads": 48,
18
+ "num_hidden_layers": 48,
19
+ "num_key_value_heads": 8,
20
+ "pad_token_id": 2,
21
+ "pretraining_tp": 1,
22
+ "quantization_config": {
23
+ "bnb_4bit_compute_dtype": "float32",
24
+ "bnb_4bit_quant_type": "fp4",
25
+ "bnb_4bit_use_double_quant": false,
26
+ "llm_int8_enable_fp32_cpu_offload": false,
27
+ "llm_int8_has_fp16_weight": false,
28
+ "llm_int8_skip_modules": null,
29
+ "llm_int8_threshold": 6.0,
30
+ "load_in_4bit": false,
31
+ "load_in_8bit": true,
32
+ "quant_method": "bitsandbytes"
33
+ },
34
+ "rms_norm_eps": 1e-05,
35
+ "rope_scaling": null,
36
+ "rope_theta": 1000000,
37
+ "tie_word_embeddings": false,
38
+ "torch_dtype": "bfloat16",
39
+ "transformers_version": "4.37.0.dev0",
40
+ "use_cache": false,
41
+ "vocab_size": 92544
42
+ }
lora.yml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ base_model: /data/internlm2-base-20b-llama
2
+ model_type: LlamaForCausalLM
3
+ tokenizer_type: LlamaTokenizer
4
+ is_llama_derived_model: true
5
+
6
+ load_in_8bit: true
7
+ load_in_4bit: false
8
+ strict: false
9
+
10
+ datasets:
11
+ - path: /data/train-all-8k.jsonl
12
+ type: completion
13
+ dataset_prepared_path:
14
+ val_set_size: 0.05
15
+ output_dir: /data/internlm-limarp-lora-out
16
+
17
+ sequence_len: 8192
18
+ sample_packing: true
19
+ pad_to_sequence_len: true
20
+
21
+ adapter: lora
22
+ lora_model_dir:
23
+ lora_r: 128
24
+ lora_alpha: 64
25
+ lora_dropout: 0.05
26
+ lora_target_linear: true
27
+ lora_fan_in_fan_out:
28
+
29
+
30
+ gradient_accumulation_steps: 4
31
+ micro_batch_size: 2
32
+ num_epochs: 4
33
+ optimizer: adamw_bnb_8bit
34
+ lr_scheduler: cosine
35
+ learning_rate: 0.00002
36
+
37
+ train_on_inputs: false
38
+ group_by_length: false
39
+ bf16: true
40
+ fp16: false
41
+ tf32: false
42
+
43
+
44
+ gradient_checkpointing: true
45
+ gradient_checkpointing_kwargs:
46
+ early_stopping_patience:
47
+ resume_from_checkpoint:
48
+ local_rank:
49
+ logging_steps: 1
50
+ xformers_attention:
51
+ flash_attention: true
52
+ s2_attention:
53
+
54
+ warmup_steps: 10
55
+ evals_per_epoch: 4
56
+ eval_table_size:
57
+ eval_table_max_new_tokens: 128
58
+ saves_per_epoch: 1
59
+ debug:
60
+ deepspeed:
61
+ weight_decay: 0.0
62
+ fsdp:
63
+ fsdp_config:
64
+ special_tokens:
65
+ bos_token: "<s>"
66
+ eos_token: "</s>"
67
+ unk_token: "<unk>"
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f868398fc4e05ee1e8aeba95ddf18ddcc45b8bce55d5093bead5bbf80429b48b
3
+ size 1477754
tokenizer_config.json ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<unk>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "92538": {
30
+ "content": "<|plugin|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "92539": {
38
+ "content": "<|interpreter|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "92540": {
46
+ "content": "<|action_end|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "92541": {
54
+ "content": "<|action_start|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "92542": {
62
+ "content": "<|im_end|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "92543": {
70
+ "content": "<|im_start|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ }
77
+ },
78
+ "bos_token": "<s>",
79
+ "clean_up_tokenization_spaces": true,
80
+ "eos_token": "</s>",
81
+ "legacy": true,
82
+ "model_max_length": 1000000000000000019884624838656,
83
+ "pad_token": "</s>",
84
+ "sp_model_kwargs": {},
85
+ "spaces_between_special_tokens": false,
86
+ "tokenizer_class": "LlamaTokenizer",
87
+ "trust_remote_code": false,
88
+ "unk_token": "<unk>",
89
+ "use_default_system_prompt": false,
90
+ "use_fast": true
91
+ }