robinhad commited on
Commit
682166c
1 Parent(s): 8e778fa

Upload 7 files

Browse files
README.md CHANGED
@@ -1,3 +1,170 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: mistralai/Mistral-7B-v0.1
3
+ library_name: peft
4
+ tags:
5
+ - generated_from_trainer
6
+ model-index:
7
+ - name: outputs/lora-out
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
+ should probably proofread and complete it, then remove this comment. -->
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.4.1`
18
+ ```yaml
19
+ base_model: mistralai/Mistral-7B-v0.1
20
+ model_type: MistralForCausalLM
21
+ tokenizer_type: LlamaTokenizer
22
+
23
+ load_in_8bit: false
24
+ load_in_4bit: true
25
+ strict: false
26
+
27
+ chat_template: chatml
28
+
29
+ datasets:
30
+ - path: /home/paniv/Projects/ualpaca2.json
31
+ type: chat_template
32
+ chat_template: chatml
33
+ field_messages: conversations
34
+ message_field_role: role
35
+ message_field_content: content
36
+ roles:
37
+ user:
38
+ - user
39
+ assistant:
40
+ - assistant
41
+
42
+
43
+ dataset_prepared_path: last_run_prepared
44
+ shuffle_merged_datasets: true
45
+ val_set_size: 0.02
46
+ output_dir: ./outputs/lora-out
47
+
48
+ adapter: qlora
49
+ lora_model_dir:
50
+
51
+ sequence_len: 8192
52
+ sample_packing: true
53
+ pad_to_sequence_len: true
54
+
55
+ lora_r: 32
56
+ lora_alpha: 16
57
+ lora_dropout: 0.05
58
+ lora_target_linear: true
59
+ lora_fan_in_fan_out:
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: UAlpaca2
70
+ wandb_entity:
71
+ wandb_watch:
72
+ wandb_name: full_train
73
+ wandb_log_model:
74
+
75
+ gradient_accumulation_steps: 4
76
+ micro_batch_size: 5
77
+ num_epochs: 1
78
+ optimizer: adamw_bnb_8bit
79
+ lr_scheduler: cosine
80
+ learning_rate: 0.0002
81
+
82
+ train_on_inputs: true
83
+ group_by_length: false
84
+ bf16: auto
85
+ fp16:
86
+ tf32: false
87
+
88
+ gradient_checkpointing: true
89
+ early_stopping_patience:
90
+ resume_from_checkpoint:
91
+ local_rank:
92
+ logging_steps: 1
93
+ xformers_attention:
94
+ flash_attention: true
95
+
96
+ loss_watchdog_threshold: 5.0
97
+ loss_watchdog_patience: 3
98
+
99
+ warmup_steps: 10
100
+ evals_per_epoch: 4
101
+ eval_table_size:
102
+ eval_max_new_tokens: 128
103
+ eval_sample_packing: false
104
+ saves_per_epoch: 1
105
+ debug:
106
+ deepspeed:
107
+ weight_decay: 0.0
108
+ fsdp:
109
+ fsdp_config:
110
+ special_tokens:
111
+
112
+ ```
113
+
114
+ </details><br>
115
+
116
+ [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="200" height="32"/>](https://wandb.ai/yurii-paniv/UAlpaca2/runs/dcxwtf2z)
117
+ # outputs/lora-out
118
+
119
+ 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.
120
+ It achieves the following results on the evaluation set:
121
+ - Loss: 0.5696
122
+
123
+ ## Model description
124
+
125
+ More information needed
126
+
127
+ ## Intended uses & limitations
128
+
129
+ More information needed
130
+
131
+ ## Training and evaluation data
132
+
133
+ More information needed
134
+
135
+ ## Training procedure
136
+
137
+ ### Training hyperparameters
138
+
139
+ The following hyperparameters were used during training:
140
+ - learning_rate: 0.0002
141
+ - train_batch_size: 5
142
+ - eval_batch_size: 5
143
+ - seed: 42
144
+ - distributed_type: multi-GPU
145
+ - num_devices: 2
146
+ - gradient_accumulation_steps: 4
147
+ - total_train_batch_size: 40
148
+ - total_eval_batch_size: 10
149
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
150
+ - lr_scheduler_type: cosine
151
+ - lr_scheduler_warmup_steps: 10
152
+ - num_epochs: 1
153
+
154
+ ### Training results
155
+
156
+ | Training Loss | Epoch | Step | Validation Loss |
157
+ |:-------------:|:------:|:----:|:---------------:|
158
+ | 1.3714 | 0.0091 | 1 | 2.5733 |
159
+ | 1.1049 | 0.2551 | 28 | 0.6542 |
160
+ | 1.0633 | 0.5103 | 56 | 0.5824 |
161
+ | 1.0023 | 0.7654 | 84 | 0.5696 |
162
+
163
+
164
+ ### Framework versions
165
+
166
+ - PEFT 0.11.1
167
+ - Transformers 4.42.3
168
+ - Pytorch 2.3.0+cu121
169
+ - Datasets 2.19.1
170
+ - Tokenizers 0.19.1
adapter_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "layer_replication": null,
10
+ "layers_pattern": null,
11
+ "layers_to_transform": null,
12
+ "loftq_config": {},
13
+ "lora_alpha": 16,
14
+ "lora_dropout": 0.05,
15
+ "megatron_config": null,
16
+ "megatron_core": "megatron.core",
17
+ "modules_to_save": null,
18
+ "peft_type": "LORA",
19
+ "r": 32,
20
+ "rank_pattern": {},
21
+ "revision": null,
22
+ "target_modules": [
23
+ "v_proj",
24
+ "gate_proj",
25
+ "o_proj",
26
+ "up_proj",
27
+ "k_proj",
28
+ "q_proj",
29
+ "down_proj"
30
+ ],
31
+ "task_type": "CAUSAL_LM",
32
+ "use_dora": false,
33
+ "use_rslora": false
34
+ }
adapter_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d60cd9755ccdbf176c4414dd03b5108b499a2ae5aa4dbd4d7c96e09a46126249
3
+ size 167934026
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "_load_in_4bit": true,
20
+ "_load_in_8bit": false,
21
+ "bnb_4bit_compute_dtype": "bfloat16",
22
+ "bnb_4bit_quant_storage": "bfloat16",
23
+ "bnb_4bit_quant_type": "nf4",
24
+ "bnb_4bit_use_double_quant": true,
25
+ "llm_int8_enable_fp32_cpu_offload": false,
26
+ "llm_int8_has_fp16_weight": false,
27
+ "llm_int8_skip_modules": null,
28
+ "llm_int8_threshold": 6.0,
29
+ "load_in_4bit": true,
30
+ "load_in_8bit": false,
31
+ "quant_method": "bitsandbytes"
32
+ },
33
+ "rms_norm_eps": 1e-05,
34
+ "rope_theta": 10000.0,
35
+ "sliding_window": 4096,
36
+ "tie_word_embeddings": false,
37
+ "torch_dtype": "bfloat16",
38
+ "transformers_version": "4.42.3",
39
+ "use_cache": false,
40
+ "vocab_size": 32000
41
+ }
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": null,
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": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "</s>",
36
+ "legacy": false,
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
+ }