dohonba commited on
Commit
a45c3ec
1 Parent(s): 9072ff7

Upload 7 files

Browse files
README.md ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: lora-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.4.0`
19
+ ```yaml
20
+ # Llama-2-7b
21
+ # base_model: daryl149/llama-2-7b-chat-hf
22
+ # model_type: LlamaForCausalLM
23
+ # tokenizer_type: LlamaTokenizer
24
+ # is_llama_derived_model: true
25
+
26
+ #Mistral-7b
27
+ base_model: mistralai/Mistral-7B-v0.1
28
+ model_type: MistralForCausalLM
29
+ tokenizer_type: LlamaTokenizer
30
+ is_mistral_derived_model: true
31
+
32
+ # accelerate launch -m axolotl.cli.train ./llama_7b_config.yaml
33
+
34
+ load_in_8bit: true
35
+ load_in_4bit: false
36
+ strict: false
37
+
38
+ datasets:
39
+ - path: dohonba/combi
40
+ type: context_qa.load_v2
41
+ # - path: dohonba/tfns
42
+ # type: context_qa.load_v2
43
+ # - path: dohonba/auditor_sentiment
44
+ # type: context_qa.load_v2
45
+ # - path: dohonba/tfns
46
+ # type: context_qa.load_v2
47
+
48
+ dataset_prepared_path:
49
+ val_set_size: 0.05
50
+ output_dir: ./lora-out
51
+
52
+ chat_template: chatml
53
+ default_system_message: You are a helpful assistant, specialising in financial text sentiment and emotional analysis. # Currently only supports chatml.
54
+
55
+ sequence_len: 512
56
+ sample_packing: true
57
+ pad_to_sequence_len: true
58
+
59
+ adapter: lora
60
+ lora_model_dir:
61
+ lora_r: 32
62
+ lora_alpha: 16
63
+ lora_dropout: 0.05
64
+ lora_target_linear: true
65
+ lora_fan_in_fan_out:
66
+
67
+ wandb_project:
68
+ wandb_entity:
69
+ wandb_watch:
70
+ wandb_name:
71
+ wandb_log_model:
72
+
73
+ gradient_accumulation_steps: 1
74
+ micro_batch_size: 16
75
+ # max_steps: 1000
76
+ num_epochs: 2
77
+ optimizer: adamw_bnb_8bit
78
+ lr_scheduler: cosine
79
+ learning_rate: 0.0002
80
+
81
+ train_on_inputs: false
82
+ group_by_length: false
83
+ bf16: auto
84
+ fp16:
85
+ tf32: false
86
+
87
+ gradient_checkpointing: true
88
+ early_stopping_patience:
89
+ resume_from_checkpoint:
90
+ local_rank:
91
+ logging_steps: 1
92
+ xformers_attention:
93
+ flash_attention: true
94
+ s2_attention:
95
+
96
+ warmup_steps: 50
97
+ evals_per_epoch: 2
98
+ eval_table_size:
99
+ eval_table_max_new_tokens: 128
100
+ saves_per_epoch: 1
101
+ debug:
102
+ deepspeed:
103
+ weight_decay: 0.0
104
+ fsdp:
105
+ fsdp_config:
106
+ special_tokens:
107
+ bos_token: "<s>"
108
+ eos_token: "</s>"
109
+ unk_token: "<unk>"
110
+ ```
111
+
112
+ </details><br>
113
+
114
+ # lora-out
115
+
116
+ 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.
117
+ It achieves the following results on the evaluation set:
118
+ - Loss: 0.0942
119
+
120
+ ## Model description
121
+
122
+ More information needed
123
+
124
+ ## Intended uses & limitations
125
+
126
+ More information needed
127
+
128
+ ## Training and evaluation data
129
+
130
+ More information needed
131
+
132
+ ## Training procedure
133
+
134
+ ### Training hyperparameters
135
+
136
+ The following hyperparameters were used during training:
137
+ - learning_rate: 0.0002
138
+ - train_batch_size: 16
139
+ - eval_batch_size: 16
140
+ - seed: 42
141
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
142
+ - lr_scheduler_type: cosine
143
+ - lr_scheduler_warmup_steps: 50
144
+ - num_epochs: 2
145
+
146
+ ### Training results
147
+
148
+ | Training Loss | Epoch | Step | Validation Loss |
149
+ |:-------------:|:-----:|:----:|:---------------:|
150
+ | 3.8894 | 0.0 | 1 | 3.9316 |
151
+ | 0.1106 | 0.5 | 247 | 0.1150 |
152
+ | 0.0956 | 1.0 | 494 | 0.0998 |
153
+ | 0.0705 | 1.48 | 741 | 0.0990 |
154
+ | 0.0858 | 1.98 | 988 | 0.0942 |
155
+
156
+
157
+ ### Framework versions
158
+
159
+ - PEFT 0.7.1
160
+ - Transformers 4.37.0
161
+ - Pytorch 2.0.1
162
+ - Datasets 2.16.1
163
+ - 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": 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": 32,
19
+ "rank_pattern": {},
20
+ "revision": null,
21
+ "target_modules": [
22
+ "up_proj",
23
+ "q_proj",
24
+ "down_proj",
25
+ "v_proj",
26
+ "o_proj",
27
+ "gate_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:fc7b054e6913ab8281151c4ba3ee1016c6930c443a8ea9aae2f778ae60f47ea9
3
+ size 335705741
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": "float32",
20
+ "bnb_4bit_quant_type": "fp4",
21
+ "bnb_4bit_use_double_quant": false,
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": false,
27
+ "load_in_8bit": true,
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",
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,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = 'You are a helpful assistant, specialising in financial text sentiment and emotional analysis.' %}{% endif %}{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in loop_messages %}{% if loop.index0 == 0 %}{{'<|im_start|>system\n' + system_message + '<|im_end|>\n'}}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
33
+ "clean_up_tokenization_spaces": false,
34
+ "eos_token": "</s>",
35
+ "legacy": true,
36
+ "model_max_length": 1000000000000000019884624838656,
37
+ "pad_token": "</s>",
38
+ "sp_model_kwargs": {},
39
+ "spaces_between_special_tokens": false,
40
+ "tokenizer_class": "LlamaTokenizer",
41
+ "trust_remote_code": false,
42
+ "unk_token": "<unk>",
43
+ "use_default_system_prompt": false,
44
+ "use_fast": true
45
+ }