ToastyPigeon
commited on
Commit
•
829c29a
1
Parent(s):
c422693
Training in progress, epoch 1
Browse files- .gitattributes +1 -0
- README.md +194 -0
- adapter_config.json +34 -0
- adapter_model.safetensors +3 -0
- config.json +42 -0
- special_tokens_map.json +30 -0
- tokenizer.json +3 -0
- tokenizer_config.json +0 -0
- training_args.bin +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: unsloth/Mistral-Nemo-Base-2407
|
3 |
+
library_name: peft
|
4 |
+
license: apache-2.0
|
5 |
+
tags:
|
6 |
+
- axolotl
|
7 |
+
- generated_from_trainer
|
8 |
+
model-index:
|
9 |
+
- name: mn-inf-qlora
|
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/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl)
|
17 |
+
<details><summary>See axolotl config</summary>
|
18 |
+
|
19 |
+
axolotl version: `0.4.1`
|
20 |
+
```yaml
|
21 |
+
# Set up for use on 2x24gb cards
|
22 |
+
# huggingface-cli login --token $hf_key && wandb login $wandb_key
|
23 |
+
# python -m axolotl.cli.preprocess mn-inf-lora.yml
|
24 |
+
# accelerate launch -m axolotl.cli.train mn-inf-lora.yml
|
25 |
+
# python -m axolotl.cli.merge_lora ms-adventure-s.yml
|
26 |
+
# huggingface-cli upload ToastyPigeon/ms-type1-adventure-s adventure-workspace/merged . --private
|
27 |
+
|
28 |
+
base_model: unsloth/Mistral-Nemo-Base-2407
|
29 |
+
model_type: AutoModelForCausalLM
|
30 |
+
tokenizer_type: AutoTokenizer
|
31 |
+
|
32 |
+
load_in_8bit: false
|
33 |
+
load_in_4bit: true
|
34 |
+
strict: false
|
35 |
+
sequence_len: 8192 # 99% vram
|
36 |
+
min_sample_len: 128
|
37 |
+
bf16: true
|
38 |
+
fp16:
|
39 |
+
tf32: false
|
40 |
+
flash_attention: true
|
41 |
+
special_tokens:
|
42 |
+
|
43 |
+
# Data
|
44 |
+
dataset_prepared_path: last_run_prepared
|
45 |
+
datasets:
|
46 |
+
- path: botmall/bodinforg-completions
|
47 |
+
type: completion
|
48 |
+
warmup_steps: 20
|
49 |
+
shuffle_merged_datasets: true
|
50 |
+
|
51 |
+
save_safetensors: true
|
52 |
+
|
53 |
+
# WandB
|
54 |
+
wandb_project: Mistral-Nemo-Inflation
|
55 |
+
wandb_entity:
|
56 |
+
|
57 |
+
# Iterations
|
58 |
+
num_epochs: 1
|
59 |
+
|
60 |
+
# Output
|
61 |
+
output_dir: ./adventure-workspace
|
62 |
+
hub_model_id: botmall/mn-inf-qlora
|
63 |
+
hub_strategy: "checkpoint"
|
64 |
+
|
65 |
+
# Sampling
|
66 |
+
sample_packing: true
|
67 |
+
pad_to_sequence_len: true
|
68 |
+
|
69 |
+
# Batching
|
70 |
+
gradient_accumulation_steps: 1
|
71 |
+
micro_batch_size: 1
|
72 |
+
eval_batch_size: 1
|
73 |
+
gradient_checkpointing: 'unsloth'
|
74 |
+
gradient_checkpointing_kwargs:
|
75 |
+
use_reentrant: true
|
76 |
+
|
77 |
+
unsloth_cross_entropy_loss: true
|
78 |
+
#unsloth_lora_mlp: true
|
79 |
+
#unsloth_lora_qkv: true
|
80 |
+
#unsloth_lora_o: true
|
81 |
+
|
82 |
+
# Evaluation
|
83 |
+
val_set_size: 40
|
84 |
+
evals_per_epoch: 5
|
85 |
+
eval_table_size:
|
86 |
+
eval_max_new_tokens: 256
|
87 |
+
eval_sample_packing: false
|
88 |
+
|
89 |
+
# LoRA
|
90 |
+
adapter: qlora
|
91 |
+
lora_model_dir:
|
92 |
+
lora_r: 32
|
93 |
+
lora_alpha: 64
|
94 |
+
lora_dropout: 0.1
|
95 |
+
lora_target_linear:
|
96 |
+
lora_fan_in_fan_out:
|
97 |
+
lora_target_modules:
|
98 |
+
- gate_proj
|
99 |
+
- down_proj
|
100 |
+
- up_proj
|
101 |
+
- q_proj
|
102 |
+
- v_proj
|
103 |
+
- k_proj
|
104 |
+
- o_proj
|
105 |
+
lora_modules_to_save:
|
106 |
+
|
107 |
+
# Optimizer
|
108 |
+
optimizer: paged_adamw_8bit # adamw_8bit
|
109 |
+
lr_scheduler: cosine
|
110 |
+
learning_rate: 0.0001
|
111 |
+
cosine_min_lr_ratio: 0.1
|
112 |
+
weight_decay: 0.01
|
113 |
+
max_grad_norm: 10.0
|
114 |
+
|
115 |
+
# Misc
|
116 |
+
train_on_inputs: false
|
117 |
+
group_by_length: false
|
118 |
+
early_stopping_patience:
|
119 |
+
local_rank:
|
120 |
+
logging_steps: 1
|
121 |
+
xformers_attention:
|
122 |
+
debug:
|
123 |
+
deepspeed: /workspace/axolotl/deepspeed_configs/zero3.json # previously blank
|
124 |
+
fsdp:
|
125 |
+
fsdp_config:
|
126 |
+
|
127 |
+
# Checkpoints
|
128 |
+
resume_from_checkpoint:
|
129 |
+
saves_per_epoch: 1
|
130 |
+
|
131 |
+
plugins:
|
132 |
+
- axolotl.integrations.liger.LigerPlugin
|
133 |
+
liger_rope: true
|
134 |
+
liger_rms_norm: true
|
135 |
+
liger_swiglu: true
|
136 |
+
liger_fused_linear_cross_entropy: true
|
137 |
+
```
|
138 |
+
|
139 |
+
</details><br>
|
140 |
+
|
141 |
+
# mn-inf-qlora
|
142 |
+
|
143 |
+
This model is a fine-tuned version of [unsloth/Mistral-Nemo-Base-2407](https://huggingface.co/unsloth/Mistral-Nemo-Base-2407) on the None dataset.
|
144 |
+
It achieves the following results on the evaluation set:
|
145 |
+
- Loss: 2.2226
|
146 |
+
|
147 |
+
## Model description
|
148 |
+
|
149 |
+
More information needed
|
150 |
+
|
151 |
+
## Intended uses & limitations
|
152 |
+
|
153 |
+
More information needed
|
154 |
+
|
155 |
+
## Training and evaluation data
|
156 |
+
|
157 |
+
More information needed
|
158 |
+
|
159 |
+
## Training procedure
|
160 |
+
|
161 |
+
### Training hyperparameters
|
162 |
+
|
163 |
+
The following hyperparameters were used during training:
|
164 |
+
- learning_rate: 0.0001
|
165 |
+
- train_batch_size: 1
|
166 |
+
- eval_batch_size: 1
|
167 |
+
- seed: 42
|
168 |
+
- distributed_type: multi-GPU
|
169 |
+
- num_devices: 2
|
170 |
+
- total_train_batch_size: 2
|
171 |
+
- total_eval_batch_size: 2
|
172 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
173 |
+
- lr_scheduler_type: cosine
|
174 |
+
- lr_scheduler_warmup_steps: 20
|
175 |
+
- num_epochs: 1
|
176 |
+
|
177 |
+
### Training results
|
178 |
+
|
179 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
180 |
+
|:-------------:|:------:|:----:|:---------------:|
|
181 |
+
| 2.2853 | 0.0057 | 1 | 2.3231 |
|
182 |
+
| 2.2576 | 0.2102 | 37 | 2.2478 |
|
183 |
+
| 2.1671 | 0.4205 | 74 | 2.2352 |
|
184 |
+
| 2.2319 | 0.6307 | 111 | 2.2259 |
|
185 |
+
| 2.174 | 0.8409 | 148 | 2.2226 |
|
186 |
+
|
187 |
+
|
188 |
+
### Framework versions
|
189 |
+
|
190 |
+
- PEFT 0.13.0
|
191 |
+
- Transformers 4.45.1
|
192 |
+
- Pytorch 2.3.1+cu121
|
193 |
+
- Datasets 2.21.0
|
194 |
+
- Tokenizers 0.20.0
|
adapter_config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "inflatebot/MN-12B-Mag-Mell-R1",
|
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": 64,
|
14 |
+
"lora_dropout": 0.1,
|
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 |
+
"up_proj",
|
24 |
+
"gate_proj",
|
25 |
+
"q_proj",
|
26 |
+
"o_proj",
|
27 |
+
"down_proj",
|
28 |
+
"v_proj",
|
29 |
+
"k_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:c01cbf065547f2ab6915a565e816f5afcf4b7ea7de7675676becd6ec768b42f0
|
3 |
+
size 228141160
|
config.json
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "inflatebot/MN-12B-Mag-Mell-R1",
|
3 |
+
"architectures": [
|
4 |
+
"MistralForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 1,
|
8 |
+
"eos_token_id": 15,
|
9 |
+
"head_dim": 128,
|
10 |
+
"hidden_act": "silu",
|
11 |
+
"hidden_size": 5120,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 14336,
|
14 |
+
"max_position_embeddings": 1024000,
|
15 |
+
"model_type": "mistral",
|
16 |
+
"num_attention_heads": 32,
|
17 |
+
"num_hidden_layers": 40,
|
18 |
+
"num_key_value_heads": 8,
|
19 |
+
"quantization_config": {
|
20 |
+
"_load_in_4bit": true,
|
21 |
+
"_load_in_8bit": false,
|
22 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
23 |
+
"bnb_4bit_quant_storage": "bfloat16",
|
24 |
+
"bnb_4bit_quant_type": "nf4",
|
25 |
+
"bnb_4bit_use_double_quant": true,
|
26 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
27 |
+
"llm_int8_has_fp16_weight": false,
|
28 |
+
"llm_int8_skip_modules": null,
|
29 |
+
"llm_int8_threshold": 6.0,
|
30 |
+
"load_in_4bit": true,
|
31 |
+
"load_in_8bit": false,
|
32 |
+
"quant_method": "bitsandbytes"
|
33 |
+
},
|
34 |
+
"rms_norm_eps": 1e-05,
|
35 |
+
"rope_theta": 1000000.0,
|
36 |
+
"sliding_window": null,
|
37 |
+
"tie_word_embeddings": false,
|
38 |
+
"torch_dtype": "bfloat16",
|
39 |
+
"transformers_version": "4.45.1",
|
40 |
+
"use_cache": false,
|
41 |
+
"vocab_size": 131072
|
42 |
+
}
|
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": "<|im_end|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "<pad>",
|
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 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4b4c8fcd33487a449c07f423d47adb035bba8347ccf13eb074b4d1fef8acf919
|
3 |
+
size 17078288
|
tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c44a0f2c9d2ec98f44eb784396ebb6d033f0108a4702e31b64f27d55e6df44d
|
3 |
+
size 8184
|