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otl
|
7 |
+
- generated_from_trainer
|
8 |
+
datasets:
|
9 |
+
- ToastyPigeon/some-rp-extended
|
10 |
+
- allura-org/inkstructmix-v0.2.1a-system-reasoning-separated
|
11 |
+
- ToastyPigeon/unalign-v2
|
12 |
+
- ToastyPigeon/synth-rp
|
13 |
+
model-index:
|
14 |
+
- name: g3-12b-it-rp-qlora
|
15 |
+
results: []
|
16 |
+
---
|
17 |
+
|
18 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
19 |
+
should probably proofread and complete it, then remove this comment. -->
|
20 |
+
|
21 |
+
[<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)
|
22 |
+
<details><summary>See axolotl config</summary>
|
23 |
+
|
24 |
+
axolotl version: `0.8.0.dev0`
|
25 |
+
```yaml
|
26 |
+
# === Start-up Commands ===
|
27 |
+
# curl -LsSf https://astral.sh/uv/install.sh | sh
|
28 |
+
# export PATH="$HOME/.local/bin:$PATH"
|
29 |
+
# git clone https://github.com/axolotl-ai-cloud/axolotl
|
30 |
+
# cd axolotl
|
31 |
+
# git checkout d8b4027200de0fe60f4ae0a71272c1a8cb2888f7
|
32 |
+
# uv venv
|
33 |
+
# source .venv/bin/activate
|
34 |
+
# uv pip install packaging ninja setuptools ftfy huggingface_hub[cli,hf_transfer]
|
35 |
+
# uv pip install "cut-cross-entropy[transformers] @ git+https://github.com/strangedove/ml-cross-entropy.git"
|
36 |
+
# uv pip install apollo-torch
|
37 |
+
# uv pip install --no-build-isolation -e .[flash-attn,deepspeed]
|
38 |
+
# uv pip install git+https://github.com/huggingface/transformers.git
|
39 |
+
# export HF_HUB_ENABLE_HF_TRANSFER=1
|
40 |
+
# huggingface-cli login --token $hf_key && wandb login $wandb_key
|
41 |
+
# axolotl preprocess qwen21-pretrain.yml
|
42 |
+
# axolotl train qwen21-pretrain.yml
|
43 |
+
|
44 |
+
# curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH="$HOME/.local/bin:$PATH" && git clone https://github.com/axolotl-ai-cloud/axolotl && uv venv && source .venv/bin/activate && cd axolotl && uv pip install torch==2.5.1 packaging ninja setuptools ftfy deepspeed huggingface_hub[cli,hf_transfer] && uv pip install "cut-cross-entropy[transformers] @ git+https://github.com/strangedove/ml-cross-entropy.git" && uv pip install apollo-torch && uv pip install --no-build-isolation -e .[flash-attn] && uv pip install git+https://github.com/huggingface/transformers.git && export HF_HUB_ENABLE_HF_TRANSFER=1 && cd .. && huggingface-cli login --token $hf_key && wandb login $wandb_key
|
45 |
+
|
46 |
+
# === Model Configuration ===
|
47 |
+
base_model: unsloth/gemma-3-12b-it
|
48 |
+
load_in_8bit: false
|
49 |
+
load_in_4bit: true
|
50 |
+
|
51 |
+
# === HF Configuration ===
|
52 |
+
hub_model_id: ToastyPigeon/g3-12b-it-rp-qlora
|
53 |
+
hub_strategy: "every_save"
|
54 |
+
|
55 |
+
# === Training Setup ===
|
56 |
+
num_epochs: 1
|
57 |
+
micro_batch_size: 2
|
58 |
+
gradient_accumulation_steps: 2
|
59 |
+
sequence_len: 8192
|
60 |
+
sample_packing: true
|
61 |
+
pad_to_sequence_len: true
|
62 |
+
|
63 |
+
# === Evaluation ===
|
64 |
+
val_set_size: 100
|
65 |
+
evals_per_epoch: 5
|
66 |
+
#eval_table_size:
|
67 |
+
eval_max_new_tokens: 256
|
68 |
+
eval_sample_packing: true
|
69 |
+
#eval_strategy: "no"
|
70 |
+
|
71 |
+
# === LoRA Configuration ===
|
72 |
+
adapter: qlora
|
73 |
+
lora_model_dir:
|
74 |
+
lora_r: 64
|
75 |
+
lora_alpha: 64
|
76 |
+
lora_dropout: 0.5
|
77 |
+
lora_target_linear:
|
78 |
+
lora_fan_in_fan_out:
|
79 |
+
lora_target_modules:
|
80 |
+
- gate_proj
|
81 |
+
- down_proj
|
82 |
+
- up_proj
|
83 |
+
- q_proj
|
84 |
+
- v_proj
|
85 |
+
- k_proj
|
86 |
+
- o_proj
|
87 |
+
|
88 |
+
#lora_mlp_kernel: true
|
89 |
+
#lora_qkv_kernel: true
|
90 |
+
#lora_o_kernel: true
|
91 |
+
|
92 |
+
# === Hyperparameter Configuration ===
|
93 |
+
#optimizer: apollo_adamw_layerwise
|
94 |
+
optimizer: paged_adamw_8bit
|
95 |
+
# Apollo-mini configuration:
|
96 |
+
#optim_args: "proj=random,rank=1,scale=128.0,scale_type=tensor,update_proj_gap=200"
|
97 |
+
# Regular Apollo configuration:
|
98 |
+
# optim_args:
|
99 |
+
#optim_target_modules: all_linear
|
100 |
+
learning_rate: 1e-5
|
101 |
+
lr_scheduler: rex
|
102 |
+
weight_decay: 0.01
|
103 |
+
#warmup_ratio: 0.05
|
104 |
+
|
105 |
+
|
106 |
+
# === Data Configuration ===
|
107 |
+
#chat_template: jinja
|
108 |
+
#chat_template_jinja: "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '\n' + message['content'] | trim + '<end_of_turn>\n' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model\n'}}{% endif %}"
|
109 |
+
#special_tokens:
|
110 |
+
# eos_token: "<end_of_turn>"
|
111 |
+
shuffle_merged_datasets: true
|
112 |
+
datasets:
|
113 |
+
- path: ToastyPigeon/some-rp-extended
|
114 |
+
type: customgemma-regex
|
115 |
+
- path: allura-org/inkstructmix-v0.2.1a-system-reasoning-separated
|
116 |
+
type: customgemma-regex
|
117 |
+
data_files: inkstruct-system.json
|
118 |
+
split: train[:750]
|
119 |
+
- path: ToastyPigeon/unalign-v2
|
120 |
+
type: customgemma-regex
|
121 |
+
- path: ToastyPigeon/synth-rp
|
122 |
+
split: train[:1200]
|
123 |
+
type: customgemma-regex
|
124 |
+
|
125 |
+
dataset_prepared_path: last_run_prepared
|
126 |
+
|
127 |
+
|
128 |
+
# === Plugins ===
|
129 |
+
plugins:
|
130 |
+
- axolotl.integrations.liger.LigerPlugin
|
131 |
+
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
|
132 |
+
|
133 |
+
# === Hardware Optimization ===
|
134 |
+
gradient_checkpointing: true
|
135 |
+
#gradient_checkpointing_kwargs:
|
136 |
+
# use_reentrant: true
|
137 |
+
liger_rope: true
|
138 |
+
liger_rms_norm: true
|
139 |
+
liger_glu_activation: true
|
140 |
+
#liger_fused_linear_cross_entropy: true
|
141 |
+
#unsloth_cross_entropy_loss: true
|
142 |
+
cut_cross_entropy: true
|
143 |
+
# Only if using multiple GPUs:
|
144 |
+
deepspeed: axolotl/deepspeed_configs/zero2.json
|
145 |
+
|
146 |
+
# === Wandb Tracking ===
|
147 |
+
wandb_project: Gemma
|
148 |
+
# wandb_entity: [WANDB_ENTITY]
|
149 |
+
# wandb_name: [WANDB_RUN_NAME]
|
150 |
+
|
151 |
+
# === Checkpointing ===
|
152 |
+
saves_per_epoch: 10
|
153 |
+
save_total_limit: 1
|
154 |
+
|
155 |
+
# === Advanced Settings ===
|
156 |
+
output_dir: ./ckpts
|
157 |
+
bf16: auto
|
158 |
+
flash_attention: true
|
159 |
+
train_on_inputs: false
|
160 |
+
group_by_length: false
|
161 |
+
save_safetensors: true
|
162 |
+
logging_steps: 1
|
163 |
+
gc_steps: 10
|
164 |
+
seed: 69
|
165 |
+
```
|
166 |
+
|
167 |
+
</details><br>
|
168 |
+
|
169 |
+
# g3-12b-it-rp-qlora
|
170 |
+
|
171 |
+
This model is a fine-tuned version of [unsloth/gemma-3-12b-it](https://huggingface.co/unsloth/gemma-3-12b-it) on the ToastyPigeon/some-rp-extended, the allura-org/inkstructmix-v0.2.1a-system-reasoning-separated, the ToastyPigeon/unalign-v2 and the ToastyPigeon/synth-rp datasets.
|
172 |
+
It achieves the following results on the evaluation set:
|
173 |
+
- Loss: 3.4149
|
174 |
+
|
175 |
+
## Model description
|
176 |
+
|
177 |
+
More information needed
|
178 |
+
|
179 |
+
## Intended uses & limitations
|
180 |
+
|
181 |
+
More information needed
|
182 |
+
|
183 |
+
## Training and evaluation data
|
184 |
+
|
185 |
+
More information needed
|
186 |
+
|
187 |
+
## Training procedure
|
188 |
+
|
189 |
+
### Training hyperparameters
|
190 |
+
|
191 |
+
The following hyperparameters were used during training:
|
192 |
+
- learning_rate: 1e-05
|
193 |
+
- train_batch_size: 2
|
194 |
+
- eval_batch_size: 2
|
195 |
+
- seed: 69
|
196 |
+
- distributed_type: multi-GPU
|
197 |
+
- num_devices: 4
|
198 |
+
- gradient_accumulation_steps: 2
|
199 |
+
- total_train_batch_size: 16
|
200 |
+
- total_eval_batch_size: 8
|
201 |
+
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
202 |
+
- lr_scheduler_type: cosine
|
203 |
+
- lr_scheduler_warmup_steps: 3
|
204 |
+
- num_epochs: 1.0
|
205 |
+
|
206 |
+
### Training results
|
207 |
+
|
208 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
209 |
+
|:-------------:|:------:|:----:|:---------------:|
|
210 |
+
| 7.3186 | 0.0083 | 1 | 6.7163 |
|
211 |
+
| 5.301 | 0.2 | 24 | 4.8280 |
|
212 |
+
| 4.1467 | 0.4 | 48 | 4.3215 |
|
213 |
+
| 4.061 | 0.6 | 72 | 3.9633 |
|
214 |
+
| 4.0119 | 0.8 | 96 | 3.6294 |
|
215 |
+
| 3.7089 | 1.0 | 120 | 3.4149 |
|
216 |
+
|
217 |
+
|
218 |
+
### Framework versions
|
219 |
+
|
220 |
+
- PEFT 0.15.0
|
221 |
+
- Transformers 4.51.0.dev0
|
222 |
+
- Pytorch 2.5.1+cu124
|
223 |
+
- Datasets 3.4.1
|
224 |
+
- Tokenizers 0.21.1
|