dperezrada commited on
Commit
af9b961
1 Parent(s): 3d78ca4

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: peft
4
+ tags:
5
+ - axolotl
6
+ - generated_from_trainer
7
+ base_model: mistralai/Mistral-7B-v0.1
8
+ model-index:
9
+ - name: hc-mistral-alpaca
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.1`
20
+ ```yaml
21
+ base_model: mistralai/Mistral-7B-v0.1
22
+ model_type: MistralForCausalLM
23
+ tokenizer_type: LlamaTokenizer
24
+ is_mistral_derived_model: true
25
+
26
+ load_in_8bit: false
27
+ load_in_4bit: true
28
+ strict: false
29
+
30
+ lora_fan_in_fan_out: false
31
+ data_seed: 49
32
+ seed: 49
33
+
34
+ datasets:
35
+ - path: dperezrada/anonimizacion
36
+ type: sharegpt
37
+ conversation: alpaca
38
+ dataset_prepared_path: last_run_prepared
39
+ val_set_size: 0.1
40
+ output_dir: ./qlora-alpaca-out
41
+ hub_model_id: hamel/hc-mistral-alpaca
42
+
43
+ adapter: qlora
44
+ lora_model_dir:
45
+
46
+ sequence_len: 896
47
+ sample_packing: false
48
+ pad_to_sequence_len: true
49
+
50
+ lora_r: 32
51
+ lora_alpha: 16
52
+ lora_dropout: 0.05
53
+ lora_target_linear: true
54
+ lora_fan_in_fan_out:
55
+ lora_target_modules:
56
+ - gate_proj
57
+ - down_proj
58
+ - up_proj
59
+ - q_proj
60
+ - v_proj
61
+ - k_proj
62
+ - o_proj
63
+
64
+ wandb_project: anonimizacion
65
+ wandb_entity: danip
66
+
67
+ gradient_accumulation_steps: 4
68
+ micro_batch_size: 16
69
+ eval_batch_size: 16
70
+ num_epochs: 3
71
+ optimizer: adamw_bnb_8bit
72
+ lr_scheduler: cosine
73
+ learning_rate: 0.0002
74
+ max_grad_norm: 1.0
75
+ adam_beta2: 0.95
76
+ adam_epsilon: 0.00001
77
+ save_total_limit: 12
78
+
79
+ train_on_inputs: false
80
+ group_by_length: false
81
+ bf16: true
82
+ fp16: false
83
+ tf32: false
84
+
85
+ gradient_checkpointing: true
86
+ early_stopping_patience:
87
+ resume_from_checkpoint:
88
+ local_rank:
89
+ logging_steps: 1
90
+ xformers_attention:
91
+ flash_attention: true
92
+
93
+ loss_watchdog_threshold: 5.0
94
+ loss_watchdog_patience: 3
95
+
96
+ warmup_steps: 20
97
+ evals_per_epoch: 4
98
+ eval_table_size:
99
+ eval_table_max_new_tokens: 128
100
+ saves_per_epoch: 6
101
+ debug:
102
+ weight_decay: 0.0
103
+ fsdp:
104
+ fsdp_config:
105
+ special_tokens:
106
+ bos_token: "<s>"
107
+ eos_token: "</s>"
108
+ unk_token: "<unk>"
109
+ save_safetensors: true
110
+ ```
111
+
112
+ </details><br>
113
+
114
+ # hc-mistral-alpaca
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.0589
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: 49
141
+ - gradient_accumulation_steps: 4
142
+ - total_train_batch_size: 64
143
+ - optimizer: Adam with betas=(0.9,0.95) and epsilon=1e-05
144
+ - lr_scheduler_type: cosine
145
+ - lr_scheduler_warmup_steps: 20
146
+ - num_epochs: 3
147
+
148
+ ### Training results
149
+
150
+ | Training Loss | Epoch | Step | Validation Loss |
151
+ |:-------------:|:------:|:----:|:---------------:|
152
+ | 0.3137 | 0.0404 | 1 | 0.3809 |
153
+ | 0.237 | 0.2424 | 6 | 0.2093 |
154
+ | 0.0584 | 0.4848 | 12 | 0.0962 |
155
+ | 0.1121 | 0.7273 | 18 | 0.0775 |
156
+ | 0.0336 | 0.9697 | 24 | 0.0712 |
157
+ | 0.0237 | 1.2121 | 30 | 0.0682 |
158
+ | 0.0308 | 1.4545 | 36 | 0.0645 |
159
+ | 0.0929 | 1.6970 | 42 | 0.0647 |
160
+ | 0.0683 | 1.9394 | 48 | 0.0625 |
161
+ | 0.0158 | 2.1818 | 54 | 0.0597 |
162
+ | 0.021 | 2.4242 | 60 | 0.0589 |
163
+ | 0.0432 | 2.6667 | 66 | 0.0588 |
164
+ | 0.0436 | 2.9091 | 72 | 0.0589 |
165
+
166
+
167
+ ### Framework versions
168
+
169
+ - PEFT 0.11.1
170
+ - Transformers 4.41.1
171
+ - Pytorch 2.3.0+cu121
172
+ - Datasets 2.19.1
173
+ - 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
+ "k_proj",
24
+ "up_proj",
25
+ "v_proj",
26
+ "q_proj",
27
+ "o_proj",
28
+ "gate_proj",
29
+ "down_proj"
30
+ ],
31
+ "task_type": "CAUSAL_LM",
32
+ "use_dora": false,
33
+ "use_rslora": false
34
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a882c1d274d656dfdb1cbcef700322e1172da2d96f8411e35b18a449ad92e882
3
+ size 167832688
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.41.1",
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,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
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc22ab1b7c8761580302db5808bb9d5063589ad69a4c5f3f7a469f5b1c6ab279
3
+ size 6008