jeiku commited on
Commit
df9c2b8
1 Parent(s): f745f79

Upload 7 files

Browse files
README.md ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: FriezaForce/unranked_theory_of_mind_roleplay
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.5515
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.8421 | 0.06 | 1 | 1.8878 |
158
+ | 1.637 | 0.24 | 4 | 1.6567 |
159
+ | 1.7706 | 0.48 | 8 | 1.6450 |
160
+ | 1.7509 | 0.73 | 12 | 1.6757 |
161
+ | 1.4881 | 0.97 | 16 | 1.6913 |
162
+ | 0.6743 | 1.21 | 20 | 1.8874 |
163
+ | 0.6289 | 1.45 | 24 | 1.9861 |
164
+ | 0.582 | 1.7 | 28 | 1.9449 |
165
+ | 0.8624 | 1.94 | 32 | 1.8614 |
166
+ | 0.2466 | 2.18 | 36 | 2.3687 |
167
+ | 0.3151 | 2.42 | 40 | 2.3640 |
168
+ | 0.2263 | 2.67 | 44 | 2.1331 |
169
+ | 0.3841 | 2.91 | 48 | 2.2528 |
170
+ | 0.1032 | 3.15 | 52 | 2.3878 |
171
+ | 0.1015 | 3.39 | 56 | 2.5021 |
172
+ | 0.1185 | 3.64 | 60 | 2.3578 |
173
+ | 0.1111 | 3.88 | 64 | 2.3467 |
174
+ | 0.042 | 4.12 | 68 | 2.4165 |
175
+ | 0.0466 | 4.36 | 72 | 2.5006 |
176
+ | 0.0509 | 4.61 | 76 | 2.5430 |
177
+ | 0.0529 | 4.85 | 80 | 2.5515 |
178
+
179
+
180
+ ### Framework versions
181
+
182
+ - PEFT 0.7.0
183
+ - Transformers 4.37.0.dev0
184
+ - Pytorch 2.0.1+cu117
185
+ - Datasets 2.16.1
186
+ - 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
+ "down_proj",
23
+ "k_proj",
24
+ "gate_proj",
25
+ "v_proj",
26
+ "up_proj",
27
+ "o_proj",
28
+ "q_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:ade7680facd83408a158c024aa5bce172e988b6fdf93c8a323aff53ead097b45
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
+ }