liuylhf commited on
Commit
6339106
·
verified ·
1 Parent(s): 2e2eff0

Training in progress, step 7

Browse files
README.md ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: peft
4
+ tags:
5
+ - axolotl
6
+ - generated_from_trainer
7
+ base_model: mistralai/Mixtral-8x7B-Instruct-v0.1
8
+ model-index:
9
+ - name: mixtral-lora
10
+ results: []
11
+ ---
12
+
13
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
+ should probably proofread and complete it, then remove this comment. -->
15
+
16
+ [<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)
17
+ <details><summary>See axolotl config</summary>
18
+
19
+ axolotl version: `0.4.0`
20
+ ```yaml
21
+ base_model: mistralai/Mixtral-8x7B-Instruct-v0.1
22
+ model_type: AutoModelForCausalLM
23
+ tokenizer_type: LlamaTokenizer
24
+ is_mistral_derived_model: true
25
+ load_in_8bit: false
26
+ load_in_4bit: true
27
+ strict: false
28
+ chat_template: inst
29
+
30
+ datasets:
31
+ datasets:
32
+ - path: ./data/raw_format/tool_used_training.jsonl
33
+ type: sharegpt
34
+ conversation: mistral
35
+ - path: ./data/raw_format/tool_not_used_training.jsonl
36
+ type: sharegpt
37
+ conversation: mistral
38
+ - path: ./data/raw_format/no_tools_training.jsonl
39
+ type: sharegpt
40
+ conversation: mistral
41
+
42
+ dataset_prepared_path: last_run_prepared
43
+ val_set_size: 0.01
44
+ output_dir: ../../text-generation-webui/loras/mixtral-instruct-raw-data-v3-inst
45
+
46
+ adapter: qlora
47
+ lora_model_dir:
48
+
49
+ sequence_len: 4096
50
+ sample_packing: true
51
+ pad_to_sequence_len: true
52
+
53
+ lora_r: 16
54
+ lora_alpha: 16
55
+ lora_dropout: 0.05
56
+ lora_target_linear: true
57
+ lora_fan_in_fan_out:
58
+ hub_model_id: liuylhf/mixtral-lora
59
+
60
+ # lora_target_modules:
61
+ # - gate_proj
62
+ # - down_proj
63
+ # - up_proj
64
+ # - q_proj
65
+ # - v_proj
66
+ # - k_proj
67
+ # - o_proj
68
+
69
+ wandb_project: function-call
70
+ wandb_name: mixtral-instruct-raw-data-v3
71
+ wandb_log_model: end
72
+
73
+ gradient_accumulation_steps: 4
74
+ micro_batch_size: 2
75
+ num_epochs: 0.5
76
+ optimizer: paged_adamw_8bit
77
+ lr_scheduler: cosine
78
+ learning_rate: 0.001
79
+ adam_beta2: 0.95
80
+ adam_epsilon: 0.00001
81
+ max_grad_norm: 1.0
82
+
83
+ train_on_inputs: false
84
+ group_by_length: false
85
+ bf16: auto
86
+ fp16:
87
+ tf32: false
88
+
89
+ gradient_checkpointing: true
90
+ early_stopping_patience:
91
+ resume_from_checkpoint:
92
+ local_rank:
93
+ logging_steps: 1
94
+ xformers_attention:
95
+ flash_attention: true
96
+
97
+ # loss_watchdog_threshold: 5.0
98
+ # loss_watchdog_patience: 3
99
+
100
+ warmup_steps: 10
101
+ # evals_per_epoch: 20
102
+ eval_steps: 0.1
103
+ save_steps: 0.1
104
+ eval_table_size:
105
+ eval_max_new_tokens: 256
106
+ # saves_per_epoch: 1
107
+ debug:
108
+ deepspeed:
109
+ weight_decay: 1.0
110
+ fsdp:
111
+ fsdp_config:
112
+ ```
113
+
114
+ </details><br>
115
+
116
+ # mixtral-lora
117
+
118
+ This model is a fine-tuned version of [mistralai/Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) on the None dataset.
119
+ It achieves the following results on the evaluation set:
120
+ - Loss: 0.1923
121
+
122
+ ## Model description
123
+
124
+ More information needed
125
+
126
+ ## Intended uses & limitations
127
+
128
+ More information needed
129
+
130
+ ## Training and evaluation data
131
+
132
+ More information needed
133
+
134
+ ## Training procedure
135
+
136
+ ### Training hyperparameters
137
+
138
+ The following hyperparameters were used during training:
139
+ - learning_rate: 0.001
140
+ - train_batch_size: 2
141
+ - eval_batch_size: 2
142
+ - seed: 42
143
+ - distributed_type: multi-GPU
144
+ - num_devices: 2
145
+ - gradient_accumulation_steps: 4
146
+ - total_train_batch_size: 16
147
+ - total_eval_batch_size: 4
148
+ - optimizer: Adam with betas=(0.9,0.95) and epsilon=1e-05
149
+ - lr_scheduler_type: cosine
150
+ - lr_scheduler_warmup_steps: 10
151
+ - num_epochs: 0.5
152
+
153
+ ### Training results
154
+
155
+ | Training Loss | Epoch | Step | Validation Loss |
156
+ |:-------------:|:-----:|:----:|:---------------:|
157
+ | 3.2966 | 0.0 | 1 | 3.2222 |
158
+ | 0.3736 | 0.05 | 16 | 0.3541 |
159
+ | 0.1777 | 0.1 | 32 | 0.2357 |
160
+ | 0.2366 | 0.16 | 48 | 0.2154 |
161
+ | 0.1917 | 0.21 | 64 | 0.2056 |
162
+ | 0.2213 | 0.26 | 80 | 0.2003 |
163
+ | 0.149 | 0.31 | 96 | 0.1972 |
164
+ | 0.1739 | 0.37 | 112 | 0.1950 |
165
+ | 0.1668 | 0.42 | 128 | 0.1928 |
166
+ | 0.0997 | 0.47 | 144 | 0.1923 |
167
+
168
+
169
+ ### Framework versions
170
+
171
+ - PEFT 0.8.2
172
+ - Transformers 4.39.0.dev0
173
+ - Pytorch 2.2.0+cu121
174
+ - Datasets 2.17.1
175
+ - Tokenizers 0.15.0
adapter_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "mistralai/Mixtral-8x7B-Instruct-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": 16,
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": 16,
19
+ "rank_pattern": {},
20
+ "revision": null,
21
+ "target_modules": [
22
+ "k_proj",
23
+ "v_proj",
24
+ "o_proj",
25
+ "q_proj"
26
+ ],
27
+ "task_type": "CAUSAL_LM",
28
+ "use_rslora": false
29
+ }
adapter_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1d3a819fc09188e77e001a02e4d76369078a73386bcd5cc3d3b6c0d16f05425
3
+ size 969596450
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:307933dd5d74c96b5723ce0a24b9c7c1ac0b34b65b711c5b3307718cd529fd98
3
+ size 54560368
config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "mistralai/Mixtral-8x7B-Instruct-v0.1",
3
+ "architectures": [
4
+ "MixtralForCausalLM"
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": "mixtral",
15
+ "num_attention_heads": 32,
16
+ "num_experts_per_tok": 2,
17
+ "num_hidden_layers": 32,
18
+ "num_key_value_heads": 8,
19
+ "num_local_experts": 8,
20
+ "output_router_logits": false,
21
+ "quantization_config": {
22
+ "_load_in_4bit": true,
23
+ "_load_in_8bit": false,
24
+ "bnb_4bit_compute_dtype": "bfloat16",
25
+ "bnb_4bit_quant_type": "nf4",
26
+ "bnb_4bit_use_double_quant": true,
27
+ "llm_int8_enable_fp32_cpu_offload": false,
28
+ "llm_int8_has_fp16_weight": false,
29
+ "llm_int8_skip_modules": null,
30
+ "llm_int8_threshold": 6.0,
31
+ "load_in_4bit": true,
32
+ "load_in_8bit": false,
33
+ "quant_method": "bitsandbytes"
34
+ },
35
+ "rms_norm_eps": 1e-05,
36
+ "rope_theta": 1000000.0,
37
+ "router_aux_loss_coef": 0.02,
38
+ "sliding_window": null,
39
+ "tie_word_embeddings": false,
40
+ "torch_dtype": "bfloat16",
41
+ "transformers_version": "4.39.0.dev0",
42
+ "use_cache": false,
43
+ "vocab_size": 32000
44
+ }
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,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "additional_special_tokens": [],
32
+ "bos_token": "<s>",
33
+ "chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}",
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "</s>",
36
+ "legacy": true,
37
+ "model_max_length": 1000000000000000019884624838656,
38
+ "pad_token": "</s>",
39
+ "sp_model_kwargs": {},
40
+ "spaces_between_special_tokens": false,
41
+ "tokenizer_class": "LlamaTokenizer",
42
+ "unk_token": "<unk>",
43
+ "use_default_system_prompt": false,
44
+ "use_fast": true
45
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49a4507c0a7fa5ace37d5264a12a523497d49f9a6ac3c7578d225d933fea3617
3
+ size 5752