Model save
Browse files
README.md
ADDED
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: peft
|
3 |
+
license: apache-2.0
|
4 |
+
base_model: Qwen/Qwen2.5-7B-Instruct
|
5 |
+
tags:
|
6 |
+
- axolotl
|
7 |
+
- generated_from_trainer
|
8 |
+
datasets:
|
9 |
+
- medalpaca/medical_meadow_medqa
|
10 |
+
model-index:
|
11 |
+
- name: qwen-lora-fsdp
|
12 |
+
results: []
|
13 |
+
---
|
14 |
+
|
15 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
16 |
+
should probably proofread and complete it, then remove this comment. -->
|
17 |
+
|
18 |
+
[<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)
|
19 |
+
<details><summary>See axolotl config</summary>
|
20 |
+
|
21 |
+
axolotl version: `0.6.0`
|
22 |
+
```yaml
|
23 |
+
base_model: Qwen/Qwen2.5-7B-Instruct
|
24 |
+
trust_remote_code: true
|
25 |
+
|
26 |
+
load_in_8bit: false
|
27 |
+
load_in_4bit: true
|
28 |
+
strict: false
|
29 |
+
|
30 |
+
datasets:
|
31 |
+
- path: medalpaca/medical_meadow_medqa
|
32 |
+
type: alpaca
|
33 |
+
dataset_prepared_path:
|
34 |
+
val_set_size: 0.2
|
35 |
+
output_dir: ./outputs/out
|
36 |
+
|
37 |
+
sequence_len: 2048
|
38 |
+
sample_packing: true
|
39 |
+
eval_sample_packing: true
|
40 |
+
pad_to_sequence_len: true
|
41 |
+
|
42 |
+
adapter: qlora
|
43 |
+
lora_model_dir:
|
44 |
+
lora_r: 256
|
45 |
+
lora_alpha: 128
|
46 |
+
lora_dropout: 0.05
|
47 |
+
lora_target_linear: true
|
48 |
+
lora_fan_in_fan_out:
|
49 |
+
|
50 |
+
wandb_project:
|
51 |
+
wandb_entity:
|
52 |
+
wandb_watch:
|
53 |
+
wandb_name:
|
54 |
+
wandb_log_model:
|
55 |
+
|
56 |
+
gradient_accumulation_steps: 1
|
57 |
+
micro_batch_size: 1
|
58 |
+
num_epochs: 3
|
59 |
+
optimizer: adamw_torch
|
60 |
+
lr_scheduler: cosine
|
61 |
+
learning_rate: 0.00002
|
62 |
+
|
63 |
+
train_on_inputs: false
|
64 |
+
group_by_length: false
|
65 |
+
bf16: true
|
66 |
+
fp16:
|
67 |
+
tf32:
|
68 |
+
|
69 |
+
gradient_checkpointing: true
|
70 |
+
gradient_checkpointing_kwargs:
|
71 |
+
use_reentrant: false
|
72 |
+
early_stopping_patience:
|
73 |
+
resume_from_checkpoint:
|
74 |
+
local_rank:
|
75 |
+
logging_steps: 10
|
76 |
+
xformers_attention:
|
77 |
+
flash_attention: true
|
78 |
+
|
79 |
+
warmup_steps:
|
80 |
+
evals_per_epoch: 4
|
81 |
+
saves_per_epoch: 1
|
82 |
+
debug:
|
83 |
+
deepspeed:
|
84 |
+
weight_decay: 0.0
|
85 |
+
fsdp:
|
86 |
+
- full_shard
|
87 |
+
- auto_wrap
|
88 |
+
fsdp_config:
|
89 |
+
fsdp_limit_all_gathers: true
|
90 |
+
fsdp_sync_module_states: true
|
91 |
+
fsdp_offload_params: true
|
92 |
+
fsdp_use_orig_params: false
|
93 |
+
fsdp_cpu_ram_efficient_loading: true
|
94 |
+
fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
|
95 |
+
fsdp_transformer_layer_cls_to_wrap: Qwen2DecoderLayer
|
96 |
+
fsdp_state_dict_type: FULL_STATE_DICT
|
97 |
+
fsdp_sharding_strategy: FULL_SHARD
|
98 |
+
special_tokens:
|
99 |
+
|
100 |
+
hub_model_id: neginashz/qwen-lora-fsdp
|
101 |
+
```
|
102 |
+
|
103 |
+
</details><br>
|
104 |
+
|
105 |
+
# qwen-lora-fsdp
|
106 |
+
|
107 |
+
This model is a fine-tuned version of [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) on the medalpaca/medical_meadow_medqa dataset.
|
108 |
+
It achieves the following results on the evaluation set:
|
109 |
+
- Loss: 0.1946
|
110 |
+
|
111 |
+
## Model description
|
112 |
+
|
113 |
+
More information needed
|
114 |
+
|
115 |
+
## Intended uses & limitations
|
116 |
+
|
117 |
+
More information needed
|
118 |
+
|
119 |
+
## Training and evaluation data
|
120 |
+
|
121 |
+
More information needed
|
122 |
+
|
123 |
+
## Training procedure
|
124 |
+
|
125 |
+
### Training hyperparameters
|
126 |
+
|
127 |
+
The following hyperparameters were used during training:
|
128 |
+
- learning_rate: 2e-05
|
129 |
+
- train_batch_size: 1
|
130 |
+
- eval_batch_size: 1
|
131 |
+
- seed: 42
|
132 |
+
- distributed_type: multi-GPU
|
133 |
+
- num_devices: 2
|
134 |
+
- total_train_batch_size: 2
|
135 |
+
- total_eval_batch_size: 2
|
136 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
137 |
+
- lr_scheduler_type: cosine
|
138 |
+
- lr_scheduler_warmup_steps: 55
|
139 |
+
- num_epochs: 3
|
140 |
+
|
141 |
+
### Training results
|
142 |
+
|
143 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
144 |
+
|:-------------:|:------:|:----:|:---------------:|
|
145 |
+
| 0.1208 | 0.2504 | 154 | 0.1264 |
|
146 |
+
| 0.1361 | 0.5008 | 308 | 0.1208 |
|
147 |
+
| 0.1211 | 0.7512 | 462 | 0.1133 |
|
148 |
+
| 0.1154 | 1.0016 | 616 | 0.1119 |
|
149 |
+
| 0.076 | 1.2504 | 770 | 0.1208 |
|
150 |
+
| 0.0563 | 1.5008 | 924 | 0.1302 |
|
151 |
+
| 0.0493 | 1.7512 | 1078 | 0.1320 |
|
152 |
+
| 0.0678 | 2.0016 | 1232 | 0.1255 |
|
153 |
+
| 0.0091 | 2.2504 | 1386 | 0.1796 |
|
154 |
+
| 0.0216 | 2.5008 | 1540 | 0.1903 |
|
155 |
+
| 0.0105 | 2.7512 | 1694 | 0.1946 |
|
156 |
+
|
157 |
+
|
158 |
+
### Framework versions
|
159 |
+
|
160 |
+
- PEFT 0.14.0
|
161 |
+
- Transformers 4.47.0
|
162 |
+
- Pytorch 2.5.1+cu124
|
163 |
+
- Datasets 3.1.0
|
164 |
+
- Tokenizers 0.21.0
|