3v324v23 commited on
Commit
e4941ff
·
1 Parent(s): fae2772
adapter/README.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: peft
4
+ tags:
5
+ - generated_from_trainer
6
+ base_model: Lambent/cosmoem-4x1b
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
+ base_model: Lambent/cosmoem-4x1b
21
+ model_type: AutoModelForCausalLM
22
+ tokenizer_type: LlamaTokenizer
23
+ trust_remote_code: true
24
+
25
+ load_in_8bit: false
26
+ load_in_4bit: false
27
+ strict: false
28
+
29
+ datasets:
30
+ - path: vicgalle/alpaca-gpt4
31
+ type: alpaca
32
+ dataset_prepared_path: prepared-alpaca
33
+ val_set_size: 0.05
34
+ output_dir: ./lora-out
35
+
36
+ sequence_len: 2048
37
+ sample_packing: true
38
+ eval_sample_packing: false
39
+ pad_to_sequence_len: true
40
+
41
+ adapter: lora
42
+ lora_model_dir:
43
+ lora_r: 128
44
+ lora_alpha: 16
45
+ lora_dropout: 0.1
46
+ lora_target_linear: true
47
+ lora_fan_in_fan_out:
48
+
49
+ wandb_project: CosMoE-AlpacaLight-v0.61
50
+ wandb_entity:
51
+ wandb_watch:
52
+ wandb_name:
53
+ wandb_log_model:
54
+
55
+ gradient_accumulation_steps: 1
56
+ micro_batch_size: 4
57
+ num_epochs: 1
58
+ optimizer: adamw_bnb_8bit
59
+ lr_scheduler: cosine
60
+ learning_rate: 0.001
61
+
62
+ lora_target_modules:
63
+ - q_proj
64
+ - k_proj
65
+ - v_proj
66
+ - o_proj
67
+ - w1
68
+ - w2
69
+ - w3
70
+
71
+ train_on_inputs: false
72
+ group_by_length: false
73
+ bf16: auto
74
+ fp16:
75
+ tf32: false
76
+
77
+ gradient_checkpointing: true
78
+ early_stopping_patience:
79
+ resume_from_checkpoint:
80
+ local_rank:
81
+ logging_steps: 1
82
+ xformers_attention:
83
+ flash_attention: true
84
+
85
+ loss_watchdog_threshold: 2.0
86
+ loss_watchdog_patience: 3
87
+
88
+ warmup_steps: 20
89
+ evals_per_epoch: 4
90
+ saves_per_epoch: 1
91
+ debug:
92
+ deepspeed:
93
+ weight_decay: 0.002
94
+ fsdp:
95
+ fsdp_config:
96
+ special_tokens:
97
+
98
+ ```
99
+
100
+ </details><br>
101
+
102
+ # lora-out
103
+
104
+ This model is a fine-tuned version of [Lambent/cosmoem-4x1b](https://huggingface.co/Lambent/cosmoem-4x1b) on the None dataset.
105
+ It achieves the following results on the evaluation set:
106
+ - Loss: 1.0477
107
+
108
+ ## Model description
109
+
110
+ More information needed
111
+
112
+ ## Intended uses & limitations
113
+
114
+ More information needed
115
+
116
+ ## Training and evaluation data
117
+
118
+ More information needed
119
+
120
+ ## Training procedure
121
+
122
+ ### Training hyperparameters
123
+
124
+ The following hyperparameters were used during training:
125
+ - learning_rate: 0.001
126
+ - train_batch_size: 4
127
+ - eval_batch_size: 4
128
+ - seed: 42
129
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
130
+ - lr_scheduler_type: cosine
131
+ - lr_scheduler_warmup_steps: 20
132
+ - num_epochs: 1
133
+
134
+ ### Training results
135
+
136
+ | Training Loss | Epoch | Step | Validation Loss |
137
+ |:-------------:|:-----:|:----:|:---------------:|
138
+ | 1.1791 | 0.0 | 1 | 1.3304 |
139
+ | 1.0505 | 0.25 | 325 | 1.0720 |
140
+ | 0.9862 | 0.5 | 650 | 1.0589 |
141
+ | 1.057 | 0.75 | 975 | 1.0477 |
142
+
143
+
144
+ ### Framework versions
145
+
146
+ - PEFT 0.9.0
147
+ - Transformers 4.40.0.dev0
148
+ - Pytorch 2.1.2+cu118
149
+ - Datasets 2.18.0
150
+ - Tokenizers 0.15.0
adapter/adapter_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "Lambent/cosmoem-4x1b",
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.1,
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
+ "w2",
23
+ "w1",
24
+ "gate",
25
+ "v_proj",
26
+ "k_proj",
27
+ "w3",
28
+ "o_proj",
29
+ "q_proj"
30
+ ],
31
+ "task_type": "CAUSAL_LM",
32
+ "use_dora": false,
33
+ "use_rslora": false
34
+ }
adapter/adapter_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1da603c7241eaca7ec0faa913dbc2c5ab28d800e43a084447db858f224ecb33
3
+ size 881156938
adapter/config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Lambent/cosmoem-4x1b",
3
+ "architectures": [
4
+ "MixtralForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 1,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 8192,
14
+ "max_position_embeddings": 2048,
15
+ "model_type": "mixtral",
16
+ "num_attention_heads": 16,
17
+ "num_experts_per_tok": 2,
18
+ "num_hidden_layers": 24,
19
+ "num_key_value_heads": 16,
20
+ "num_local_experts": 4,
21
+ "output_router_logits": false,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_scaling": null,
25
+ "rope_theta": 10000.0,
26
+ "router_aux_loss_coef": 0.001,
27
+ "sliding_window": null,
28
+ "tie_word_embeddings": false,
29
+ "torch_dtype": "bfloat16",
30
+ "transformers_version": "4.40.0.dev0",
31
+ "use_cache": false,
32
+ "vocab_size": 32000
33
+ }
adapter/special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": {
17
+ "content": "<s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
adapter/tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
3
+ size 493443
adapter/tokenizer_config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "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
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false,
43
+ "use_fast": true
44
+ }