jeiku commited on
Commit
fb96b0d
1 Parent(s): 2b61711

Upload 7 files

Browse files
README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: peft
4
+ tags:
5
+ - generated_from_trainer
6
+ base_model: mistralai/Mistral-7B-v0.1
7
+ model-index:
8
+ - name: qlora-out
9
+ results: []
10
+ ---
11
+
12
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
+ should probably proofread and complete it, then remove this comment. -->
14
+
15
+ [<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)
16
+ <details><summary>See axolotl config</summary>
17
+
18
+ axolotl version: `0.3.0`
19
+ ```yaml
20
+ base_model: mistralai/Mistral-7B-v0.1
21
+ model_type: MistralForCausalLM
22
+ tokenizer_type: LlamaTokenizer
23
+ is_mistral_derived_model: true
24
+
25
+ load_in_8bit: false
26
+ load_in_4bit: true
27
+ strict: false
28
+
29
+ datasets:
30
+ - path: theory_of_mind_airoboros_fixed.json
31
+ type: alpaca
32
+ dataset_prepared_path: last_run_prepared
33
+ val_set_size: 0.1
34
+ output_dir: ./qlora-out
35
+
36
+ adapter: qlora
37
+ lora_model_dir:
38
+
39
+ sequence_len: 2048
40
+ sample_packing: false
41
+ pad_to_sequence_len: true
42
+
43
+ lora_r: 128
44
+ lora_alpha: 256
45
+ lora_dropout: 0.05
46
+ lora_target_linear: true
47
+ lora_fan_in_fan_out:
48
+ lora_target_modules:
49
+ - gate_proj
50
+ - down_proj
51
+ - up_proj
52
+ - q_proj
53
+ - v_proj
54
+ - k_proj
55
+ - o_proj
56
+
57
+ wandb_project:
58
+ wandb_entity:
59
+ wandb_watch:
60
+ wandb_name:
61
+ wandb_log_model:
62
+
63
+ gradient_accumulation_steps: 4
64
+ micro_batch_size: 4
65
+ num_epochs: 5
66
+ optimizer: adamw_bnb_8bit
67
+ lr_scheduler: cosine
68
+ learning_rate: 0.0002
69
+
70
+ train_on_inputs: false
71
+ group_by_length: false
72
+ bf16: true
73
+ fp16: false
74
+ tf32: false
75
+
76
+ gradient_checkpointing: true
77
+ early_stopping_patience:
78
+ resume_from_checkpoint:
79
+ local_rank:
80
+ logging_steps: 1
81
+ xformers_attention:
82
+ flash_attention: true
83
+
84
+ loss_watchdog_threshold: 5.0
85
+ loss_watchdog_patience: 3
86
+
87
+ warmup_steps: 10
88
+ evals_per_epoch: 4
89
+ eval_table_size:
90
+ eval_table_max_new_tokens: 128
91
+ saves_per_epoch: 1
92
+ debug:
93
+ deepspeed:
94
+ weight_decay: 0.0
95
+ fsdp:
96
+ fsdp_config:
97
+ special_tokens:
98
+ bos_token: "<s>"
99
+ eos_token: "</s>"
100
+ unk_token: "<unk>"
101
+
102
+ ```
103
+
104
+ </details><br>
105
+
106
+ # qlora-out
107
+
108
+ This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) on the None dataset.
109
+ It achieves the following results on the evaluation set:
110
+ - Loss: 2.0709
111
+
112
+ ## Model description
113
+
114
+ More information needed
115
+
116
+ ## Intended uses & limitations
117
+
118
+ More information needed
119
+
120
+ ## Training and evaluation data
121
+
122
+ More information needed
123
+
124
+ ## Training procedure
125
+
126
+
127
+ The following `bitsandbytes` quantization config was used during training:
128
+ - quant_method: bitsandbytes
129
+ - load_in_8bit: False
130
+ - load_in_4bit: True
131
+ - llm_int8_threshold: 6.0
132
+ - llm_int8_skip_modules: None
133
+ - llm_int8_enable_fp32_cpu_offload: False
134
+ - llm_int8_has_fp16_weight: False
135
+ - bnb_4bit_quant_type: nf4
136
+ - bnb_4bit_use_double_quant: True
137
+ - bnb_4bit_compute_dtype: bfloat16
138
+
139
+ ### Training hyperparameters
140
+
141
+ The following hyperparameters were used during training:
142
+ - learning_rate: 0.0002
143
+ - train_batch_size: 4
144
+ - eval_batch_size: 4
145
+ - seed: 42
146
+ - gradient_accumulation_steps: 4
147
+ - total_train_batch_size: 16
148
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
149
+ - lr_scheduler_type: cosine
150
+ - lr_scheduler_warmup_steps: 10
151
+ - num_epochs: 5
152
+
153
+ ### Training results
154
+
155
+ | Training Loss | Epoch | Step | Validation Loss |
156
+ |:-------------:|:-----:|:----:|:---------------:|
157
+ | 1.3182 | 0.05 | 1 | 1.3547 |
158
+ | 1.2887 | 0.26 | 5 | 1.2017 |
159
+ | 1.1629 | 0.52 | 10 | 1.2319 |
160
+ | 1.1734 | 0.78 | 15 | 1.2364 |
161
+ | 0.6007 | 1.04 | 20 | 1.3146 |
162
+ | 0.4225 | 1.3 | 25 | 1.4244 |
163
+ | 0.4144 | 1.56 | 30 | 1.4335 |
164
+ | 0.5067 | 1.82 | 35 | 1.4505 |
165
+ | 0.225 | 2.08 | 40 | 1.4928 |
166
+ | 0.1646 | 2.34 | 45 | 1.7377 |
167
+ | 0.1838 | 2.6 | 50 | 1.6058 |
168
+ | 0.2294 | 2.86 | 55 | 1.6419 |
169
+ | 0.0626 | 3.12 | 60 | 1.8140 |
170
+ | 0.0383 | 3.38 | 65 | 2.0478 |
171
+ | 0.0529 | 3.64 | 70 | 1.9511 |
172
+ | 0.0555 | 3.9 | 75 | 1.9203 |
173
+ | 0.0112 | 4.16 | 80 | 1.9597 |
174
+ | 0.0152 | 4.42 | 85 | 2.0307 |
175
+ | 0.0154 | 4.68 | 90 | 2.0652 |
176
+ | 0.0147 | 4.94 | 95 | 2.0709 |
177
+
178
+
179
+ ### Framework versions
180
+
181
+ - PEFT 0.7.0
182
+ - Transformers 4.37.0.dev0
183
+ - Pytorch 2.0.1+cu117
184
+ - Datasets 2.16.1
185
+ - 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": "mistralai/Mistral-7B-v0.1",
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": 256,
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
+ "v_proj",
23
+ "o_proj",
24
+ "q_proj",
25
+ "down_proj",
26
+ "k_proj",
27
+ "up_proj",
28
+ "gate_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:634d8878b3da6612cd7ec3e3d7b96ab24c51f9bd88796e86160a4edbd60459db
3
+ size 1342338829
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "mistralai/Mistral-7B-v0.1",
3
+ "architectures": [
4
+ "MistralForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 4096,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 14336,
13
+ "max_position_embeddings": 32768,
14
+ "model_type": "mistral",
15
+ "num_attention_heads": 32,
16
+ "num_hidden_layers": 32,
17
+ "num_key_value_heads": 8,
18
+ "quantization_config": {
19
+ "bnb_4bit_compute_dtype": "bfloat16",
20
+ "bnb_4bit_quant_type": "nf4",
21
+ "bnb_4bit_use_double_quant": true,
22
+ "llm_int8_enable_fp32_cpu_offload": false,
23
+ "llm_int8_has_fp16_weight": false,
24
+ "llm_int8_skip_modules": null,
25
+ "llm_int8_threshold": 6.0,
26
+ "load_in_4bit": true,
27
+ "load_in_8bit": false,
28
+ "quant_method": "bitsandbytes"
29
+ },
30
+ "rms_norm_eps": 1e-05,
31
+ "rope_theta": 10000.0,
32
+ "sliding_window": 4096,
33
+ "tie_word_embeddings": false,
34
+ "torch_dtype": "bfloat16",
35
+ "transformers_version": "4.37.0.dev0",
36
+ "use_cache": false,
37
+ "vocab_size": 32000
38
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "</s>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
3
+ size 493443
tokenizer_config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ },
30
+ "additional_special_tokens": [],
31
+ "bos_token": "<s>",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "legacy": true,
35
+ "model_max_length": 1000000000000000019884624838656,
36
+ "pad_token": "</s>",
37
+ "sp_model_kwargs": {},
38
+ "spaces_between_special_tokens": false,
39
+ "tokenizer_class": "LlamaTokenizer",
40
+ "trust_remote_code": false,
41
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false,
43
+ "use_fast": true
44
+ }