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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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: qlora-qwen-25-7b-instruct-s
|
| 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.1
|
| 35 |
+
output_dir: ./qlora-qwen25-instruct
|
| 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: 256
|
| 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: 2
|
| 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: 1
|
| 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 |
+
wandb_project: qlora-qwen-25-7b-instruct
|
| 101 |
+
wandb_entity:
|
| 102 |
+
wandb_watch:
|
| 103 |
+
wandb_name:
|
| 104 |
+
wandb_log_model:
|
| 105 |
+
|
| 106 |
+
hub_model_id: neginashz/qlora-qwen-25-7b-instruct-s
|
| 107 |
+
hub_strategy:
|
| 108 |
+
early_stopping_patience:
|
| 109 |
+
|
| 110 |
+
resume_from_checkpoint:
|
| 111 |
+
auto_resume_from_checkpoints: true
|
| 112 |
+
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
</details><br>
|
| 116 |
+
|
| 117 |
+
# qlora-qwen-25-7b-instruct-s
|
| 118 |
+
|
| 119 |
+
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.
|
| 120 |
+
It achieves the following results on the evaluation set:
|
| 121 |
+
- Loss: 0.1608
|
| 122 |
+
|
| 123 |
+
## Model description
|
| 124 |
+
|
| 125 |
+
More information needed
|
| 126 |
+
|
| 127 |
+
## Intended uses & limitations
|
| 128 |
+
|
| 129 |
+
More information needed
|
| 130 |
+
|
| 131 |
+
## Training and evaluation data
|
| 132 |
+
|
| 133 |
+
More information needed
|
| 134 |
+
|
| 135 |
+
## Training procedure
|
| 136 |
+
|
| 137 |
+
### Training hyperparameters
|
| 138 |
+
|
| 139 |
+
The following hyperparameters were used during training:
|
| 140 |
+
- learning_rate: 2e-05
|
| 141 |
+
- train_batch_size: 2
|
| 142 |
+
- eval_batch_size: 2
|
| 143 |
+
- seed: 42
|
| 144 |
+
- distributed_type: multi-GPU
|
| 145 |
+
- num_devices: 4
|
| 146 |
+
- total_train_batch_size: 8
|
| 147 |
+
- total_eval_batch_size: 8
|
| 148 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 149 |
+
- lr_scheduler_type: cosine
|
| 150 |
+
- lr_scheduler_warmup_steps: 14
|
| 151 |
+
- num_epochs: 3
|
| 152 |
+
|
| 153 |
+
### Training results
|
| 154 |
+
|
| 155 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 156 |
+
|:-------------:|:------:|:----:|:---------------:|
|
| 157 |
+
| 0.1216 | 0.2530 | 42 | 0.1267 |
|
| 158 |
+
| 0.1366 | 0.5060 | 84 | 0.1142 |
|
| 159 |
+
| 0.0914 | 0.7590 | 126 | 0.1104 |
|
| 160 |
+
| 0.0814 | 1.0060 | 168 | 0.1050 |
|
| 161 |
+
| 0.0763 | 1.2590 | 210 | 0.1113 |
|
| 162 |
+
| 0.0746 | 1.5120 | 252 | 0.1147 |
|
| 163 |
+
| 0.0467 | 1.7651 | 294 | 0.1125 |
|
| 164 |
+
| 0.0176 | 2.0120 | 336 | 0.1154 |
|
| 165 |
+
| 0.0367 | 2.2651 | 378 | 0.1605 |
|
| 166 |
+
| 0.0349 | 2.5181 | 420 | 0.1571 |
|
| 167 |
+
| 0.0173 | 2.7711 | 462 | 0.1608 |
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
### Framework versions
|
| 171 |
+
|
| 172 |
+
- PEFT 0.14.0
|
| 173 |
+
- Transformers 4.47.0
|
| 174 |
+
- Pytorch 2.5.1+cu124
|
| 175 |
+
- Datasets 3.1.0
|
| 176 |
+
- Tokenizers 0.21.0
|