ping98k commited on
Commit
1c6b9eb
1 Parent(s): ef62bd2

Upload 7 files

Browse files
README.md ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: peft
3
+ tags:
4
+ - generated_from_trainer
5
+ base_model: scb10x/typhoon-7b
6
+ model-index:
7
+ - name: work/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.0`
18
+ ```yaml
19
+ base_model: ./models/scb10x_typhoon-7b
20
+ model_type: MistralForCausalLM
21
+ tokenizer_type: LlamaTokenizer
22
+ is_mistral_derived_model: true
23
+
24
+ load_in_8bit: false
25
+ load_in_4bit: true
26
+ strict: false
27
+
28
+
29
+ datasets:
30
+ - path: ./work/thai_food.json
31
+ type: completion
32
+
33
+ dataset_prepared_path: ./work/last_run_prepared
34
+ val_set_size: 0.1
35
+ output_dir: ./work/out
36
+
37
+ # lora_modules_to_save:
38
+ # - embed_tokens
39
+ # - lm_head
40
+
41
+
42
+ adapter: qlora
43
+ lora_model_dir:
44
+
45
+ sequence_len: 4096
46
+ sample_packing: false
47
+ eval_sample_packing: false
48
+ pad_to_sequence_len: true
49
+
50
+ gpu_memory_limit: 20
51
+
52
+ lora_r: 64
53
+ lora_alpha: 16
54
+ lora_dropout: 0.05
55
+ lora_target_linear: true
56
+ lora_fan_in_fan_out:
57
+
58
+
59
+ wandb_project: typhoon-7b
60
+ wandb_entity:
61
+ wandb_watch:
62
+ wandb_name:
63
+ wandb_log_model:
64
+
65
+ gradient_accumulation_steps: 4
66
+ micro_batch_size: 2
67
+ num_epochs: 3
68
+ optimizer: paged_adamw_8bit
69
+ lr_scheduler: cosine
70
+ learning_rate: 0.0004
71
+
72
+ train_on_inputs: false
73
+ group_by_length: false
74
+ bf16: true
75
+ fp16: false
76
+ tf32: false
77
+
78
+ gradient_checkpointing: true
79
+ early_stopping_patience: 3
80
+ resume_from_checkpoint: false
81
+ local_rank:
82
+ logging_steps: 1
83
+ xformers_attention:
84
+ flash_attention: true
85
+
86
+ # loss_watchdog_threshold: 5.0
87
+ # loss_watchdog_patience: 3
88
+
89
+ warmup_ratio: 0.01
90
+ # evals_per_epoch: 10
91
+ eval_steps: 2
92
+ eval_table_size:
93
+ eval_table_max_new_tokens: 128
94
+ # saves_per_epoch: 10
95
+ save_steps: 2
96
+ save_total_limit: 20
97
+ debug:
98
+ deepspeed:
99
+ weight_decay: 0.0
100
+ fsdp:
101
+ fsdp_config:
102
+ ```
103
+
104
+ </details><br>
105
+
106
+ # work/out
107
+
108
+ This model was trained from scratch on the None dataset.
109
+ It achieves the following results on the evaluation set:
110
+ - Loss: 1.9505
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
+ ### Training hyperparameters
127
+
128
+ The following hyperparameters were used during training:
129
+ - learning_rate: 0.0004
130
+ - train_batch_size: 2
131
+ - eval_batch_size: 2
132
+ - seed: 42
133
+ - gradient_accumulation_steps: 4
134
+ - total_train_batch_size: 8
135
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
136
+ - lr_scheduler_type: cosine
137
+ - num_epochs: 3
138
+
139
+ ### Training results
140
+
141
+ | Training Loss | Epoch | Step | Validation Loss |
142
+ |:-------------:|:-----:|:----:|:---------------:|
143
+ | 2.8268 | 0.13 | 2 | 2.4822 |
144
+ | 2.4085 | 0.25 | 4 | 2.2715 |
145
+ | 2.2752 | 0.38 | 6 | 2.1985 |
146
+ | 2.4104 | 0.51 | 8 | 2.1000 |
147
+ | 2.0149 | 0.63 | 10 | 2.0255 |
148
+ | 2.1234 | 0.76 | 12 | 1.9926 |
149
+ | 2.2013 | 0.89 | 14 | 1.9894 |
150
+ | 1.8355 | 1.02 | 16 | 1.9684 |
151
+ | 1.4604 | 1.14 | 18 | 1.9610 |
152
+ | 1.6539 | 1.27 | 20 | 1.9517 |
153
+ | 1.5531 | 1.4 | 22 | 1.9414 |
154
+ | 1.4649 | 1.52 | 24 | 1.9230 |
155
+ | 1.464 | 1.65 | 26 | 1.9214 |
156
+ | 1.3731 | 1.78 | 28 | 1.9116 |
157
+ | 1.4451 | 1.9 | 30 | 1.8922 |
158
+ | 1.3635 | 2.03 | 32 | 1.8885 |
159
+ | 1.1453 | 2.16 | 34 | 1.9034 |
160
+ | 1.0397 | 2.29 | 36 | 1.9281 |
161
+ | 0.9735 | 2.41 | 38 | 1.9505 |
162
+
163
+
164
+ ### Framework versions
165
+
166
+ - PEFT 0.7.1
167
+ - Transformers 4.37.0
168
+ - Pytorch 2.0.1+cu118
169
+ - Datasets 2.16.1
170
+ - 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": "./models/scb10x_typhoon-7b",
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": 64,
19
+ "rank_pattern": {},
20
+ "revision": null,
21
+ "target_modules": [
22
+ "q_proj",
23
+ "up_proj",
24
+ "k_proj",
25
+ "down_proj",
26
+ "o_proj",
27
+ "gate_proj",
28
+ "v_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:03e262df2fbd5583ddf1060b53369dd29106bbe6c0beb7569b79631967488afe
3
+ size 671250189
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "./models/scb10x_typhoon-7b",
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",
36
+ "use_cache": false,
37
+ "vocab_size": 35219
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:ba0260fe22b9efe79df479f2619890767ab9c44912142f21648f1980c32297ed
3
+ size 562945
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": true,
43
+ "use_fast": true
44
+ }